16 Sep 2024

feedHacker News

Apple Watch sleep apnea detection gets FDA approval

Comments

16 Sep 2024 4:35pm GMT

Oracle, it's time to free JavaScript

Comments

16 Sep 2024 3:56pm GMT

Datomic and Content Addressable Techniques

Comments

16 Sep 2024 3:53pm GMT

feedUbuntu blog

Announcing Authd: OIDC authentication for Ubuntu Desktop and Server

Today we are announcing the general availability of Authd, a new authentication daemon for Ubuntu that allows direct integration with cloud-based identity providers for both Ubuntu Desktop and Server. Authd is available free of charge on Ubuntu 24.04 LTS. At launch, Authd supports Microsoft Entra ID (formerly Azure Active Directory) identity provider, with additional providers, […]

16 Sep 2024 2:25pm GMT

feedLinuxiac

Germany’s Sovereign Tech Fund Injects €688K into Samba

SerNet secured €688,800 in funding from Germany's Sovereign Tech Fund to boost Samba's security, scalability, and functionality.

16 Sep 2024 9:43am GMT

MX Linux 23.4 Released, Here’s What’s New

MX Linux 23.4 Released, Here's What's New

MX Linux 23.4 "Libretto" released, bringing bug fixes, kernel 6.1, app updates, and more. Based on Debian 12.7 "Bookworm."

16 Sep 2024 6:04am GMT

15 Sep 2024

feedLinuxiac

Kdenlive 24.08.1 Resolves Playback Issues

Kdenlive 24.08.1 Resolves Playback Issues

Kdenlive open-source video editor releases version 24.08.1 with important fixes for playback and rendering.

15 Sep 2024 9:41pm GMT

feedOMG! Ubuntu

Linux Kernel 6.11 Released, This is What’s New

Linux Kernel 6.11 newspaper headline graphicLinus Torvalds has announced the release of Linux kernel 6.11, which is the kernel version Ubuntu 24.10 and Ubuntu 24.04.2 LTS will offer. Fittingly, this update arrives a few days before the Linux Kernel Maintainer Summit takes place in Vienna, Austria. In his message to the Linux Kernel Mailing List to sign-off on the release Torvalds' writes: "I'm once again on the road and not in my normal timezone, but it's Sunday afternoon here in Vienna, and 6.11 is out", and asks kernel devs to "give the latest release a try" before getting stuck in with the 6.12 merge window, […]

You're reading Linux Kernel 6.11 Released, This is What's New, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.

15 Sep 2024 4:32pm GMT

13 Sep 2024

feedOMG! Ubuntu

Raspberry Pi Imager Gets Qt 6 Port, Now Offers AppImages on Linux

You don't need to own a Raspberry Pi to make use of the Raspberry Pi Imager. This nifty image writer makes flashing ISO, IMG, and similar files to USB drives and SD cards mighty easy. A new update, Raspberry Pi Imager 1.9, was released this week with some big changes. For one, this open-source and cross-platform image writing tool now uses Qt 6. This framework uplift offers a stack of underlying improvements in terms of stability, plus visual changes too. Raspberry Pi say the Qt 6 port provides "a lightly refreshed UI throughout on all platforms." Comparing the Qt 6 […]

You're reading Raspberry Pi Imager Gets Qt 6 Port, Now Offers AppImages on Linux, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.

13 Sep 2024 1:59pm GMT

Ubuntu 24.10 Fixes a Pesky File Picker Paper-Cut

Ubuntu 24.10 Oracular Oriole hero imageUbuntu 24.10 features a clutch of headline-worth changes, but also plenty of less obvious fixes for "paper cuts" - including a decades-long issue with thumbnails in the GTK file picker. Feeling deja-vu? GNOME 44 (shipped in Ubuntu 23.04) included a thumbnail grid in the GTK file picker to make it quicker and easier to select the right files to upload, or open in an app, and so on. A feature long overdue, resolving a "bug" which had been open for 20 years! Only, there is a bit of a problem with how it works - some of you may have […]

You're reading Ubuntu 24.10 Fixes a Pesky File Picker Paper-Cut, a blog post from OMG! Ubuntu. Do not reproduce elsewhere without permission.

13 Sep 2024 12:47pm GMT

12 Sep 2024

feedUbuntu blog

New research predicts networked edge computing will present a $26bn opportunity by 2032

Report by Omdia and Canonical finds network cloudification a key priority, shows CSPs embracing open source technologies London, UK. 12 September 2024. Today, Omdia and Canonical, the publisher of Ubuntu, released a new research report which indicates that communications service providers (CSPs) in the US, UK and Germany increasingly view networked edge computing not just […]

12 Sep 2024 9:28am GMT

feedJavaScript Weekly

The heaviest npm packages

#​704 - September 12, 2024

Read on the Web

JavaScript Weekly

The State of ES5 on the Web - Some of the earlier JavaScript build tools focused on allowing developers to write modern JavaScript code that could still run on the browsers of the time by compiling code down to ES5. Time has moved on, but have the tools or popular libraries? Philip investigates, and shares some recommendations.

Philip Walton

📊 The Top 5000 npm Packages by Size, Downloads, and Traffic - An interesting Google Sheets spreadsheet listing the top 5000 npm packages by package size, weekly downloads, and weekly traffic. One package is responsible for 278 terabytes of traffic per week, but the top 5000 add up to several petabytes.

Google Sheets / danhorus

Run GitHub Actions Up to 2x Faster at Half the Cost - Blacksmith runs your GitHub Actions substantially faster by running them on modern gaming CPUs. Integrating Blacksmith is a one-line code change. 100+ companies like Ashby, Superblocks, and Slope use Blacksmith to help developers merge code faster.

Blacksmith sponsor

Announcing TypeScript 5.6 - The latest TypeScript has landed with full support for iterator helpers, support for arbitrary module identifiers, --noUncheckedSideEffectImports to import modules without importing any values, and more - all covered in the always thorough release post.

Daniel Rosenwasser (Microsoft)

Is PHP the New JavaScript? - I'm no real fan of PHP, but there's been a lot of discussion on social media around increased interest in PHP by developers who'd usually steer clear of it, largely thanks to Laravel. This post tells the basic story and explains what Laravel brings to the table.

Dave Kiss (Mux)

IN BRIEF:

RELEASES:

📒 Articles & Tutorials

The Web's Clipboard, and How It Stores Data of Different Types - An interesting exploration of how things currently work with copy and pasting on the web, how different data types are treated, and what the Web Custom Formats proposal is putting forward.

Alex Harri Jónsson

Breakpoints and console.log Is the Past, Time Travel Is the Future - 15x faster JavaScript debugging than with breakpoints and console.log, supports Vitest, jest, karma, jasmine, and more. Just added support for Node.js built-in node:test framework!

Wallaby Team sponsor

Building the Same App Using Various Web Frameworks - A scientist at Amazon who usually works in Python with a minimum of JavaScript on the frontend wondered if a more modern web framework would suit him better in 2024. To try this out, he tried Next.js, SvelteKit, and the Python-flavored FastHTML.

Eugene Yan

Brand New Performance Features in Chrome DevTools - A helpful look into Chrome's updated Performance Panel and all the different metrics it shows off to help you improve the performance of your site.

Umar Hansa (DebugBear)

React and FormData - FormData is ironically both the 'newest and yet oldest' standard for accessing form data. Here are some practical ways for using it with TypeScript.

Brad Westfall

Automate Neon Schema Changes with Drizzle and GitHub Actions - Learn about schema migrations and how they can be applied to a Neon database with Drizzle and GitHub Actions.

Clerk sponsor

📄 The Secrets of JavaScript's delete Operator Zachary Lee

📄 Deploying a Next.js App to Production on Any Server Kurta Payjama

📄 How to Create a Weekly Google Analytics Report That Posts to Slack Paul Scanlon

📄 Top 10 Angular Architecture Mistakes You Really Want To Avoid Tomas Trajan

📄 How to Fix ESLint Violations with AI Assistance Docker Labs

📺 Why You Should Use Redux in 2024 Mark Erikson

🛠 Code & Tools

Biome v1.9 Released; Turns One Year Old - Biome started life as a fork of Rome, a bold attempt to create an all-in-one 'frontend toolchain'. As of v1.9, Biome can format and lint CSS, GraphQL, and JavaScript, does it very quickly, yet has 97% compatibility with Prettier.

Victorien Elvinger & Biome Core Team

Express.js 5.0 Released - The seminal Node.js webapp library seemed to take a nap for a few years, but development was reinvigorated earlier this year. v5.0 brings a variety of modern tweaks and dependency updates, though it's still tagged next at the npm registry. (Official homepage and v5.x API docs.)

Wesley Todd

✂️ Cut Your QA Cycles Down from Hours to Minutes - QA Wolf's AI-native approach gets engineering teams to 80% automated end-to-end test coverage and helps them ship 2x faster by reducing QA cycles from hours to minutes.

QA Wolf sponsor

Jimp 1.6: Manipulate Images without Native Dependencies - Most image libraries, such as Sharp, use native dependencies to do the heavy lifting, but Jimp can handle numerous formats directly for blurring, color tweaks, resizing, rotation, etc. Originally for Node, Jimp now works in the browser too - GitHub repo.

jimp Contributors

Valtio 2.0: Proxy State Made Simple - Turns objects into self-aware proxies so you can access state and subscribe to changes outside of components, add computed properties and more. Designed for React and compatible with Suspense, but can also be used with vanilla JS. - GitHub repo.

Daishi Kato

Violentmonkey: A Way to Run Userscripts in the Browser - There have been many extensions to run your own custom JavaScript automatically on certain Web pages over the years, but Violentmonkey seems to currently be one of the better and well maintained open source ones. GitHub repo.

Violentmonkey Team

  • 🔎 Orama 2.1 - Dependency-free, full-text and vector search engine for all JS runtimes, with typo tolerance, filters, facets, stemming, and more.

  • create-fastify 5.0 - Rapidly generate a Fastify project. It just takes npm init fastify app_name to get started.

  • file-type 19.5 - Detect the file type of a file, stream, or data. Now with WebVTT support.

  • TWGL.js 6.1 - Helpers for working with low-level WebGL from JS.

  • 🎨 Chroma.js 3.1 - JavaScript color manipulation library.

  • Pixi.js 8.4 - Fast, flexible 2D WebGL renderer.

12 Sep 2024 12:00am GMT

10 Sep 2024

feedUbuntu blog

Join Canonical in Bangalore at Dell Technologies Forum

Canonical is thrilled to be joining forces with Dell Technologies at the upcoming Dell Technologies Forum - Bangalore, taking place on 12 September. This premier event brings together industry leaders and technology enthusiasts to explore the latest advancements and solutions shaping the digital landscape. Register to Dell Technologies Forum - Bangalore A spotlight on powerful […]

10 Sep 2024 7:08pm GMT

05 Sep 2024

feedJavaScript Weekly

Reverse engineering minified JS with ChatGPT

#​703 - September 5, 2024

Read on the Web

JavaScript Weekly

An SSR Performance Showdown - Fastify's Matteo Collina set out to find the current state of server-side rendering performance across today's most popular libraries. The first attempt faced negative feedback due to implementation issues, but the showdown has been improved and re-run.

Matteo Collina

Announcing Vue 3.5 - While v3.5 is a minor release, it's one Vue users will love, with big performance and memory usage improvements in its reactivity system. With no breaking changes, upgrade and watch memory consumption drop.

Evan You

WorkOS: The Modern Identity Platform for B2B SaaS - WorkOS is a modern identity platform for B2B SaaS, offering flexible and easy-to-use APIs to integrate SSO, SCIM, and RBAC in minutes instead of months. It's trusted by hundreds of high-growth startups such as Perplexity, Vercel, Drata, and Webflow.

WorkOS sponsor

Reverse Engineering Minified JavaScript with ChatGPT - Writing new code with AI is one thing, but could it be even better at understanding existing code that you're struggling to grok? Yes, it seems.

Frank Fiegel

Inside ECMAScript: JavaScript Standards Get an Extra Stage - After nine years of annual updates, TC39 has tweaked the process to make rolling out new features faster and smoother. The so-called 'Stage 2.7' has been around for a while, but this is a neat primer to what it represents.

Mary Branscombe (The New Stack)

IN BRIEF:

[Workshop] Fix Your Front-End: JavaScript Edition - Learn practical tips to make debugging more tolerable. Join our JavaScript team live for a masterclass on Sept 24.

Sentry sponsor

RELEASES:

📒 Articles & Tutorials

Behind the Scenes: The Making of VS Code - A detailed conversation with two of the popular editor's principal engineers on what makes it tick. VS Code is surely one of the world's most widely distributed JavaScript-powered apps.

Holland, Rieken and Pasero (Microsoft)

How I Created a 3.78MB Docker Image for a JavaScript Service - The smallest JavaScript app container images tend to run into tens of megabytes, but tailoring your app to run on a lighter runtime like llrt can yield striking results.

Shenzilong

Leave Forms to SurveyJS and Get Back to What You Love Coding - Extensible JavaScript libraries for form management. Drag-and-drop UI, JSON form definitions, and seamless integration with any backend for full data control.

SurveyJS sponsor

Exploring Goja: A Go-Powered JavaScript Runtime - Goja is a pure Go(lang) JS runtime that makes it possible to embed JS into Go apps.

JT Archie

How to Use React Compiler - The compiler feature in React 19 is generating a lot of buzz - this "complete guide", as described by this author, covers much of what you'll need to get started.

Tapas Adhikary

Multithreaded Programming in Node.js using Atomics - Worker threads enable you to write multi-threaded Node apps, but sharing resources across them can quickly become tricky. Atomics can help avoid some of the pain.

Pavel Romanov

📄 A Complete Guide to Beginning with JavaScript - A rather epic article packed with background knowledge, context, and third party resources for starting a modern JavaScript learning journey. Cody Lindley

📄 Implementing Filtered Semantic Search Using pgvector and JavaScript Team Timescale

📄 How to Quickly (and Weightlessly) Convert Chrome Extensions to Safari Nina Torgunakova (Evil Martians)

📄 How Sentry Uses Mutation Testing on its JavaScript SDKs Lukas Stracke (Sentry)

🎤 Talking Deno 2 with Ryan Dahl Syntax․fm Podcast

🛠 Code & Tools

jsdiff 6.0: A JavaScript Text Diffing Implementation - Can compare strings for differences in various ways including creating patches. There's an online demo. (Don't worry - we're not going monthly ;-))

Kevin Decker

Redwood v8.0 Released - A long standing, opinionated React & GraphQL (and/or RSC) full-stack framework that covers all the bases for professional dev teams with best-in-class tool support. v8.0 introduces a background jobs system, Docker support, and easier SSR and RSC setup.

Redwood Team

Tests Are Dead. Meticulous Is Here - Automatically creates & maintains E2E UI tests. Zero flakes. Backed by YC, CTO of GitHub, CPO of Adobe, CEO of Vercel.

Meticulous sponsor

🇬🇧 GOV.UK Vue 1.0: Build Vue Apps, the British Way - The UK government is known for having an effective, well-designed site where Brits can complete various official tasks. Now you can get all of their components in Vue 3 form.

UK Government

👀 style-observer: A Mutation Observer for CSS - Attach JavaScript callbacks to changes in computed values of CSS properties.

Bramus Van Damme

Goxygen: Quickly Generate a Go Backend for a JS Project - A tool that sets up a new Go-based project with Angular, React, or Vue in the front-end, and Docker and Docker Compose files to make it all work.

Sasha Shpota

Typist 7.0: Tiptap-Based Rich Text Editor Component - Simple and opinionated. You can try several examples in the sidebar. Well suited for basic rich text situations like writing comments or messages and has a single-line mode.

Doist

Belt: A New Tool for Starting React Native Apps - A CLI tool for starting a new React Native app that takes various mundane decisions away from you and uses tooling and conventions established by a productive app development team.

Thoughtbot

  • Tinybase 5.2 - Powerful reactive data store for local‑first apps. Now with Postgres support (which can even work in-browser!)

  • jsdoc-to-markdown 9.0 - Generate Markdown docs from JSDoc-annotated code.

  • LogTape 0.5 - No-dependency logging lib for Deno, Node, Bun & browsers.

  • Plasmo 0.89 - Imagine Next.js but for building browser extensions.

  • JsonTree.js 3.0 - Customizable tree views for JSON data.

  • Poku 2.6 - Cross-platform JavaScript test runner.

  • Faker 9.0 - Generate large amounts of fake data.

05 Sep 2024 12:00am GMT

29 Aug 2024

feedJavaScript Weekly

JavaScript's Rust tool belt

#​702 - August 29, 2024

Read on the Web

JavaScript Weekly

Rspack 1.0: The Rust-Powered JavaScript Bundler - Far from being 'yet another bundler' with its own approach and terminology to learn, Rspack prides itself on being webpack API and ecosystem compatible, while offering many times the performance. The team now considers it production ready and encourages you to try your webpack-based projects on it.

Rspack Contributors

💡 Rspack also has a family of ancillary tools worth checking out, such as Rsdoctor, a tool for analyzing and visualizing your build process (for both Rspack and webpack!)

Front-End System Design - Learn to create scalable, efficient user interfaces in this extensive video course by Evgennii Ray. Explore the box model, browser rendering, DOM manipulation, state management, performance and much more.

Frontend Masters sponsor

How to Create an NPM Package in 2024 - Sounds simple, but there are a lot of steps involved if you want to follow best practices, introduce useful tools, and get things just right. Matt Pocock walks through the process here, and there's a 14-minute screencast too, if you'd prefer to watch along.

Matt Pocock

IN BRIEF:

RELEASES:

📒 Articles & Tutorials

JS Dates are About to Be Fixed - Handling dates and times is famously a painful area for programmers and JavaScript hasn't done a lot to make it easier. Libraries like Moment.js help a lot, but Iago looks at how the Temporal proposal and its features will begin to help a lot more over time.

Iago Lastra

Weekly Chats on the Art and Practice of Programming - Your home for weekly conversations with fascinating guests about how technology is made and where it's headed.

The Stack Overflow Podcast sponsor

JavaScript Generators Explained - Jan was frustrated by the quality of documentation and articles explaining generators in JavaScript, and set out to explain things in a way that a more advanced developer could appreciate.

Jan Hesters

Implementing a React-a-Like from Scratch - While it's unlikely you'll actually want to do this, at least thinking about it can prove instructive as to what's going on in React's engine room.

Robby Pruzan

How to Implement the 2048 Game in JavaScript - Ania is back with one of her usual easy to follow walkthroughs of implementing a complete game in JavaScript. This time it's the 2048 sliding puzzle game. (Two weeks ago she did Tic-Tac-Toe as well.)

Ania Kubów

Learn Role-Based Access Control and Simplify Permissions Management - Enhance security and streamline access by managing user roles with Clerk Organizations.

Clerk sponsor

📄 The Only Widely Recognized JS Feature Ever Deprecated - Spoiler: It's with. Trevor Lasn

📄 Generating Unique Random Numbers in JavaScript Using Sets Amejimaobari

📺 21 Talks from the Chain React 2024 Conference - A React Native event. YouTube

📄 Exposing Internal Methods on Vue Custom Elements Jaime Jones

📄 The Interface Segregation Principle in React Alex Kondov

🛠 Code & Tools

TypeScript 5.6 Release Candidate - As always, Daniel presents an epic roundup of what's new. We'll focus more on it next week though, as the final release is anticipated to land next Tuesday (September 3).

Daniel Rosenwasser (Microsoft)

Vuestic UI 1.10: A Vue.js 3.0 UI Framework - Features 60 customizable and responsive components and with the v1.10 release it's gained a significant bundle size optimization, a custom compiler that improves build time performance, and other minor enhancements. GitHub repo.

Vuestic UI

✅ Bye Bye Bugs - Get 80% automated E2E test coverage for mobile and web apps in under 4 months with QA Wolf. With QA cycles complete in minutes (not days), bugs don't stand a chance. Schedule a demo.

QA Wolf sponsor

Material UI v6: The Popular React UI Design/Component System - At ten years old, the popular design system has its latest major release. There's a focus on improved theming, color scheme management, container queries, and React 19 support. There are revamped templates to be inspired by, too.

García, Bittu, Andai, et al.

npm-check-updates 17.0: Update package.json Dependencies to Latest Versions - That is, as opposed to the specified versions. It includes a handy -i interactive mode so you can look at potential upgrades and then opt in to them one by one.

Raine Revere

