From bc92b5dfbca0fffb254357fba6135007212d8760 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Tue, 14 Jul 2026 12:39:54 -0400 Subject: [PATCH 1/3] Add container-level GOMAXPROCS injection support Co-Authored-By: Claude Opus 4.6 Signed-off-by: Peter Hunt --- features.md | 1 + features/features.go | 8 + machineconfiguration/v1/types.go | 35 +++ ...nerruntimeconfigs-CustomNoUpgrade.crd.yaml | 22 ++ ...untimeconfigs-DevPreviewNoUpgrade.crd.yaml | 22 ++ ...ntimeconfigs-TechPreviewNoUpgrade.crd.yaml | 22 ++ ..._generated.featuregated-crd-manifests.yaml | 1 + .../GomaxprocsInjection.yaml | 219 ++++++++++++++++++ .../v1/zz_generated.swagger_doc_generated.go | 19 +- ...nerruntimeconfigs-CustomNoUpgrade.crd.yaml | 22 ++ ...untimeconfigs-DevPreviewNoUpgrade.crd.yaml | 22 ++ ...ntimeconfigs-TechPreviewNoUpgrade.crd.yaml | 22 ++ .../featureGate-4-10-Hypershift-Default.yaml | 3 + ...e-4-10-Hypershift-DevPreviewNoUpgrade.yaml | 3 + .../featureGate-4-10-Hypershift-OKD.yaml | 3 + ...-4-10-Hypershift-TechPreviewNoUpgrade.yaml | 3 + ...eatureGate-4-10-SelfManagedHA-Default.yaml | 3 + ...-10-SelfManagedHA-DevPreviewNoUpgrade.yaml | 3 + .../featureGate-4-10-SelfManagedHA-OKD.yaml | 3 + ...10-SelfManagedHA-TechPreviewNoUpgrade.yaml | 3 + 20 files changed, 430 insertions(+), 9 deletions(-) create mode 100644 machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml diff --git a/features.md b/features.md index c78d402696a..346001c0f19 100644 --- a/features.md +++ b/features.md @@ -65,6 +65,7 @@ | GCPCustomAPIEndpoints| | | Enabled | Enabled | | | Enabled | Enabled | | GCPCustomAPIEndpointsInstall| | | Enabled | Enabled | | | Enabled | Enabled | | GCPDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | +| GomaxprocsInjection| | | Enabled | Enabled | | | Enabled | Enabled | | HyperShiftOnlyDynamicResourceAllocation| Enabled | | Enabled | | Enabled | | Enabled | | | ImageModeStatusReporting| | | Enabled | Enabled | | | Enabled | Enabled | | IngressComponentRouteLabels| | | Enabled | Enabled | | | Enabled | Enabled | diff --git a/features/features.go b/features/features.go index b45bef77056..d33e46c3644 100644 --- a/features/features.go +++ b/features/features.go @@ -1060,4 +1060,12 @@ var ( enhancementPR("https://github.com/openshift/enhancements/pull/2007"). enable(inClusterProfile(SelfManaged), inDevPreviewNoUpgrade()). mustRegister() + + FeatureGateGomaxprocsInjection = newFeatureGate("GomaxprocsInjection"). + reportProblemsToJiraComponent("machine-config-operator"). + contactPerson("haircommander"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/2047"). + enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). + mustRegister() ) diff --git a/machineconfiguration/v1/types.go b/machineconfiguration/v1/types.go index 33c12be9235..1e513d6b339 100644 --- a/machineconfiguration/v1/types.go +++ b/machineconfiguration/v1/types.go @@ -768,6 +768,7 @@ type KubeletConfigSpec struct { // When specified, the type field can be set to either "Old", "Intermediate", "Modern", "Custom" or omitted for backward compatibility. // +optional TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` + } // KubeletConfigStatus defines the observed state of a KubeletConfig @@ -962,6 +963,28 @@ type ContainerRuntimeConfiguration struct { // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.path == y.path))",message="additionalArtifactStores must not contain duplicate paths" AdditionalArtifactStores []AdditionalArtifactStore `json:"additionalArtifactStores,omitempty"` + + // containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + // based on their CPU resource requests. + // Valid values are "Autosize" and "Disabled". + // When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + // calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + // based on the allocated CPU resources rather than the total node capacity. + // When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + // (GOMAXPROCS equals the number of CPUs available on the node). + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // The current default is "Disabled". + // + // Containers can override the injected GOMAXPROCS value by: + // - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + // - Setting GOMAXPROCS in the pod spec (env or envFrom) + // - Calling runtime.GOMAXPROCS() programmatically in Go code + // - Adding the skip-gomaxprocs.crio.io annotation to the pod + // + // +openshift:enable:FeatureGate=GomaxprocsInjection + // +optional + // +kubebuilder:validation:Enum=Autosize;Disabled + ContainerGomaxprocsBehavior ContainerGomaxprocsBehaviorType `json:"containerGomaxprocsBehavior,omitempty"` } type ContainerRuntimeDefaultRuntime string @@ -974,6 +997,18 @@ const ( ContainerRuntimeDefaultRuntimeDefault = ContainerRuntimeDefaultRuntimeCrun ) +// ContainerGomaxprocsBehaviorType specifies whether CRI-O should inject GOMAXPROCS into containers +type ContainerGomaxprocsBehaviorType string + +const ( + // ContainerGomaxprocsBehaviorAutosize enables automatic GOMAXPROCS injection based on CPU requests + ContainerGomaxprocsBehaviorAutosize ContainerGomaxprocsBehaviorType = "Autosize" + // ContainerGomaxprocsBehaviorDisabled disables GOMAXPROCS injection + ContainerGomaxprocsBehaviorDisabled ContainerGomaxprocsBehaviorType = "Disabled" + // ContainerGomaxprocsBehaviorDefault is the default behavior + ContainerGomaxprocsBehaviorDefault = ContainerGomaxprocsBehaviorDisabled +) + // StorePath is an absolute filesystem path used by additional container storage configurations. // The path must be between 1 and 256 characters long, begin with a forward slash, and only contain // the characters a-z, A-Z, 0-9, '/', '.', '_', and '-'. Consecutive forward slashes are not permitted. diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml index 68726d9ce15..8499ae8c7f3 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml @@ -184,6 +184,28 @@ spec: x-kubernetes-validations: - message: additionalLayerStores must not contain duplicate paths rule: self.all(x, self.exists_one(y, x.path == y.path)) + containerGomaxprocsBehavior: + description: |- + containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + based on their CPU resource requests. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + based on the allocated CPU resources rather than the total node capacity. + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + + Containers can override the injected GOMAXPROCS value by: + - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + - Setting GOMAXPROCS in the pod spec (env or envFrom) + - Calling runtime.GOMAXPROCS() programmatically in Go code + - Adding the skip-gomaxprocs.crio.io annotation to the pod + enum: + - Autosize + - Disabled + type: string defaultRuntime: description: |- defaultRuntime is the name of the OCI runtime to be used as the default for containers. diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml index 8d918545b29..009c663277a 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml @@ -184,6 +184,28 @@ spec: x-kubernetes-validations: - message: additionalLayerStores must not contain duplicate paths rule: self.all(x, self.exists_one(y, x.path == y.path)) + containerGomaxprocsBehavior: + description: |- + containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + based on their CPU resource requests. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + based on the allocated CPU resources rather than the total node capacity. + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + + Containers can override the injected GOMAXPROCS value by: + - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + - Setting GOMAXPROCS in the pod spec (env or envFrom) + - Calling runtime.GOMAXPROCS() programmatically in Go code + - Adding the skip-gomaxprocs.crio.io annotation to the pod + enum: + - Autosize + - Disabled + type: string defaultRuntime: description: |- defaultRuntime is the name of the OCI runtime to be used as the default for containers. diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml index 27a0cb3c173..61cf855bb37 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml @@ -184,6 +184,28 @@ spec: x-kubernetes-validations: - message: additionalLayerStores must not contain duplicate paths rule: self.all(x, self.exists_one(y, x.path == y.path)) + containerGomaxprocsBehavior: + description: |- + containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + based on their CPU resource requests. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + based on the allocated CPU resources rather than the total node capacity. + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + + Containers can override the injected GOMAXPROCS value by: + - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + - Setting GOMAXPROCS in the pod spec (env or envFrom) + - Calling runtime.GOMAXPROCS() programmatically in Go code + - Adding the skip-gomaxprocs.crio.io annotation to the pod + enum: + - Autosize + - Disabled + type: string defaultRuntime: description: |- defaultRuntime is the name of the OCI runtime to be used as the default for containers. diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index 6eb9f97c6a7..a2ed297d684 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -6,6 +6,7 @@ containerruntimeconfigs.machineconfiguration.openshift.io: Category: "" FeatureGates: - AdditionalStorageConfig + - GomaxprocsInjection FilenameOperatorName: machine-config FilenameOperatorOrdering: "01" FilenameRunLevel: "0000_80" diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml new file mode 100644 index 00000000000..df0540043ab --- /dev/null +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml @@ -0,0 +1,219 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/filename-cvo-runlevel: "0000_80" + api.openshift.io/filename-operator: machine-config + api.openshift.io/filename-ordering: "01" + feature-gate.release.openshift.io/GomaxprocsInjection: "true" + labels: + openshift.io/operator-managed: "" + name: containerruntimeconfigs.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: ContainerRuntimeConfig + listKind: ContainerRuntimeConfigList + plural: containerruntimeconfigs + shortNames: + - ctrcfg + singular: containerruntimeconfig + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: |- + ContainerRuntimeConfig describes a customized Container Runtime configuration. + + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec contains the desired container runtime configuration. + properties: + containerRuntimeConfig: + description: containerRuntimeConfig defines the tuneables of the container + runtime. + properties: + containerGomaxprocsBehavior: + description: |- + containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + based on their CPU resource requests. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + based on the allocated CPU resources rather than the total node capacity. + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + + Containers can override the injected GOMAXPROCS value by: + - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + - Setting GOMAXPROCS in the pod spec (env or envFrom) + - Calling runtime.GOMAXPROCS() programmatically in Go code + - Adding the skip-gomaxprocs.crio.io annotation to the pod + enum: + - Autosize + - Disabled + type: string + defaultRuntime: + description: |- + defaultRuntime is the name of the OCI runtime to be used as the default for containers. + Allowed values are `runc` and `crun`. + When set to `runc`, OpenShift will use runc to execute the container + When set to `crun`, OpenShift will use crun to execute the container + When omitted, this means no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. Currently, the default is `crun`. + enum: + - crun + - runc + type: string + logLevel: + description: |- + logLevel specifies the verbosity of the logs based on the level it is set to. + Options are fatal, panic, error, warn, info, and debug. + type: string + logSizeMax: + anyOf: + - type: integer + - type: string + description: |- + logSizeMax specifies the Maximum size allowed for the container log file. + Negative numbers indicate that no size limit is imposed. + If it is positive, it must be >= 8192 to match/exceed conmon's read buffer. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + overlaySize: + anyOf: + - type: integer + - type: string + description: |- + overlaySize specifies the maximum size of a container image. + This flag can be used to set quota on the size of container images. (default: 10GB) + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + pidsLimit: + description: pidsLimit specifies the maximum number of processes + allowed in a container + format: int64 + type: integer + type: object + machineConfigPoolSelector: + description: |- + machineConfigPoolSelector selects which pools the ContainerRuntimeConfig shoud apply to. + A nil selector will result in no pools being selected. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - containerRuntimeConfig + type: object + status: + description: status contains observed information about the container + runtime configuration. + properties: + conditions: + description: conditions represents the latest available observations + of current state. + items: + description: ContainerRuntimeConfigCondition defines the state of + the ContainerRuntimeConfig + properties: + lastTransitionTime: + description: lastTransitionTime is the time of the last update + to the current status object. + format: date-time + nullable: true + type: string + message: + description: |- + message provides additional information about the current condition. + This is only to be consumed by humans. + type: string + reason: + description: reason is the reason for the condition's last transition. Reasons + are PascalCase + type: string + status: + description: status of the condition, one of True, False, Unknown. + type: string + type: + description: type specifies the state of the operator's reconciliation + functionality. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + observedGeneration: + description: observedGeneration represents the generation observed + by the controller. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index aac65c9acbc..51257aabdf6 100644 --- a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -101,15 +101,16 @@ func (ContainerRuntimeConfigStatus) SwaggerDoc() map[string]string { } var map_ContainerRuntimeConfiguration = map[string]string{ - "": "ContainerRuntimeConfiguration defines the tuneables of the container runtime", - "pidsLimit": "pidsLimit specifies the maximum number of processes allowed in a container", - "logLevel": "logLevel specifies the verbosity of the logs based on the level it is set to. Options are fatal, panic, error, warn, info, and debug.", - "logSizeMax": "logSizeMax specifies the Maximum size allowed for the container log file. Negative numbers indicate that no size limit is imposed. If it is positive, it must be >= 8192 to match/exceed conmon's read buffer.", - "overlaySize": "overlaySize specifies the maximum size of a container image. This flag can be used to set quota on the size of container images. (default: 10GB)", - "defaultRuntime": "defaultRuntime is the name of the OCI runtime to be used as the default for containers. Allowed values are `runc` and `crun`. When set to `runc`, OpenShift will use runc to execute the container When set to `crun`, OpenShift will use crun to execute the container When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Currently, the default is `crun`.", - "additionalLayerStores": "additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images.\n\nLayers are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 5 stores allowed. Each path must be unique.\n\nWhen omitted, only the default layer location is used. When specified, at least one store must be provided.", - "additionalImageStores": "additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images.\n\nImages are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default image location is used. When specified, at least one store must be provided.", - "additionalArtifactStores": "additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts.\n\nArtifacts are checked in order: additional stores first, then the default location (/var/lib/containers/storage/artifacts). Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default artifact location is used. When specified, at least one store must be provided.", + "": "ContainerRuntimeConfiguration defines the tuneables of the container runtime", + "pidsLimit": "pidsLimit specifies the maximum number of processes allowed in a container", + "logLevel": "logLevel specifies the verbosity of the logs based on the level it is set to. Options are fatal, panic, error, warn, info, and debug.", + "logSizeMax": "logSizeMax specifies the Maximum size allowed for the container log file. Negative numbers indicate that no size limit is imposed. If it is positive, it must be >= 8192 to match/exceed conmon's read buffer.", + "overlaySize": "overlaySize specifies the maximum size of a container image. This flag can be used to set quota on the size of container images. (default: 10GB)", + "defaultRuntime": "defaultRuntime is the name of the OCI runtime to be used as the default for containers. Allowed values are `runc` and `crun`. When set to `runc`, OpenShift will use runc to execute the container When set to `crun`, OpenShift will use crun to execute the container When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Currently, the default is `crun`.", + "additionalLayerStores": "additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images.\n\nLayers are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 5 stores allowed. Each path must be unique.\n\nWhen omitted, only the default layer location is used. When specified, at least one store must be provided.", + "additionalImageStores": "additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images.\n\nImages are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default image location is used. When specified, at least one store must be provided.", + "additionalArtifactStores": "additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts.\n\nArtifacts are checked in order: additional stores first, then the default location (/var/lib/containers/storage/artifacts). Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default artifact location is used. When specified, at least one store must be provided.", + "containerGomaxprocsBehavior": "containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers based on their CPU resource requests. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. When set to \"Disabled\", GOMAXPROCS injection is disabled and containers will use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".\n\nContainers can override the injected GOMAXPROCS value by: - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) - Setting GOMAXPROCS in the pod spec (env or envFrom) - Calling runtime.GOMAXPROCS() programmatically in Go code - Adding the skip-gomaxprocs.crio.io annotation to the pod", } func (ContainerRuntimeConfiguration) SwaggerDoc() map[string]string { diff --git a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml index 68726d9ce15..8499ae8c7f3 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml @@ -184,6 +184,28 @@ spec: x-kubernetes-validations: - message: additionalLayerStores must not contain duplicate paths rule: self.all(x, self.exists_one(y, x.path == y.path)) + containerGomaxprocsBehavior: + description: |- + containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + based on their CPU resource requests. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + based on the allocated CPU resources rather than the total node capacity. + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + + Containers can override the injected GOMAXPROCS value by: + - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + - Setting GOMAXPROCS in the pod spec (env or envFrom) + - Calling runtime.GOMAXPROCS() programmatically in Go code + - Adding the skip-gomaxprocs.crio.io annotation to the pod + enum: + - Autosize + - Disabled + type: string defaultRuntime: description: |- defaultRuntime is the name of the OCI runtime to be used as the default for containers. diff --git a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml index 8d918545b29..009c663277a 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml @@ -184,6 +184,28 @@ spec: x-kubernetes-validations: - message: additionalLayerStores must not contain duplicate paths rule: self.all(x, self.exists_one(y, x.path == y.path)) + containerGomaxprocsBehavior: + description: |- + containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + based on their CPU resource requests. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + based on the allocated CPU resources rather than the total node capacity. + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + + Containers can override the injected GOMAXPROCS value by: + - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + - Setting GOMAXPROCS in the pod spec (env or envFrom) + - Calling runtime.GOMAXPROCS() programmatically in Go code + - Adding the skip-gomaxprocs.crio.io annotation to the pod + enum: + - Autosize + - Disabled + type: string defaultRuntime: description: |- defaultRuntime is the name of the OCI runtime to be used as the default for containers. diff --git a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml index 27a0cb3c173..61cf855bb37 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml @@ -184,6 +184,28 @@ spec: x-kubernetes-validations: - message: additionalLayerStores must not contain duplicate paths rule: self.all(x, self.exists_one(y, x.path == y.path)) + containerGomaxprocsBehavior: + description: |- + containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + based on their CPU resource requests. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + based on the allocated CPU resources rather than the total node capacity. + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior + (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + + Containers can override the injected GOMAXPROCS value by: + - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + - Setting GOMAXPROCS in the pod spec (env or envFrom) + - Calling runtime.GOMAXPROCS() programmatically in Go code + - Adding the skip-gomaxprocs.crio.io annotation to the pod + enum: + - Autosize + - Disabled + type: string defaultRuntime: description: |- defaultRuntime is the name of the OCI runtime to be used as the default for containers. diff --git a/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml b/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml index 2873fff0258..9e1d18e61bf 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml @@ -152,6 +152,9 @@ { "name": "GCPDualStackInstall" }, + { + "name": "GomaxprocsInjection" + }, { "name": "ImageModeStatusReporting" }, diff --git a/payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml index 10e59cfd719..2e5cab150d3 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml @@ -243,6 +243,9 @@ { "name": "GatewayAPIWithoutOLM" }, + { + "name": "GomaxprocsInjection" + }, { "name": "HyperShiftOnlyDynamicResourceAllocation" }, diff --git a/payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml b/payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml index ee9d301c7c5..c5f69d7b9d1 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml @@ -154,6 +154,9 @@ { "name": "GCPDualStackInstall" }, + { + "name": "GomaxprocsInjection" + }, { "name": "ImageModeStatusReporting" }, diff --git a/payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml index a4c6e172b33..7cb3b56f174 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml @@ -252,6 +252,9 @@ { "name": "GatewayAPIWithoutOLM" }, + { + "name": "GomaxprocsInjection" + }, { "name": "HyperShiftOnlyDynamicResourceAllocation" }, diff --git a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml index d3ec99985fc..0db00b5fe8d 100644 --- a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml @@ -152,6 +152,9 @@ { "name": "GCPDualStackInstall" }, + { + "name": "GomaxprocsInjection" + }, { "name": "HyperShiftOnlyDynamicResourceAllocation" }, diff --git a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml index 017a3d57693..b0e061a1c15 100644 --- a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml @@ -213,6 +213,9 @@ { "name": "GatewayAPIWithoutOLM" }, + { + "name": "GomaxprocsInjection" + }, { "name": "ImageModeStatusReporting" }, diff --git a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml index 326fe926316..b9aa79af1d7 100644 --- a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml @@ -154,6 +154,9 @@ { "name": "GCPDualStackInstall" }, + { + "name": "GomaxprocsInjection" + }, { "name": "HyperShiftOnlyDynamicResourceAllocation" }, diff --git a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml index d0dbf060f25..2424db089a3 100644 --- a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml @@ -228,6 +228,9 @@ { "name": "GatewayAPIWithoutOLM" }, + { + "name": "GomaxprocsInjection" + }, { "name": "ImageModeStatusReporting" }, From 7a7164b34eadf05923adbe3e7ef7e25e5c0128a1 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Tue, 14 Jul 2026 13:12:16 -0400 Subject: [PATCH 2/3] Add system service-level GOMAXPROCS configuration support Co-Authored-By: Claude Opus 4.6 Signed-off-by: Peter Hunt --- machineconfiguration/v1/types.go | 27 ++ ...01_kubeletconfigs-CustomNoUpgrade.crd.yaml | 16 + ...ubeletconfigs-DevPreviewNoUpgrade.crd.yaml | 16 + ...beletconfigs-TechPreviewNoUpgrade.crd.yaml | 16 + ..._generated.featuregated-crd-manifests.yaml | 1 + .../GomaxprocsInjection.yaml | 344 ++++++++++++++++++ .../v1/zz_generated.swagger_doc_generated.go | 1 + ...01_kubeletconfigs-CustomNoUpgrade.crd.yaml | 16 + ...ubeletconfigs-DevPreviewNoUpgrade.crd.yaml | 16 + ...beletconfigs-TechPreviewNoUpgrade.crd.yaml | 16 + 10 files changed, 469 insertions(+) create mode 100644 machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml diff --git a/machineconfiguration/v1/types.go b/machineconfiguration/v1/types.go index 1e513d6b339..2ee516a55a1 100644 --- a/machineconfiguration/v1/types.go +++ b/machineconfiguration/v1/types.go @@ -769,6 +769,21 @@ type KubeletConfigSpec struct { // +optional TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` + // systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + // GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + // Valid values are "Autosize" and "Disabled". + // When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + // max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + // services based on their CPU allocation rather than total node capacity. + // When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + // use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // The current default is "Disabled". + // + // +openshift:enable:FeatureGate=GomaxprocsInjection + // +optional + // +kubebuilder:validation:Enum=Autosize;Disabled + SystemGomaxprocsBehavior SystemGomaxprocsBehaviorType `json:"systemGomaxprocsBehavior,omitempty"` } // KubeletConfigStatus defines the observed state of a KubeletConfig @@ -1009,6 +1024,18 @@ const ( ContainerGomaxprocsBehaviorDefault = ContainerGomaxprocsBehaviorDisabled ) +// SystemGomaxprocsBehaviorType specifies whether system services should have GOMAXPROCS automatically configured +type SystemGomaxprocsBehaviorType string + +const ( + // SystemGomaxprocsBehaviorAutosize enables automatic GOMAXPROCS configuration for system services based on system reserved CPU + SystemGomaxprocsBehaviorAutosize SystemGomaxprocsBehaviorType = "Autosize" + // SystemGomaxprocsBehaviorDisabled disables automatic GOMAXPROCS configuration for system services + SystemGomaxprocsBehaviorDisabled SystemGomaxprocsBehaviorType = "Disabled" + // SystemGomaxprocsBehaviorDefault is the default behavior + SystemGomaxprocsBehaviorDefault = SystemGomaxprocsBehaviorDisabled +) + // StorePath is an absolute filesystem path used by additional container storage configurations. // The path must be between 1 and 256 characters long, begin with a forward slash, and only contain // the characters a-z, A-Z, 0-9, '/', '.', '_', and '-'. Consecutive forward slashes are not permitted. diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml index a3e3f4ba1d5..7aa48dd4640 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml @@ -123,6 +123,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + systemGomaxprocsBehavior: + description: |- + systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + services based on their CPU allocation rather than total node capacity. + When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + enum: + - Autosize + - Disabled + type: string tlsSecurityProfile: description: |- tlsSecurityProfile configures TLS settings for the kubelet. diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml index 5f76118f194..162aeb4255a 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml @@ -123,6 +123,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + systemGomaxprocsBehavior: + description: |- + systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + services based on their CPU allocation rather than total node capacity. + When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + enum: + - Autosize + - Disabled + type: string tlsSecurityProfile: description: |- tlsSecurityProfile configures TLS settings for the kubelet. diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml index af17f6f69b1..23746abb3d2 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml @@ -123,6 +123,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + systemGomaxprocsBehavior: + description: |- + systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + services based on their CPU allocation rather than total node capacity. + When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + enum: + - Autosize + - Disabled + type: string tlsSecurityProfile: description: |- tlsSecurityProfile configures TLS settings for the kubelet. diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index a2ed297d684..741949a3f78 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -88,6 +88,7 @@ kubeletconfigs.machineconfiguration.openshift.io: Capability: "" Category: "" FeatureGates: + - GomaxprocsInjection - TLSGroupPreferences FilenameOperatorName: machine-config FilenameOperatorOrdering: "01" diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml new file mode 100644 index 00000000000..d06d4038cf8 --- /dev/null +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml @@ -0,0 +1,344 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/filename-cvo-runlevel: "0000_80" + api.openshift.io/filename-operator: machine-config + api.openshift.io/filename-ordering: "01" + feature-gate.release.openshift.io/GomaxprocsInjection: "true" + labels: + openshift.io/operator-managed: "" + name: kubeletconfigs.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: KubeletConfig + listKind: KubeletConfigList + plural: kubeletconfigs + singular: kubeletconfig + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: |- + KubeletConfig describes a customized Kubelet configuration. + + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec contains the desired kubelet configuration. + properties: + autoSizingReserved: + description: |- + autoSizingReserved controls whether system-reserved CPU and memory are automatically + calculated based on each node's installed capacity. When set to true, this prevents node failure + from resource starvation of system components (kubelet, CRI-O) without manual configuration. + When omitted, this means the user has no opinion and the platform is left to choose a reasonable default, + which is subject to change over time. The current default is true for worker nodes and false for control plane nodes. + When set to false, automatic resource reservation is disabled and manual settings must be configured. + type: boolean + kubeletConfig: + description: |- + kubeletConfig contains upstream Kubernetes kubelet configuration fields. + Values are validated by the kubelet itself. Invalid values may render nodes unusable. + Refer to OpenShift documentation for the Kubernetes version corresponding to your + OpenShift release to find valid kubelet configuration options. + type: object + x-kubernetes-preserve-unknown-fields: true + logLevel: + description: |- + logLevel sets the kubelet log verbosity, controlling the amount of detail in kubelet logs. + Valid values range from 0 (minimal logging) to 10 (maximum verbosity with trace-level detail). + Higher log levels may impact node performance. When omitted, the platform chooses a reasonable default, + which is subject to change over time. The current default is 2 (standard informational logging). + format: int32 + maximum: 10 + minimum: 0 + type: integer + machineConfigPoolSelector: + description: |- + machineConfigPoolSelector selects which pools the KubeletConfig should apply to. + When omitted or set to an empty selector {}, no pools are selected, which is equivalent + to not matching any MachineConfigPool. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + systemGomaxprocsBehavior: + description: |- + systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + services based on their CPU allocation rather than total node capacity. + When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + enum: + - Autosize + - Disabled + type: string + tlsSecurityProfile: + description: |- + tlsSecurityProfile configures TLS settings for the kubelet. + When omitted, the TLS configuration defaults to the value from apiservers.config.openshift.io/cluster. + When specified, the type field can be set to either "Old", "Intermediate", "Modern", "Custom" or omitted for backward compatibility. + properties: + custom: + description: |- + custom is a user-defined TLS security profile. Be extremely careful using a custom + profile as invalid configurations can be catastrophic. + + The supported groups list for this profile is empty by default. + + An example custom profile looks like this: + + minTLSVersion: VersionTLS11 + ciphers: + - ECDHE-ECDSA-CHACHA20-POLY1305 + - ECDHE-RSA-CHACHA20-POLY1305 + - ECDHE-RSA-AES128-GCM-SHA256 + - ECDHE-ECDSA-AES128-GCM-SHA256 + nullable: true + properties: + ciphers: + description: |- + ciphers is used to specify the cipher algorithms that are negotiated + during the TLS handshake. Operators may remove entries that their operands + do not support. For example, to use only ECDHE-RSA-AES128-GCM-SHA256 (yaml): + + ciphers: + - ECDHE-RSA-AES128-GCM-SHA256 + + TLS 1.3 cipher suites (e.g. TLS_AES_128_GCM_SHA256) are not configurable + and are always enabled when TLS 1.3 is negotiated. + items: + type: string + type: array + x-kubernetes-list-type: atomic + minTLSVersion: + description: |- + minTLSVersion is used to specify the minimal version of the TLS protocol + that is negotiated during the TLS handshake. For example, to use TLS + versions 1.1, 1.2 and 1.3 (yaml): + + minTLSVersion: VersionTLS11 + enum: + - VersionTLS10 + - VersionTLS11 + - VersionTLS12 + - VersionTLS13 + type: string + type: object + intermediate: + description: |- + intermediate is a TLS profile for use when you do not need compatibility with + legacy clients and want to remain highly secure while being compatible with + most clients currently in use. + + The supported groups list includes by default the following groups + in suggested preference order (ordering may not be honored by all implementations): + X25519MLKEM768, X25519, secp256r1, secp384r1. + + This profile is equivalent to a Custom profile specified as: + minTLSVersion: VersionTLS12 + ciphers: + - TLS_AES_128_GCM_SHA256 + - TLS_AES_256_GCM_SHA384 + - TLS_CHACHA20_POLY1305_SHA256 + - ECDHE-ECDSA-AES128-GCM-SHA256 + - ECDHE-RSA-AES128-GCM-SHA256 + - ECDHE-ECDSA-AES256-GCM-SHA384 + - ECDHE-RSA-AES256-GCM-SHA384 + - ECDHE-ECDSA-CHACHA20-POLY1305 + - ECDHE-RSA-CHACHA20-POLY1305 + nullable: true + type: object + modern: + description: |- + modern is a TLS security profile for use with clients that support TLS 1.3 and + do not need backward compatibility for older clients. + The supported groups list includes by default the following groups + in suggested preference order (ordering may not be honored by all implementations): + X25519MLKEM768, X25519, secp256r1, secp384r1. + This profile is equivalent to a Custom profile specified as: + minTLSVersion: VersionTLS13 + ciphers: + - TLS_AES_128_GCM_SHA256 + - TLS_AES_256_GCM_SHA384 + - TLS_CHACHA20_POLY1305_SHA256 + nullable: true + type: object + old: + description: |- + old is a TLS profile for use when services need to be accessed by very old + clients or libraries and should be used only as a last resort. + + The supported groups list includes by default the following groups + in suggested preference order (ordering may not be honored by all implementations): + X25519MLKEM768, X25519, secp256r1, secp384r1. + + This profile is equivalent to a Custom profile specified as: + minTLSVersion: VersionTLS10 + ciphers: + - TLS_AES_128_GCM_SHA256 + - TLS_AES_256_GCM_SHA384 + - TLS_CHACHA20_POLY1305_SHA256 + - ECDHE-ECDSA-AES128-GCM-SHA256 + - ECDHE-RSA-AES128-GCM-SHA256 + - ECDHE-ECDSA-AES256-GCM-SHA384 + - ECDHE-RSA-AES256-GCM-SHA384 + - ECDHE-ECDSA-CHACHA20-POLY1305 + - ECDHE-RSA-CHACHA20-POLY1305 + - ECDHE-ECDSA-AES128-SHA256 + - ECDHE-RSA-AES128-SHA256 + - ECDHE-ECDSA-AES128-SHA + - ECDHE-RSA-AES128-SHA + - ECDHE-ECDSA-AES256-SHA384 + - ECDHE-RSA-AES256-SHA384 + - ECDHE-ECDSA-AES256-SHA + - ECDHE-RSA-AES256-SHA + - AES128-GCM-SHA256 + - AES256-GCM-SHA384 + - AES128-SHA256 + - AES256-SHA256 + - AES128-SHA + - AES256-SHA + - DES-CBC3-SHA + nullable: true + type: object + type: + description: |- + type is one of Old, Intermediate, Modern or Custom. Custom provides the + ability to specify individual TLS security profile parameters. + + The cipher and groups lists in these profiles are based on version 5.8 of the + Mozilla Server Side TLS configuration guidelines. + See: https://ssl-config.mozilla.org/guidelines/5.8.json + + The groups are listed in suggested preference order, with the most preferred group first. + Note that not all platform components honor the ordering: Go-based components use Go's + internal preference order and treat this list as a filter of allowed groups rather than + an ordered preference. + Note that X25519MLKEM768 is a post-quantum hybrid group that is not + FIPS-approved and should be ignored by components running in FIPS mode. + + The profiles are intent based, so they may change over time as new ciphers are + developed and existing ciphers are found to be insecure. Depending on + precisely which ciphers are available to a process, the list may be reduced. + enum: + - Old + - Intermediate + - Modern + - Custom + type: string + type: object + type: object + status: + description: status contains observed information about the kubelet configuration. + properties: + conditions: + description: conditions represents the latest available observations + of current state. + items: + description: KubeletConfigCondition defines the state of the KubeletConfig + properties: + lastTransitionTime: + description: lastTransitionTime is the time of the last update + to the current status object. + format: date-time + nullable: true + type: string + message: + description: |- + message provides additional information about the current condition. + This is only to be consumed by humans. + type: string + reason: + description: reason is the reason for the condition's last transition. Reasons + are PascalCase + type: string + status: + description: status of the condition, one of True, False, Unknown. + type: string + type: + description: type specifies the state of the operator's reconciliation + functionality. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + observedGeneration: + description: observedGeneration represents the generation observed + by the controller. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index 51257aabdf6..153f09886fd 100644 --- a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -251,6 +251,7 @@ var map_KubeletConfigSpec = map[string]string{ "machineConfigPoolSelector": "machineConfigPoolSelector selects which pools the KubeletConfig should apply to. When omitted or set to an empty selector {}, no pools are selected, which is equivalent to not matching any MachineConfigPool.", "kubeletConfig": "kubeletConfig contains upstream Kubernetes kubelet configuration fields. Values are validated by the kubelet itself. Invalid values may render nodes unusable. Refer to OpenShift documentation for the Kubernetes version corresponding to your OpenShift release to find valid kubelet configuration options.", "tlsSecurityProfile": "tlsSecurityProfile configures TLS settings for the kubelet. When omitted, the TLS configuration defaults to the value from apiservers.config.openshift.io/cluster. When specified, the type field can be set to either \"Old\", \"Intermediate\", \"Modern\", \"Custom\" or omitted for backward compatibility.", + "systemGomaxprocsBehavior": "systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", the GOMAXPROCS environment variable for kubelet and CRI-O is set to max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to \"Disabled\", automatic GOMAXPROCS configuration is disabled and the system services use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".", } func (KubeletConfigSpec) SwaggerDoc() map[string]string { diff --git a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml index a3e3f4ba1d5..7aa48dd4640 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml @@ -123,6 +123,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + systemGomaxprocsBehavior: + description: |- + systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + services based on their CPU allocation rather than total node capacity. + When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + enum: + - Autosize + - Disabled + type: string tlsSecurityProfile: description: |- tlsSecurityProfile configures TLS settings for the kubelet. diff --git a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml index 5f76118f194..162aeb4255a 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml @@ -123,6 +123,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + systemGomaxprocsBehavior: + description: |- + systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + services based on their CPU allocation rather than total node capacity. + When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + enum: + - Autosize + - Disabled + type: string tlsSecurityProfile: description: |- tlsSecurityProfile configures TLS settings for the kubelet. diff --git a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml index af17f6f69b1..23746abb3d2 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml @@ -123,6 +123,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + systemGomaxprocsBehavior: + description: |- + systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + Valid values are "Autosize" and "Disabled". + When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + services based on their CPU allocation rather than total node capacity. + When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + The current default is "Disabled". + enum: + - Autosize + - Disabled + type: string tlsSecurityProfile: description: |- tlsSecurityProfile configures TLS settings for the kubelet. From 2cee386cfdcf4c00938f0683cc4555d5120944a8 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Tue, 14 Jul 2026 14:17:59 -0400 Subject: [PATCH 3/3] Fix GOMAXPROCS default behavior wording for Go 1.25+ Remove inaccurate parenthetical claiming GOMAXPROCS defaults to the number of CPUs on the node, which is no longer true with Go 1.25's container-aware runtime. Co-Authored-By: Claude Opus 4.6 --- machineconfiguration/v1/types.go | 5 ++--- ...onfig_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml | 3 +-- ...g_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml | 3 +-- ..._01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml | 3 +-- ...machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml | 2 +- ...ine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml | 2 +- ...ne-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml | 2 +- .../GomaxprocsInjection.yaml | 3 +-- .../GomaxprocsInjection.yaml | 2 +- .../v1/zz_generated.swagger_doc_generated.go | 4 ++-- ...onfig_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml | 3 +-- ...g_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml | 3 +-- ..._01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml | 3 +-- ...machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml | 2 +- ...ine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml | 2 +- ...ne-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml | 2 +- 16 files changed, 18 insertions(+), 26 deletions(-) diff --git a/machineconfiguration/v1/types.go b/machineconfiguration/v1/types.go index 2ee516a55a1..ab16ad0631f 100644 --- a/machineconfiguration/v1/types.go +++ b/machineconfiguration/v1/types.go @@ -776,7 +776,7 @@ type KubeletConfigSpec struct { // max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system // services based on their CPU allocation rather than total node capacity. // When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - // use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + // use Go's default GOMAXPROCS behavior. // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. // The current default is "Disabled". // @@ -985,8 +985,7 @@ type ContainerRuntimeConfiguration struct { // When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, // calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism // based on the allocated CPU resources rather than the total node capacity. - // When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - // (GOMAXPROCS equals the number of CPUs available on the node). + // When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. // The current default is "Disabled". // diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml index 8499ae8c7f3..559130acb54 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml @@ -192,8 +192,7 @@ spec: When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. - When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - (GOMAXPROCS equals the number of CPUs available on the node). + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml index 009c663277a..7c355c24187 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml @@ -192,8 +192,7 @@ spec: When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. - When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - (GOMAXPROCS equals the number of CPUs available on the node). + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml index 61cf855bb37..6579f15140d 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml @@ -192,8 +192,7 @@ spec: When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. - When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - (GOMAXPROCS equals the number of CPUs available on the node). + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml index 7aa48dd4640..3c3fbc06176 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml @@ -132,7 +132,7 @@ spec: max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". enum: diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml index 162aeb4255a..a3165d1d83c 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml @@ -132,7 +132,7 @@ spec: max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". enum: diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml index 23746abb3d2..23fec954d39 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml @@ -132,7 +132,7 @@ spec: max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". enum: diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml index df0540043ab..24031e5743e 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml @@ -61,8 +61,7 @@ spec: When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. - When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - (GOMAXPROCS equals the number of CPUs available on the node). + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml index d06d4038cf8..fae4842ea48 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml @@ -132,7 +132,7 @@ spec: max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". enum: diff --git a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index 153f09886fd..7e90cea5a74 100644 --- a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -110,7 +110,7 @@ var map_ContainerRuntimeConfiguration = map[string]string{ "additionalLayerStores": "additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images.\n\nLayers are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 5 stores allowed. Each path must be unique.\n\nWhen omitted, only the default layer location is used. When specified, at least one store must be provided.", "additionalImageStores": "additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images.\n\nImages are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default image location is used. When specified, at least one store must be provided.", "additionalArtifactStores": "additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts.\n\nArtifacts are checked in order: additional stores first, then the default location (/var/lib/containers/storage/artifacts). Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default artifact location is used. When specified, at least one store must be provided.", - "containerGomaxprocsBehavior": "containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers based on their CPU resource requests. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. When set to \"Disabled\", GOMAXPROCS injection is disabled and containers will use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".\n\nContainers can override the injected GOMAXPROCS value by: - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) - Setting GOMAXPROCS in the pod spec (env or envFrom) - Calling runtime.GOMAXPROCS() programmatically in Go code - Adding the skip-gomaxprocs.crio.io annotation to the pod", + "containerGomaxprocsBehavior": "containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers based on their CPU resource requests. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. When set to \"Disabled\", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".\n\nContainers can override the injected GOMAXPROCS value by: - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) - Setting GOMAXPROCS in the pod spec (env or envFrom) - Calling runtime.GOMAXPROCS() programmatically in Go code - Adding the skip-gomaxprocs.crio.io annotation to the pod", } func (ContainerRuntimeConfiguration) SwaggerDoc() map[string]string { @@ -251,7 +251,7 @@ var map_KubeletConfigSpec = map[string]string{ "machineConfigPoolSelector": "machineConfigPoolSelector selects which pools the KubeletConfig should apply to. When omitted or set to an empty selector {}, no pools are selected, which is equivalent to not matching any MachineConfigPool.", "kubeletConfig": "kubeletConfig contains upstream Kubernetes kubelet configuration fields. Values are validated by the kubelet itself. Invalid values may render nodes unusable. Refer to OpenShift documentation for the Kubernetes version corresponding to your OpenShift release to find valid kubelet configuration options.", "tlsSecurityProfile": "tlsSecurityProfile configures TLS settings for the kubelet. When omitted, the TLS configuration defaults to the value from apiservers.config.openshift.io/cluster. When specified, the type field can be set to either \"Old\", \"Intermediate\", \"Modern\", \"Custom\" or omitted for backward compatibility.", - "systemGomaxprocsBehavior": "systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", the GOMAXPROCS environment variable for kubelet and CRI-O is set to max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to \"Disabled\", automatic GOMAXPROCS configuration is disabled and the system services use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".", + "systemGomaxprocsBehavior": "systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", the GOMAXPROCS environment variable for kubelet and CRI-O is set to max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to \"Disabled\", automatic GOMAXPROCS configuration is disabled and the system services use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".", } func (KubeletConfigSpec) SwaggerDoc() map[string]string { diff --git a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml index 8499ae8c7f3..559130acb54 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml @@ -192,8 +192,7 @@ spec: When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. - When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - (GOMAXPROCS equals the number of CPUs available on the node). + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". diff --git a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml index 009c663277a..7c355c24187 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml @@ -192,8 +192,7 @@ spec: When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. - When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - (GOMAXPROCS equals the number of CPUs available on the node). + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". diff --git a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml index 61cf855bb37..6579f15140d 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml @@ -192,8 +192,7 @@ spec: When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. - When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default behavior - (GOMAXPROCS equals the number of CPUs available on the node). + When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". diff --git a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml index 7aa48dd4640..3c3fbc06176 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml @@ -132,7 +132,7 @@ spec: max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". enum: diff --git a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml index 162aeb4255a..a3165d1d83c 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-DevPreviewNoUpgrade.crd.yaml @@ -132,7 +132,7 @@ spec: max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". enum: diff --git a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml index 23746abb3d2..23fec954d39 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-TechPreviewNoUpgrade.crd.yaml @@ -132,7 +132,7 @@ spec: max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services - use Go's default behavior (GOMAXPROCS equals the number of CPUs available on the node). + use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is "Disabled". enum: