diff --git a/deployment/network-operator/charts/nic-configuration-operator-chart/templates/config-daemon.yaml b/deployment/network-operator/charts/nic-configuration-operator-chart/templates/config-daemon.yaml new file mode 100644 index 000000000..9715cd0fc --- /dev/null +++ b/deployment/network-operator/charts/nic-configuration-operator-chart/templates/config-daemon.yaml @@ -0,0 +1,68 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nic-configuration-daemon + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: nic-configuration-daemon + app.kubernetes.io/created-by: nic-configuration-operator + app.kubernetes.io/part-of: nic-configuration-operator + {{- include "nic-configuration-operator.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + control-plane: nic-configuration-daemon + {{- include "nic-configuration-operator.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: nic-configuration-daemon + labels: + control-plane: nic-configuration-daemon + {{- include "nic-configuration-operator.selectorLabels" . | nindent 8 }} + spec: + nodeSelector: {{- toYaml .Values.operator.nodeSelector | nindent 8 }} + serviceAccountName: {{ include "nic-configuration-operator.serviceAccountName" . }} + terminationGracePeriodSeconds: 10 + hostNetwork: true + hostPID: true + priorityClassName: system-node-critical + containers: + - image: "{{ .Values.configDaemon.image.repository }}/{{ .Values.configDaemon.image.name }}:{{ .Values.configDaemon.image.tag | default .Chart.AppVersion }}" + name: nic-configuration-daemon + securityContext: + privileged: true + resources: {{- toYaml .Values.configDaemon.resources | nindent 12 }} + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + {{- if .Values.logLevel}} + - name: LOG_LEVEL + value: {{ .Values.logLevel }} + {{- end}} + volumeMounts: + - name: sys + mountPath: /sys + readOnly: false + - name: proc + mountPath: /proc + readOnly: false + - name: host + mountPath: /host + readOnly: true + volumes: + - name: sys + hostPath: + path: /sys + - name: proc + hostPath: + path: /proc + - name: host + hostPath: + path: / diff --git a/deployment/network-operator/charts/nic-configuration-operator-chart/templates/nic-configuration-operator-configmap.yaml b/deployment/network-operator/charts/nic-configuration-operator-chart/templates/nic-configuration-operator-configmap.yaml deleted file mode 100644 index 6e4b4c039..000000000 --- a/deployment/network-operator/charts/nic-configuration-operator-chart/templates/nic-configuration-operator-configmap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: nic-configuration-operator-config -data: - serviceAccountName: "{{ include "nic-configuration-operator.serviceAccountName" . }}" - configDaemonImage: "{{ .Values.configDaemon.image.repository }}/{{ .Values.configDaemon.image.name }}:{{ .Values.configDaemon.image.tag | default .Chart.AppVersion }}" - {{- if .Values.imagePullSecrets}} - imagePullSecrets: {{ join "," .Values.imagePullSecrets }} - {{- end}} - {{- if .Values.configDaemon.nodeSelector}} - nodeSelector: {{ .Values.configDaemon.nodeSelector | toJson | quote }} - {{- end}} - {{- if .Values.configDaemon.resources}} - resources: {{ .Values.configDaemon.resources | toJson | quote }} - {{- end}} - {{- if .Values.logLevel}} - logLevel: {{ .Values.logLevel }} - {{- end}} - clusterType: vanilla diff --git a/deployment/network-operator/charts/nic-configuration-operator-chart/templates/operator.yaml b/deployment/network-operator/charts/nic-configuration-operator-chart/templates/operator.yaml index 25ed38b20..0358a6d15 100644 --- a/deployment/network-operator/charts/nic-configuration-operator-chart/templates/operator.yaml +++ b/deployment/network-operator/charts/nic-configuration-operator-chart/templates/operator.yaml @@ -40,11 +40,11 @@ spec: capabilities: drop: - ALL + {{- if .Values.logLevel}} env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace + - name: LOG_LEVEL + value: {{ .Values.logLevel }} + {{- end}} livenessProbe: httpGet: path: /healthz diff --git a/deployment/network-operator/charts/nic-configuration-operator-chart/templates/role.yaml b/deployment/network-operator/charts/nic-configuration-operator-chart/templates/role.yaml index 2184c7742..fbffac7a9 100644 --- a/deployment/network-operator/charts/nic-configuration-operator-chart/templates/role.yaml +++ b/deployment/network-operator/charts/nic-configuration-operator-chart/templates/role.yaml @@ -11,8 +11,6 @@ rules: - configmaps verbs: - get - - list - - watch - apiGroups: - "" resources: @@ -105,15 +103,3 @@ rules: - patch - update - watch -- apiGroups: - - apps - resources: - - daemonsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch diff --git a/deployment/network-operator/values.yaml b/deployment/network-operator/values.yaml index bbfb4fa2d..6720de944 100644 --- a/deployment/network-operator/values.yaml +++ b/deployment/network-operator/values.yaml @@ -178,12 +178,12 @@ nic-configuration-operator-chart: image: repository: ghcr.io/mellanox name: nic-configuration-operator - tag: v0.1.15 + tag: v0.1.17 configDaemon: image: repository: ghcr.io/mellanox name: nic-configuration-operator-daemon - tag: v0.1.15 + tag: v0.1.17 # Maintenance Operator chart related values. maintenance-operator-chart: diff --git a/hack/release.yaml b/hack/release.yaml index 9c4b6eca6..760de4f38 100644 --- a/hack/release.yaml +++ b/hack/release.yaml @@ -81,11 +81,11 @@ rdmaCni: nicConfigurationOperator: image: nic-configuration-operator repository: ghcr.io/mellanox - version: v0.1.15 + version: v0.1.17 nicConfigurationConfigDaemon: image: nic-configuration-operator-daemon repository: ghcr.io/mellanox - version: v0.1.15 + version: v0.1.17 maintenanceOperator: image: maintenance-operator repository: ghcr.io/mellanox