From c5bc98cdeb8fd308e86c2545a6eb7ca0c499eddf Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 22 Jul 2026 16:01:20 -0400 Subject: [PATCH 1/2] Add container-level GOMAXPROCS injection support Co-Authored-By: Claude Opus 4.6 --- features.md | 1 + features/features.go | 8 + .../GomaxprocsInjection.yaml | 55 +++ machineconfiguration/v1/types.go | 32 ++ ...erruntimeconfigs-CustomNoUpgrade.crd.yaml} | 22 ++ ...1_containerruntimeconfigs-Default.crd.yaml | 197 ++++++++++ ...untimeconfigs-DevPreviewNoUpgrade.crd.yaml | 349 ++++++++++++++++++ ...ig_01_containerruntimeconfigs-OKD.crd.yaml | 197 ++++++++++ ...ntimeconfigs-TechPreviewNoUpgrade.crd.yaml | 349 ++++++++++++++++++ ..._generated.featuregated-crd-manifests.yaml | 1 + .../GomaxprocsInjection.yaml | 218 +++++++++++ .../v1/zz_generated.swagger_doc_generated.go | 19 +- ...erruntimeconfigs-CustomNoUpgrade.crd.yaml} | 22 ++ ...1_containerruntimeconfigs-Default.crd.yaml | 197 ++++++++++ ...untimeconfigs-DevPreviewNoUpgrade.crd.yaml | 349 ++++++++++++++++++ ...ig_01_containerruntimeconfigs-OKD.crd.yaml | 197 ++++++++++ ...ntimeconfigs-TechPreviewNoUpgrade.crd.yaml | 349 ++++++++++++++++++ .../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 + 25 files changed, 2577 insertions(+), 9 deletions(-) create mode 100644 machineconfiguration/v1/tests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml rename machineconfiguration/v1/zz_generated.crd-manifests/{0000_80_machine-config_01_containerruntimeconfigs.crd.yaml => 0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml} (91%) create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-Default.crd.yaml create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml rename payload-manifests/crds/{0000_80_machine-config_01_containerruntimeconfigs.crd.yaml => 0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml} (91%) create mode 100644 payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-Default.crd.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml diff --git a/features.md b/features.md index c89925276f6..fe292b43a16 100644 --- a/features.md +++ b/features.md @@ -63,6 +63,7 @@ | GCPCustomAPIEndpointsInstall| | | Enabled | Enabled | | | Enabled | Enabled | | GCPDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | | GatewayAPIManagementMode| | | 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 591b6147b1b..a8667357d63 100644 --- a/features/features.go +++ b/features/features.go @@ -1068,4 +1068,12 @@ var ( enhancementPR("https://github.com/openshift/enhancements/pull/2007"). enable(inClusterProfile(SelfManaged), inDevPreviewNoUpgrade()). mustRegister() + + FeatureGateGomaxprocsInjection = newFeatureGate("GomaxprocsInjection"). + reportProblemsToJiraComponent("node"). + contactPerson("haircommander"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/2047"). + enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). + mustRegister() ) diff --git a/machineconfiguration/v1/tests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml b/machineconfiguration/v1/tests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml new file mode 100644 index 00000000000..913bab9076c --- /dev/null +++ b/machineconfiguration/v1/tests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml @@ -0,0 +1,55 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "ContainerRuntimeConfig" +crdName: containerruntimeconfigs.machineconfiguration.openshift.io +featureGates: +- GomaxprocsInjection +tests: + onCreate: + - name: Should be able to create ContainerRuntimeConfig with containerGomaxprocsBehavior set to Autosize + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: ContainerRuntimeConfig + spec: + containerRuntimeConfig: + containerGomaxprocsBehavior: Autosize + expected: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: ContainerRuntimeConfig + spec: + containerRuntimeConfig: + containerGomaxprocsBehavior: Autosize + + - name: Should be able to create ContainerRuntimeConfig with containerGomaxprocsBehavior set to Disabled + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: ContainerRuntimeConfig + spec: + containerRuntimeConfig: + containerGomaxprocsBehavior: Disabled + expected: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: ContainerRuntimeConfig + spec: + containerRuntimeConfig: + containerGomaxprocsBehavior: Disabled + + - name: Should fail if containerGomaxprocsBehavior has an invalid value + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: ContainerRuntimeConfig + spec: + containerRuntimeConfig: + containerGomaxprocsBehavior: Enabled + expectedError: "spec.containerRuntimeConfig.containerGomaxprocsBehavior: Unsupported value" + + - name: Should be able to create ContainerRuntimeConfig without containerGomaxprocsBehavior + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: ContainerRuntimeConfig + spec: + containerRuntimeConfig: {} + expected: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: ContainerRuntimeConfig + spec: + containerRuntimeConfig: {} diff --git a/machineconfiguration/v1/types.go b/machineconfiguration/v1/types.go index 5c4f6804eea..227b781c6c5 100644 --- a/machineconfiguration/v1/types.go +++ b/machineconfiguration/v1/types.go @@ -781,6 +781,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 @@ -975,6 +976,26 @@ 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 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". + // + // 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 + ContainerGomaxprocsBehavior GomaxprocsBehaviorType `json:"containerGomaxprocsBehavior,omitempty"` } type ContainerRuntimeDefaultRuntime string @@ -987,6 +1008,17 @@ const ( ContainerRuntimeDefaultRuntimeDefault = ContainerRuntimeDefaultRuntimeCrun ) +// GomaxprocsBehaviorType specifies the GOMAXPROCS auto-sizing behavior +// +kubebuilder:validation:Enum=Autosize;Disabled +type GomaxprocsBehaviorType string + +const ( + // GomaxprocsBehaviorAutosize enables automatic GOMAXPROCS configuration + GomaxprocsBehaviorAutosize GomaxprocsBehaviorType = "Autosize" + // GomaxprocsBehaviorDisabled disables automatic GOMAXPROCS configuration + GomaxprocsBehaviorDisabled GomaxprocsBehaviorType = "Disabled" +) + // 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.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml similarity index 91% rename from machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs.crd.yaml rename to machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml index a1c686ee5e1..559130acb54 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml @@ -6,6 +6,7 @@ metadata: api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: CustomNoUpgrade labels: openshift.io/operator-managed: "" name: containerruntimeconfigs.machineconfiguration.openshift.io @@ -183,6 +184,27 @@ 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 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". + + 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-Default.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-Default.crd.yaml new file mode 100644 index 00000000000..a983664180f --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-Default.crd.yaml @@ -0,0 +1,197 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: Default + 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: + 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.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 new file mode 100644 index 00000000000..7c355c24187 --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml @@ -0,0 +1,349 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: DevPreviewNoUpgrade + 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: + additionalArtifactStores: + description: |- + additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts. + + Artifacts 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. + + When omitted, only the default artifact location is used. + When specified, at least one store must be provided. + items: + description: AdditionalArtifactStore defines an additional read-only + storage location for Open Container Initiative (OCI) artifacts. + properties: + path: + description: |- + path specifies the absolute location of the additional artifact store. + The path must exist on the node before configuration is applied. + When an artifact is requested, artifacts found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalArtifactStores must not contain duplicate + paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalImageStores: + description: |- + additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images. + + Images 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. + + When omitted, only the default image location is used. + When specified, at least one store must be provided. + items: + description: AdditionalImageStore defines an additional read-only + storage location for Open Container Initiative (OCI) images. + properties: + path: + description: |- + path specifies the absolute location of the additional image store. + The path must exist on the node before configuration is applied. + When a container image is requested, images found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalImageStores must not contain duplicate paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalLayerStores: + description: |- + additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images. + + Layers 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. + + When omitted, only the default layer location is used. + When specified, at least one store must be provided. + items: + description: AdditionalLayerStore defines a read-only storage + location for Open Container Initiative (OCI) container image + layers. + properties: + path: + description: |- + path specifies the absolute location of the additional layer store. + The path must exist on the node before configuration is applied. + When a container image is requested, layers found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + 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 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". + + 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.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml new file mode 100644 index 00000000000..db82f1a1418 --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml @@ -0,0 +1,197 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: OKD + 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: + 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.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 new file mode 100644 index 00000000000..6579f15140d --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,349 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + 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: + additionalArtifactStores: + description: |- + additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts. + + Artifacts 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. + + When omitted, only the default artifact location is used. + When specified, at least one store must be provided. + items: + description: AdditionalArtifactStore defines an additional read-only + storage location for Open Container Initiative (OCI) artifacts. + properties: + path: + description: |- + path specifies the absolute location of the additional artifact store. + The path must exist on the node before configuration is applied. + When an artifact is requested, artifacts found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalArtifactStores must not contain duplicate + paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalImageStores: + description: |- + additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images. + + Images 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. + + When omitted, only the default image location is used. + When specified, at least one store must be provided. + items: + description: AdditionalImageStore defines an additional read-only + storage location for Open Container Initiative (OCI) images. + properties: + path: + description: |- + path specifies the absolute location of the additional image store. + The path must exist on the node before configuration is applied. + When a container image is requested, images found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalImageStores must not contain duplicate paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalLayerStores: + description: |- + additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images. + + Layers 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. + + When omitted, only the default layer location is used. + When specified, at least one store must be provided. + items: + description: AdditionalLayerStore defines a read-only storage + location for Open Container Initiative (OCI) container image + layers. + properties: + path: + description: |- + path specifies the absolute location of the additional layer store. + The path must exist on the node before configuration is applied. + When a container image is requested, layers found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + 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 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". + + 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.featuregated-crd-manifests.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index 7e977bb53b9..80331f9245e 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..24031e5743e --- /dev/null +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/containerruntimeconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml @@ -0,0 +1,218 @@ +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 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". + + 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 198c2b9a6de..39feed15cc0 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 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 { diff --git a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml similarity index 91% rename from payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs.crd.yaml rename to payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml index a1c686ee5e1..559130acb54 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-CustomNoUpgrade.crd.yaml @@ -6,6 +6,7 @@ metadata: api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: CustomNoUpgrade labels: openshift.io/operator-managed: "" name: containerruntimeconfigs.machineconfiguration.openshift.io @@ -183,6 +184,27 @@ 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 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". + + 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-Default.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-Default.crd.yaml new file mode 100644 index 00000000000..a983664180f --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-Default.crd.yaml @@ -0,0 +1,197 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: Default + 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: + 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/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 new file mode 100644 index 00000000000..7c355c24187 --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-DevPreviewNoUpgrade.crd.yaml @@ -0,0 +1,349 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: DevPreviewNoUpgrade + 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: + additionalArtifactStores: + description: |- + additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts. + + Artifacts 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. + + When omitted, only the default artifact location is used. + When specified, at least one store must be provided. + items: + description: AdditionalArtifactStore defines an additional read-only + storage location for Open Container Initiative (OCI) artifacts. + properties: + path: + description: |- + path specifies the absolute location of the additional artifact store. + The path must exist on the node before configuration is applied. + When an artifact is requested, artifacts found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalArtifactStores must not contain duplicate + paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalImageStores: + description: |- + additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images. + + Images 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. + + When omitted, only the default image location is used. + When specified, at least one store must be provided. + items: + description: AdditionalImageStore defines an additional read-only + storage location for Open Container Initiative (OCI) images. + properties: + path: + description: |- + path specifies the absolute location of the additional image store. + The path must exist on the node before configuration is applied. + When a container image is requested, images found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalImageStores must not contain duplicate paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalLayerStores: + description: |- + additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images. + + Layers 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. + + When omitted, only the default layer location is used. + When specified, at least one store must be provided. + items: + description: AdditionalLayerStore defines a read-only storage + location for Open Container Initiative (OCI) container image + layers. + properties: + path: + description: |- + path specifies the absolute location of the additional layer store. + The path must exist on the node before configuration is applied. + When a container image is requested, layers found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + 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 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". + + 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/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml new file mode 100644 index 00000000000..db82f1a1418 --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-OKD.crd.yaml @@ -0,0 +1,197 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: OKD + 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: + 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/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 new file mode 100644 index 00000000000..6579f15140d --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_containerruntimeconfigs-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,349 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + 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: + additionalArtifactStores: + description: |- + additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts. + + Artifacts 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. + + When omitted, only the default artifact location is used. + When specified, at least one store must be provided. + items: + description: AdditionalArtifactStore defines an additional read-only + storage location for Open Container Initiative (OCI) artifacts. + properties: + path: + description: |- + path specifies the absolute location of the additional artifact store. + The path must exist on the node before configuration is applied. + When an artifact is requested, artifacts found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalArtifactStores must not contain duplicate + paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalImageStores: + description: |- + additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images. + + Images 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. + + When omitted, only the default image location is used. + When specified, at least one store must be provided. + items: + description: AdditionalImageStore defines an additional read-only + storage location for Open Container Initiative (OCI) images. + properties: + path: + description: |- + path specifies the absolute location of the additional image store. + The path must exist on the node before configuration is applied. + When a container image is requested, images found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 10 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + x-kubernetes-validations: + - message: additionalImageStores must not contain duplicate paths + rule: self.all(x, self.exists_one(y, x.path == y.path)) + additionalLayerStores: + description: |- + additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images. + + Layers 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. + + When omitted, only the default layer location is used. + When specified, at least one store must be provided. + items: + description: AdditionalLayerStore defines a read-only storage + location for Open Container Initiative (OCI) container image + layers. + properties: + path: + description: |- + path specifies the absolute location of the additional layer store. + The path must exist on the node before configuration is applied. + When a container image is requested, layers found at this location will be used instead of + retrieving from the registry. + The path is required and 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. + maxLength: 256 + minLength: 1 + type: string + x-kubernetes-validations: + - message: path must be absolute and contain only alphanumeric + characters, '/', '.', '_', and '-' + rule: self.matches('^/[a-zA-Z0-9/._-]+$') + - message: path must not contain consecutive forward slashes + rule: '!self.contains(''//'')' + required: + - path + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-type: atomic + 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 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". + + 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/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml b/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml index 292c3dd7f37..cdc0a7124d5 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml @@ -155,6 +155,9 @@ { "name": "GatewayAPIManagementMode" }, + { + "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 870d6c20a94..bf71d6e2492 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml @@ -249,6 +249,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 d6089ff7acd..83574a05be7 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml @@ -157,6 +157,9 @@ { "name": "GatewayAPIManagementMode" }, + { + "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 de7954d1d43..3e113ec9cad 100644 --- a/payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml @@ -258,6 +258,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 493f2840256..69e16f2821d 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": "GatewayAPIManagementMode" }, + { + "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 a1050ca6736..0131a4700e9 100644 --- a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml @@ -222,6 +222,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 6a7972dc6c9..3ce136e46f5 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": "GatewayAPIManagementMode" }, + { + "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 7e40f034e57..cc7d47d0cd6 100644 --- a/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml @@ -237,6 +237,9 @@ { "name": "GatewayAPIWithoutOLM" }, + { + "name": "GomaxprocsInjection" + }, { "name": "ImageModeStatusReporting" }, From c18dffb4116033304b34edc1a7dec4e59f2cdf07 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 22 Jul 2026 16:31:13 -0400 Subject: [PATCH 2/2] Add system service-level GOMAXPROCS configuration support Co-Authored-By: Claude Opus 4.6 --- .../GomaxprocsInjection.yaml | 48 +++ machineconfiguration/v1/types.go | 14 + ...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 + 11 files changed, 504 insertions(+) create mode 100644 machineconfiguration/v1/tests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml create mode 100644 machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml diff --git a/machineconfiguration/v1/tests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml b/machineconfiguration/v1/tests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml new file mode 100644 index 00000000000..a118104d5ee --- /dev/null +++ b/machineconfiguration/v1/tests/kubeletconfigs.machineconfiguration.openshift.io/GomaxprocsInjection.yaml @@ -0,0 +1,48 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "KubeletConfig" +crdName: kubeletconfigs.machineconfiguration.openshift.io +featureGates: +- GomaxprocsInjection +tests: + onCreate: + - name: Should be able to create KubeletConfig with systemGomaxprocsBehavior set to Autosize + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: KubeletConfig + spec: + systemGomaxprocsBehavior: Autosize + expected: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: KubeletConfig + spec: + systemGomaxprocsBehavior: Autosize + + - name: Should be able to create KubeletConfig with systemGomaxprocsBehavior set to Disabled + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: KubeletConfig + spec: + systemGomaxprocsBehavior: Disabled + expected: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: KubeletConfig + spec: + systemGomaxprocsBehavior: Disabled + + - name: Should fail if systemGomaxprocsBehavior has an invalid value + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: KubeletConfig + spec: + systemGomaxprocsBehavior: Enabled + expectedError: "spec.systemGomaxprocsBehavior: Unsupported value" + + - name: Should be able to create KubeletConfig without systemGomaxprocsBehavior + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: KubeletConfig + spec: {} + expected: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: KubeletConfig + spec: {} diff --git a/machineconfiguration/v1/types.go b/machineconfiguration/v1/types.go index 227b781c6c5..7720ef3e3ba 100644 --- a/machineconfiguration/v1/types.go +++ b/machineconfiguration/v1/types.go @@ -782,6 +782,20 @@ 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 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". + // + // +openshift:enable:FeatureGate=GomaxprocsInjection + // +optional + SystemGomaxprocsBehavior GomaxprocsBehaviorType `json:"systemGomaxprocsBehavior,omitempty"` } // KubeletConfigStatus defines the observed state of a KubeletConfig 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..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 @@ -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 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: + - 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..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 @@ -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 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: + - 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..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 @@ -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 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: + - 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 80331f9245e..de128886a35 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -90,6 +90,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..fae4842ea48 --- /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 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: + - 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 39feed15cc0..2e76f9a83a4 100644 --- a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -252,6 +252,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 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_kubeletconfigs-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs-CustomNoUpgrade.crd.yaml index a3e3f4ba1d5..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 @@ -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 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: + - 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..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 @@ -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 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: + - 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..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 @@ -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 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: + - Autosize + - Disabled + type: string tlsSecurityProfile: description: |- tlsSecurityProfile configures TLS settings for the kubelet.