Skip to content

Commit a263347

Browse files
OCPNODE-3372: Remove omitempty from defaultRuntime as its handled in MCO with additional test cases
1 parent 3cc10b2 commit a263347

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

machineconfiguration/v1/tests/containerruntimeconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "ContainerRuntimeConfig"
33
crdName: containerruntimeconfigs.machineconfiguration.openshift.io
44
tests:
55
onCreate:
6-
- name: Should be able to create a minimal ContainerRuntimeConfig and default runtime set
6+
- name: Should be able to create a minimal ContainerRuntimeConfig
77
initial: |
88
apiVersion: machineconfiguration.openshift.io/v1
99
kind: ContainerRuntimeConfig
@@ -14,4 +14,4 @@ tests:
1414
kind: ContainerRuntimeConfig
1515
spec:
1616
containerRuntimeConfig:
17-
defaultRuntime: ""
17+
defaultRuntime: crun

machineconfiguration/v1/types.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -845,15 +845,14 @@ type ContainerRuntimeConfiguration struct {
845845
OverlaySize *resource.Quantity `json:"overlaySize,omitempty"`
846846

847847
// defaultRuntime is the name of the OCI runtime to be used as the default for containers.
848-
// Allowed values are `runc`, `crun`, and omitted (`""`).
848+
// Allowed values are `runc` and `crun`.
849849
// When set to `runc`, OpenShift will use runc to execute the container
850850
// When set to `crun`, OpenShift will use crun to execute the container
851851
// When omitted, this means no opinion and the platform is left to choose a reasonable default,
852852
// which is subject to change over time. Currently, the default is `crun`.
853-
// +kubebuilder:validation:Enum=crun;runc;""
854-
// +kubebuilder:default:=""
853+
// +kubebuilder:validation:Enum=crun;runc
855854
// +optional
856-
DefaultRuntime ContainerRuntimeDefaultRuntime `json:"defaultRuntime"`
855+
DefaultRuntime ContainerRuntimeDefaultRuntime `json:"defaultRuntime,omitempty"`
857856
}
858857

859858
type ContainerRuntimeDefaultRuntime string

machineconfiguration/v1/zz_generated.swagger_doc_generated.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)