From 4bc2dddbfc6ddabd207bb27766cc583a102d3be3 Mon Sep 17 00:00:00 2001 From: cdikonim Date: Wed, 15 Jan 2025 12:02:36 +0100 Subject: [PATCH] Add podSecurityContext --- .../templates/controllerplugin-statefulset.yaml | 1 + charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml | 1 + charts/manila-csi-plugin/values.yaml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml b/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml index e9263739e4..fffe952bc8 100644 --- a/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml +++ b/charts/manila-csi-plugin/templates/controllerplugin-statefulset.yaml @@ -15,6 +15,7 @@ spec: labels: {{- include "openstack-manila-csi.controllerplugin.labels" . | nindent 8 }} spec: + securityContext: {{ toYaml .Values.controllerplugin.podSecurityContext | nindent 8 }} serviceAccountName: {{ include "openstack-manila-csi.serviceAccountName.controllerplugin" . }} containers: {{- range .Values.shareProtocols }} diff --git a/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml b/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml index aa173cc53f..96b18c77a7 100644 --- a/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml +++ b/charts/manila-csi-plugin/templates/nodeplugin-daemonset.yaml @@ -13,6 +13,7 @@ spec: labels: {{- include "openstack-manila-csi.nodeplugin.labels" . | nindent 8 }} spec: + securityContext: {{ toYaml .Values.nodeplugin.podSecurityContext | nindent 8 }} serviceAccountName: {{ include "openstack-manila-csi.serviceAccountName.nodeplugin" . }} hostNetwork: true dnsPolicy: ClusterFirstWithHostNet diff --git a/charts/manila-csi-plugin/values.yaml b/charts/manila-csi-plugin/values.yaml index 8a9b0456ae..4907c5de62 100644 --- a/charts/manila-csi-plugin/values.yaml +++ b/charts/manila-csi-plugin/values.yaml @@ -75,6 +75,7 @@ nodeplugin: priorityClassName: "" # Use fullnameOverride to fully override the name of this component # fullnameOverride: some-other-name + podSecurityContext: {} # StatefulSet deployment controllerplugin: @@ -119,6 +120,7 @@ controllerplugin: # - "keystone.hostname.com" # Use fullnameOverride to fully override the name of this component # fullnameOverride: some-other-name + podSecurityContext: {} # Log verbosity level. # See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md