feat: add pre-defined secrets to csi-driver-smb addon (#1215)
* added ability to use pre-defined secrets * renamed variables to existing_secret_name and existing_secret_namespace
This commit is contained in:
1 parent
ef8af23093
commit
7456164df0
4 files changed
+36
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#% if csi_driver_smb|default({}) and csi_driver_smb.enabled|default(false) %#
|
||||
#% for item in csi_driver_smb.storage_class %#
|
||||
#% if not item.existing_secret_name %#
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
@@ -8,5 +9,6 @@ metadata:
|
||||
stringData:
|
||||
username: "#{ item.username }#"
|
||||
password: "#{ item.password }#"
|
||||
#% endif %#
|
||||
#% endfor %#
|
||||
#% endif %#
|
||||
@@ -8,8 +8,12 @@ metadata:
|
||||
provisioner: smb.csi.k8s.io
|
||||
parameters:
|
||||
source: "#{ item.source }#"
|
||||
csi.storage.k8s.io/node-stage-secret-name: "#{ item.name }#-secret"
|
||||
csi.storage.k8s.io/node-stage-secret-name: "#{ item.existing_secret_name|default(item.name+"-secret") }#"
|
||||
#% if item.existing_secret_name and item.existing_secret_namespace %#
|
||||
csi.storage.k8s.io/node-stage-secret-namespace: "#{ item.existing_secret_namespace }#"
|
||||
#% else %#
|
||||
csi.storage.k8s.io/node-stage-secret-namespace: "storage"
|
||||
#% endif %#
|
||||
createSubDir: "false"
|
||||
reclaimPolicy: Retain
|
||||
volumeBindingMode: Immediate
|
||||
|
||||
@@ -48,6 +48,8 @@ csi_driver_smb:
|
||||
# file_mode: # default 0666
|
||||
# uid: # default 1000
|
||||
# gid: # default 1000
|
||||
# existing_secret_name: # If this is defined the username and password are ignored and the secret is not created
|
||||
# existing_secret_namespace: # default storage. Ignored if existing_secret_name is not set
|
||||
# ...
|
||||
|
||||
# https://github.com/rancher/system-upgrade-controller
|
||||
|
||||
Reference in new issue
Block a user