Code Hike 1.0: Turn Markdown into Rich Interactive Experiences - Aimed at use cases like code walkthroughs and interactive docs, Code Hike bridges the gap between Markdown and React when creating technical content that takes full advantage of the modern web.

Rodrigo Pombo

Calendar.js: A Calendar Control with Drag and Drop - A responsive calendar with no dependencies, full drag and drop support (even between calendars), and many ways to manage events with recurring events, exporting, holidays, and more.

William Troup

29 Aug 2024 12:00am GMT

23 Aug 2024

feedKubernetes Blog

Kubernetes v1.31: kubeadm v1beta4

As part of the Kubernetes v1.31 release, kubeadm is adopting a new (v1beta4) version of its configuration file format. Configuration in the previous v1beta3 format is now formally deprecated, which means it's supported but you should migrate to v1beta4 and stop using the deprecated format. Support for v1beta3 configuration will be removed after a minimum of 3 Kubernetes minor releases.

In this article, I'll walk you through key changes; I'll explain about the kubeadm v1beta4 configuration format, and how to migrate from v1beta3 to v1beta4.

You can read the reference for the v1beta4 configuration format: kubeadm Configuration (v1beta4).

A list of changes since v1beta3

This version improves on the v1beta3 format by fixing some minor issues and adding a few new fields.

To put it simply,

For details, you can see the official document below:

These changes simplify the configuration of tools that use kubeadm and improve the extensibility of kubeadm itself.

How to migrate v1beta3 configuration to v1beta4?

If your configuration is not using the latest version, it is recommended that you migrate using the kubeadm config migrate command.

This command reads an existing configuration file that uses the old format, and writes a new file that uses the current format.

Example

Using kubeadm v1.31, run kubeadm config migrate --old-config old-v1beta3.yaml --new-config new-v1beta4.yaml

How do I get involved?

Huge thanks to all the contributors who helped with the design, implementation, and review of this feature:

For those interested in getting involved in future discussions on kubeadm configuration, you can reach out kubeadm or SIG-cluster-lifecycle by several means:

23 Aug 2024 12:00am GMT

22 Aug 2024

feedKubernetes Blog

Kubernetes v1.31: New Kubernetes CPUManager Static Policy: Distribute CPUs Across Cores

In Kubernetes v1.31, we are excited to introduce a significant enhancement to CPU management capabilities: the distribute-cpus-across-cores option for the CPUManager static policy. This feature is currently in alpha and hidden by default, marking a strategic shift aimed at optimizing CPU utilization and improving system performance across multi-core processors.

Understanding the feature

Traditionally, Kubernetes' CPUManager tends to allocate CPUs as compactly as possible, typically packing them onto the fewest number of physical cores. However, allocation strategy matters, CPUs on the same physical host still share some resources of the physical core, such as the cache and execution units, etc.

cpu-cache-architecture

While default approach minimizes inter-core communication and can be beneficial under certain scenarios, it also poses a challenge. CPUs sharing a physical core can lead to resource contention, which in turn may cause performance bottlenecks, particularly noticeable in CPU-intensive applications.

The new distribute-cpus-across-cores feature addresses this issue by modifying the allocation strategy. When enabled, this policy option instructs the CPUManager to spread out the CPUs (hardware threads) across as many physical cores as possible. This distribution is designed to minimize contention among CPUs sharing the same physical core, potentially enhancing the performance of applications by providing them dedicated core resources.

Technically, within this static policy, the free CPU list is reordered in the manner depicted in the diagram, aiming to allocate CPUs from separate physical cores.

cpu-ordering

Enabling the feature

To enable this feature, users firstly need to add --cpu-manager-policy=static kubelet flag or the cpuManagerPolicy: static field in KubeletConfiuration. Then user can add --cpu-manager-policy-options distribute-cpus-across-cores=true or distribute-cpus-across-cores=true to their CPUManager policy options in the Kubernetes configuration or. This setting directs the CPUManager to adopt the new distribution strategy. It is important to note that this policy option cannot currently be used in conjunction with full-pcpus-only or distribute-cpus-across-numa options.

Current limitations and future directions

As with any new feature, especially one in alpha, there are limitations and areas for future improvement. One significant current limitation is that distribute-cpus-across-cores cannot be combined with other policy options that might conflict in terms of CPU allocation strategies. This restriction can affect compatibility with certain workloads and deployment scenarios that rely on more specialized resource management.

Looking forward, we are committed to enhancing the compatibility and functionality of the distribute-cpus-across-cores option. Future updates will focus on resolving these compatibility issues, allowing this policy to be combined with other CPUManager policies seamlessly. Our goal is to provide a more flexible and robust CPU allocation framework that can adapt to a variety of workloads and performance demands.

Conclusion

The introduction of the distribute-cpus-across-cores policy in Kubernetes CPUManager is a step forward in our ongoing efforts to refine resource management and improve application performance. By reducing the contention on physical cores, this feature offers a more balanced approach to CPU resource allocation, particularly beneficial for environments running heterogeneous workloads. We encourage Kubernetes users to test this new feature and provide feedback, which will be invaluable in shaping its future development.

This draft aims to clearly explain the new feature while setting expectations for its current stage and future improvements.

Further reading

Please check out the Control CPU Management Policies on the Node task page to learn more about the CPU Manager, and how it fits in relation to the other node-level resource managers.

Getting involved

This feature is driven by the SIG Node. If you are interested in helping develop this feature, sharing feedback, or participating in any other ongoing SIG Node projects, please attend the SIG Node meeting for more details.

22 Aug 2024 12:00am GMT

Kubernetes 1.31: Custom Profiling in Kubectl Debug Graduates to Beta

There are many ways of troubleshooting the pods and nodes in the cluster. However, kubectl debug is one of the easiest, highly used and most prominent ones. It provides a set of static profiles and each profile serves for a different kind of role. For instance, from the network administrator's point of view, debugging the node should be as easy as this:

$ kubectl debug node/mynode -it --image=busybox --profile=netadmin

On the other hand, static profiles also bring about inherent rigidity, which has some implications for some pods contrary to their ease of use. Because there are various kinds of pods (or nodes) that all have their specific necessities, and unfortunately, some can't be debugged by only using the static profiles.

Take an instance of a simple pod consisting of a container whose healthiness relies on an environment variable:

apiVersion: v1
kind: Pod
metadata:
 name: example-pod
spec:
 containers:
 - name: example-container
 image: customapp:latest
 env:
 - name: REQUIRED_ENV_VAR
 value: "value1"

Currently, copying the pod is the sole mechanism that supports debugging this pod in kubectl debug. Furthermore, what if user needs to modify the REQUIRED_ENV_VAR to something different for advanced troubleshooting?. There is no mechanism to achieve this.

Custom Profiling

Custom profiling is a new functionality available under --custom flag, introduced in kubectl debug to provide extensibility. It expects partial Container spec in either YAML or JSON format. In order to debug the example-container above by creating an ephemeral container, we simply have to define this YAML:

# partial_container.yaml
env:
 - name: REQUIRED_ENV_VAR
 value: value2

and execute:

kubectl debug example-pod -it --image=customapp --custom=partial_container.yaml

Here is another example that modifies multiple fields at once (change port number, add resource limits, modify environment variable) in JSON:

{
 "ports": [
 {
 "containerPort": 80
 }
 ],
 "resources": {
 "limits": {
 "cpu": "0.5",
 "memory": "512Mi"
 },
 "requests": {
 "cpu": "0.2",
 "memory": "256Mi"
 }
 },
 "env": [
 {
 "name": "REQUIRED_ENV_VAR",
 "value": "value2"
 }
 ]
}

Constraints

Uncontrolled extensibility hurts the usability. So that, custom profiling is not allowed for certain fields such as command, image, lifecycle, volume devices and container name. In the future, more fields can be added to the disallowed list if required.

Limitations

The kubectl debug command has 3 aspects: Debugging with ephemeral containers, pod copying, and node debugging. The largest intersection set of these aspects is the container spec within a Pod That's why, custom profiling only supports the modification of the fields that are defined with containers. This leads to a limitation that if user needs to modify the other fields in the Pod spec, it is not supported.

Acknowledgments

Special thanks to all the contributors who reviewed and commented on this feature, from the initial conception to its actual implementation (alphabetical order):

22 Aug 2024 12:00am GMT