Skip to content

Commit

Permalink
chore: update Maintenance operator to 0.2.0 (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
rollandf authored Jan 28, 2025
2 parents 0aa18d9 + 99a8cfb commit 588a53b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.5
name: maintenanceoperatorconfigs.maintenance.nvidia.com
spec:
group: maintenance.nvidia.com
Expand Down Expand Up @@ -84,6 +84,10 @@ spec:
new nodes will not be processed if the number of unavailable node will exceed this value
x-kubernetes-int-or-string: true
type: object
status:
type: object
type: object
served: true
storage: true
subresources:
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.5
name: nodemaintenances.maintenance.nvidia.com
spec:
group: maintenance.nvidia.com
Expand Down Expand Up @@ -169,16 +169,8 @@ spec:
description: Conditions represents observations of NodeMaintenance
current state
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -219,12 +211,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down Expand Up @@ -279,6 +266,9 @@ spec:
type: array
type: object
type: object
selectableFields:
- jsonPath: .spec.nodeName
- jsonPath: .spec.requestorID
served: true
storage: true
subresources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: {{ include "maintenance-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: manager
app.kubernetes.io/component: maintenance-operator-controller-manager
app.kubernetes.io/created-by: maintenance-operator
app.kubernetes.io/part-of: maintenance-operator
control-plane: {{ .Release.Name }}-controller-manager
Expand All @@ -19,6 +19,7 @@ spec:
metadata:
labels:
control-plane: {{ .Release.Name }}-controller-manager
app.kubernetes.io/component: maintenance-operator-controller-manager
{{- include "maintenance-operator.selectorLabels" . | nindent 8 }}
annotations:
kubectl.kubernetes.io/default-container: manager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "maintenance-operator.fullname" . }}-manager-role
labels:
{{- include "maintenance-operator.labels" . | nindent 4 }}
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- nonResourceURLs:
- /metrics
verbs:
- get
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -62,34 +47,43 @@ rules:
- patch
- update
- apiGroups:
- maintenance.nvidia.com
- apps
resources:
- maintenanceoperatorconfigs
- daemonsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- maintenance.nvidia.com
- config.openshift.io
resources:
- maintenanceoperatorconfigs/finalizers
- infrastructures
verbs:
- update
- get
- list
- watch
- apiGroups:
- maintenance.nvidia.com
- machineconfiguration.openshift.io
resources:
- maintenanceoperatorconfigs/status
- machineconfigpools
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- machineconfiguration.openshift.io
resources:
- machineconfigs
verbs:
- get
- list
- watch
- apiGroups:
- maintenance.nvidia.com
resources:
- maintenanceoperatorconfigs
- nodemaintenances
verbs:
- create
Expand All @@ -102,26 +96,19 @@ rules:
- apiGroups:
- maintenance.nvidia.com
resources:
- maintenanceoperatorconfigs/finalizers
- nodemaintenances/finalizers
verbs:
- update
- apiGroups:
- maintenance.nvidia.com
resources:
- maintenanceoperatorconfigs/status
- nodemaintenances/status
verbs:
- get
- patch
- update
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- get
- list
- watch

---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ webhooks:
name: '{{ include "maintenance-operator.fullname" . }}-webhook-service'
namespace: {{ .Release.Namespace }}
path: /validate-maintenance-nvidia-com-v1alpha1-nodemaintenance
{{- if not .Values.operator.admissionController.certificates.certManager.enable }}
caBundle: {{ .Values.operator.admissionController.certificates.custom.operator.tlsCrt | b64enc | quote }}
{{- end }}
failurePolicy: Fail
name: vnodemaintenance.kb.io
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ operator:
certManager:
# -- use cert-manager for certificates
enable: true
# -- generate self-signed certificates with cert-manager
# -- generate self-signed certificiates with cert-manager
generateSelfSigned: true
custom:
# -- enable custom certificates using secrets
Expand Down
2 changes: 1 addition & 1 deletion deployment/network-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ maintenance-operator-chart:
image:
repository: ghcr.io/mellanox
name: maintenance-operator
tag: v0.1.1
tag: v0.2.0
admissionController:
# -- enable admission controller of the operator
enable: false
Expand Down
2 changes: 1 addition & 1 deletion hack/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ nicConfigurationConfigDaemon:
maintenanceOperator:
image: maintenance-operator
repository: ghcr.io/mellanox
version: v0.1.1
version: v0.2.0

0 comments on commit 588a53b

Please sign in to comment.