Skip to content

Commit d2e777c

Browse files
committed
Remove deprecated defaultRuntime and initContainer
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
1 parent 2a8a94d commit d2e777c

9 files changed

Lines changed: 1 addition & 161 deletions

File tree

api/nvidia/v1/clusterpolicy_types.go

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,8 @@ type DCGMExporterServiceMonitorConfig = ServiceMonitorConfig
184184

185185
// OperatorSpec describes configuration options for the operator
186186
type OperatorSpec struct {
187-
// Deprecated: DefaultRuntime is no longer used by the gpu-operator. This is instead, detected at runtime.
188-
// +optional
189-
DefaultRuntime Runtime `json:"defaultRuntime,omitempty"`
190187
// +kubebuilder:default=nvidia
191-
RuntimeClass string `json:"runtimeClass,omitempty"`
192-
InitContainer InitContainerSpec `json:"initContainer,omitempty"`
188+
RuntimeClass string `json:"runtimeClass,omitempty"`
193189

194190
// Optional: Map of string keys and values that can be used to organize and categorize
195191
// (scope and select) objects. May match selectors of replication controllers
@@ -328,30 +324,6 @@ type DaemonsetsSpec struct {
328324
PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
329325
}
330326

331-
// Deprecated: InitContainerSpec describes configuration for initContainer image used with all components
332-
type InitContainerSpec struct {
333-
// Repository represents image repository path
334-
Repository string `json:"repository,omitempty"`
335-
336-
// Image represents image name
337-
// +kubebuilder:validation:Pattern=[a-zA-Z0-9\-]+
338-
Image string `json:"image,omitempty"`
339-
340-
// Version represents image tag(version)
341-
Version string `json:"version,omitempty"`
342-
343-
// Image pull policy
344-
// +kubebuilder:validation:Optional
345-
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
346-
347-
// Image pull secrets
348-
// +kubebuilder:validation:Optional
349-
// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
350-
// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Image pull secrets"
351-
// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:io.kubernetes:Secret"
352-
ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
353-
}
354-
355327
// ValidatorSpec describes configuration options for validation pod
356328
type ValidatorSpec struct {
357329
// Plugin validator spec
@@ -2114,9 +2086,6 @@ func ImagePath(spec interface{}) (string, error) {
21142086
case *ValidatorSpec:
21152087
config := spec.(*ValidatorSpec)
21162088
return imagePath(config.Repository, config.Image, config.Version, "VALIDATOR_IMAGE")
2117-
case *InitContainerSpec:
2118-
config := spec.(*InitContainerSpec)
2119-
return imagePath(config.Repository, config.Image, config.Version, "CUDA_BASE_IMAGE")
21202089
case *MIGManagerSpec:
21212090
config := spec.(*MIGManagerSpec)
21222091
return imagePath(config.Repository, config.Image, config.Version, "MIG_MANAGER_IMAGE")

api/nvidia/v1/zz_generated.deepcopy.go

Lines changed: 0 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/manifests/nvidia.com_clusterpolicies.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,33 +1958,6 @@ spec:
19581958
set by external tools to store and retrieve arbitrary metadata. They are not
19591959
queryable and should be preserved when modifying objects.
19601960
type: object
1961-
defaultRuntime:
1962-
description: 'Deprecated: DefaultRuntime is no longer used by
1963-
the gpu-operator. This is instead, detected at runtime.'
1964-
type: string
1965-
initContainer:
1966-
description: 'Deprecated: InitContainerSpec describes configuration
1967-
for initContainer image used with all components'
1968-
properties:
1969-
image:
1970-
description: Image represents image name
1971-
pattern: '[a-zA-Z0-9\-]+'
1972-
type: string
1973-
imagePullPolicy:
1974-
description: Image pull policy
1975-
type: string
1976-
imagePullSecrets:
1977-
description: Image pull secrets
1978-
items:
1979-
type: string
1980-
type: array
1981-
repository:
1982-
description: Repository represents image repository path
1983-
type: string
1984-
version:
1985-
description: Version represents image tag(version)
1986-
type: string
1987-
type: object
19881961
labels:
19891962
additionalProperties:
19901963
type: string

config/crd/bases/nvidia.com_clusterpolicies.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,33 +1958,6 @@ spec:
19581958
set by external tools to store and retrieve arbitrary metadata. They are not
19591959
queryable and should be preserved when modifying objects.
19601960
type: object
1961-
defaultRuntime:
1962-
description: 'Deprecated: DefaultRuntime is no longer used by
1963-
the gpu-operator. This is instead, detected at runtime.'
1964-
type: string
1965-
initContainer:
1966-
description: 'Deprecated: InitContainerSpec describes configuration
1967-
for initContainer image used with all components'
1968-
properties:
1969-
image:
1970-
description: Image represents image name
1971-
pattern: '[a-zA-Z0-9\-]+'
1972-
type: string
1973-
imagePullPolicy:
1974-
description: Image pull policy
1975-
type: string
1976-
imagePullSecrets:
1977-
description: Image pull secrets
1978-
items:
1979-
type: string
1980-
type: array
1981-
repository:
1982-
description: Repository represents image repository path
1983-
type: string
1984-
version:
1985-
description: Version represents image tag(version)
1986-
type: string
1987-
type: object
19881961
labels:
19891962
additionalProperties:
19901963
type: string

config/samples/v1_clusterpolicy.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ metadata:
55
spec:
66
operator:
77
runtimeClass: nvidia
8-
initContainer: {}
98
use_ocp_driver_toolkit: true
109

1110
psp:

deployments/gpu-operator/crds/nvidia.com_clusterpolicies.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,33 +1958,6 @@ spec:
19581958
set by external tools to store and retrieve arbitrary metadata. They are not
19591959
queryable and should be preserved when modifying objects.
19601960
type: object
1961-
defaultRuntime:
1962-
description: 'Deprecated: DefaultRuntime is no longer used by
1963-
the gpu-operator. This is instead, detected at runtime.'
1964-
type: string
1965-
initContainer:
1966-
description: 'Deprecated: InitContainerSpec describes configuration
1967-
for initContainer image used with all components'
1968-
properties:
1969-
image:
1970-
description: Image represents image name
1971-
pattern: '[a-zA-Z0-9\-]+'
1972-
type: string
1973-
imagePullPolicy:
1974-
description: Image pull policy
1975-
type: string
1976-
imagePullSecrets:
1977-
description: Image pull secrets
1978-
items:
1979-
type: string
1980-
type: array
1981-
repository:
1982-
description: Repository represents image repository path
1983-
type: string
1984-
version:
1985-
description: Version represents image tag(version)
1986-
type: string
1987-
type: object
19881961
labels:
19891962
additionalProperties:
19901963
type: string

deployments/gpu-operator/templates/clusterpolicy.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,6 @@ spec:
2525
{{- if .Values.operator.defaultGPUMode }}
2626
defaultGPUMode: {{ .Values.operator.defaultGPUMode }}
2727
{{- end }}
28-
{{- if .Values.operator.initContainer }}
29-
initContainer:
30-
{{- if .Values.operator.initContainer.repository }}
31-
repository: {{ .Values.operator.initContainer.repository }}
32-
{{- end }}
33-
{{- if .Values.operator.initContainer.image }}
34-
image: {{ .Values.operator.initContainer.image }}
35-
{{- end }}
36-
{{- if .Values.operator.initContainer.version }}
37-
version: {{ .Values.operator.initContainer.version | quote }}
38-
{{- end }}
39-
{{- if .Values.operator.initContainer.imagePullPolicy }}
40-
imagePullPolicy: {{ .Values.operator.initContainer.imagePullPolicy }}
41-
{{- end }}
42-
{{- if .Values.operator.initContainer.imagePullSecrets }}
43-
imagePullSecrets: {{ toYaml .Values.operator.initContainer.imagePullSecrets | nindent 8 }}
44-
{{- end }}
45-
{{- end }}
4628
{{- if .Values.operator.use_ocp_driver_toolkit }}
4729
use_ocp_driver_toolkit: {{ .Values.operator.use_ocp_driver_toolkit }}
4830
{{- end }}

tests/scripts/env-to-values.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ if [[ -n "${OPERATOR_VERSION:-}" ]]; then
7070
HAS_VALUES=true
7171
fi
7272

73-
if [[ -n "${CONTAINER_RUNTIME:-}" ]]; then
74-
OPERATOR_CONFIG="${OPERATOR_CONFIG} defaultRuntime: \"${CONTAINER_RUNTIME}\"\n"
75-
echo "Added operator.defaultRuntime: ${CONTAINER_RUNTIME}"
76-
HAS_VALUES=true
77-
fi
78-
7973
# Write operator configuration if any
8074
if [[ -n "${OPERATOR_CONFIG}" ]]; then
8175
echo "operator:" >> "${OUTPUT_FILE}"

tests/scripts/install-operator.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ if [[ "${USE_VALUES_FILE}" == "false" ]]; then
2626
if [[ -n "${OPERATOR_VERSION}" ]]; then
2727
OPERATOR_OPTIONS="${OPERATOR_OPTIONS} --set operator.version=${OPERATOR_VERSION} --set validator.version=${OPERATOR_VERSION}"
2828
fi
29-
30-
OPERATOR_OPTIONS="${OPERATOR_OPTIONS} --set operator.defaultRuntime=${CONTAINER_RUNTIME}"
3129
fi
3230

3331
if [[ "${USE_VALUES_FILE}" == "true" ]]; then

0 commit comments

Comments
 (0)