Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charts/csi-powermax: Migrate reverse proxy config from ConfigMap to Secret #608

Open
wants to merge 87 commits into
base: usr/spark/powermax-secret-feature
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
8647018
Remove mode: StandAlone from powermax reverseproxy config.yaml (#562)
KshitijaKakde Nov 20, 2024
0eaee31
powermax endpoint update (#570)
nitesh3108 Nov 22, 2024
589e791
Mounting secrets as volumes
abhi16394 Dec 9, 2024
41f3276
update environment variable name
abhi16394 Dec 17, 2024
62099f6
update environment variable name
abhi16394 Dec 17, 2024
d4586b1
Mount volumes to reverseproxy container
abhi16394 Dec 17, 2024
a20b0e2
Add reverseproxy secret volume
abhi16394 Dec 17, 2024
43bc853
Update reverseproxy environment name
abhi16394 Dec 18, 2024
411f78a
Mount secret as volumes
abhi16394 Dec 20, 2024
665ce3d
Update controller.yaml
abhi16394 Dec 20, 2024
250113d
Update reverseproxy.yaml
abhi16394 Dec 20, 2024
f31cb1b
Update node.yaml
abhi16394 Dec 20, 2024
6a61840
remove old configmap
abhi16394 Jan 2, 2025
b349977
remove configmap
abhi16394 Jan 2, 2025
734bd55
remove older reverseproxy configmaps
abhi16394 Jan 2, 2025
f255790
remove configmap volume
abhi16394 Jan 2, 2025
21b5763
remove secret variable
abhi16394 Jan 2, 2025
f679774
remove secret references
abhi16394 Jan 2, 2025
bfd2d93
remove username and password
abhi16394 Jan 3, 2025
86667ec
Update secret path
abhi16394 Jan 3, 2025
bd58beb
Update secret path
abhi16394 Jan 3, 2025
7cdb2ff
Update node.yaml
abhi16394 Jan 3, 2025
dc4053b
Update reverseproxy.yaml
abhi16394 Jan 3, 2025
c359635
Update controller.yaml
abhi16394 Jan 3, 2025
ce09e27
Update reverseproxy.yaml
abhi16394 Jan 3, 2025
8336c46
Update controller.yaml
abhi16394 Jan 3, 2025
c8bc6c9
Update controller.yaml
abhi16394 Jan 3, 2025
aac66a6
Update reverseproxy.yaml
abhi16394 Jan 3, 2025
3557da2
Update reverseproxy.yaml
abhi16394 Jan 3, 2025
6d47938
Update controller.yaml
abhi16394 Jan 3, 2025
0e5092f
Update controller.yaml
abhi16394 Jan 4, 2025
5827676
Update reverseproxy.yaml
abhi16394 Jan 4, 2025
2f4cadb
Update reverseproxy.yaml
abhi16394 Jan 4, 2025
ca3e6a5
Update controller.yaml
abhi16394 Jan 4, 2025
522c5b6
Update reverseproxy.yaml
abhi16394 Jan 4, 2025
b990374
Update controller.yaml
abhi16394 Jan 4, 2025
6fc01ff
Update node.yaml
abhi16394 Jan 4, 2025
5c4b468
Update controller.yaml
abhi16394 Jan 4, 2025
8ea3ded
Update controller.yaml
abhi16394 Jan 4, 2025
fbff444
Update reverseproxy.yaml
abhi16394 Jan 4, 2025
c5deb32
Update controller.yaml
abhi16394 Jan 5, 2025
0094d2f
Update reverseproxy.yaml
abhi16394 Jan 5, 2025
10779c4
Update reverseproxy.yaml
abhi16394 Jan 5, 2025
dd785d2
Update controller.yaml
abhi16394 Jan 5, 2025
ec7e52c
Update controller.yaml
abhi16394 Jan 7, 2025
3d2b651
Update node.yaml
abhi16394 Jan 7, 2025
aa494a9
Update reverseproxy.yaml
abhi16394 Jan 7, 2025
ccdb630
Update controller.yaml
abhi16394 Jan 7, 2025
36c8f5a
Add secret name variable for reverseproxy
abhi16394 Jan 7, 2025
e6ba336
add username and password to driver from secret
abhi16394 Jan 7, 2025
78ea07b
Update node.yaml
abhi16394 Jan 7, 2025
d0facfa
Update values.yaml
abhi16394 Jan 7, 2025
863e5ae
Update controller.yaml
abhi16394 Jan 7, 2025
6e20326
Update controller.yaml
abhi16394 Jan 7, 2025
efde73b
Update node.yaml
abhi16394 Jan 7, 2025
2f81973
Update reverseproxy.yaml
abhi16394 Jan 7, 2025
672999f
Update controller.yaml
abhi16394 Jan 7, 2025
80aed9d
add username and password variables
abhi16394 Jan 7, 2025
4e423d2
add username and password variables
abhi16394 Jan 7, 2025
0288bfa
Update controller.yaml
abhi16394 Jan 7, 2025
0d4d459
Update controller.yaml
abhi16394 Jan 7, 2025
628fe40
Update node.yaml
abhi16394 Jan 7, 2025
4437b3a
Revert "remove configmap"
lukeatdell Jan 10, 2025
74a35af
restore backward compat and update proxy secret
lukeatdell Jan 13, 2025
4800a95
remove unused X_CSI_POWERMAX_ENDPOINT
lukeatdell Jan 13, 2025
fb60b08
simplify logic for switching btwn secret and cm.
lukeatdell Jan 14, 2025
e493b05
create rev proxy secret dynamically
lukeatdell Jan 14, 2025
3bc970a
rename secret template file
lukeatdell Jan 14, 2025
0168069
add newline
lukeatdell Jan 14, 2025
33a1310
remove dynamic secret.
lukeatdell Jan 15, 2025
5466ae8
update secret usage var name for clarity
lukeatdell Jan 15, 2025
c478c06
Merge branch 'main' into usr/spark/proxy-secret
lukeatdell Jan 15, 2025
8b06726
update volume mount path for secret
lukeatdell Jan 15, 2025
ad45ead
simplify logic and add proxy secret to controller and node containers
lukeatdell Jan 15, 2025
5d1fe44
deprecate managementServers, storageArrays, and defaultCredentialsSec…
lukeatdell Jan 15, 2025
ccc1865
fix bug related to secret file name
lukeatdell Jan 16, 2025
39af22e
Merge branch 'release-v1.14.0' into usr/spark/proxy-secret
lukeatdell Jan 17, 2025
6b78f99
consolidate secret file path to a single env var
lukeatdell Jan 17, 2025
4f89c43
mount powermax-config-params in the reverse proxy ctr.
lukeatdell Jan 17, 2025
3cba131
bump image, value, and chart versions
lukeatdell Jan 17, 2025
d92583a
Revert commit 4f89c43 in favor of one change per PR.
lukeatdell Jan 17, 2025
f69fdae
PR comments: tdawe
lukeatdell Jan 17, 2025
2b7f2de
refactor use of defaultCredentialsSecret.
lukeatdell Jan 21, 2025
c60a9e7
update default value for defaultCredsSecret for consistency with oper…
lukeatdell Jan 21, 2025
e151657
update images in dev to "nightly"
lukeatdell Jan 21, 2025
e714910
PR comments: tdawe
lukeatdell Jan 21, 2025
fe96d05
little syntax fix
lukeatdell Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/csi-powermax/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: "2.13.0"
appVersion: "2.14.0"
name: csi-powermax
version: 2.13.0
version: 2.14.0
description: |
PowerMax CSI (Container Storage Interface) driver Kubernetes
integration. This chart includes everything required to provision via CSI as
Expand All @@ -15,7 +15,7 @@ keywords:
- storage
dependencies:
- name: csireverseproxy
version: 2.12.0
version: 2.13.0
condition: required
home: https://github.com/dell/csi-powermax
icon: https://avatars1.githubusercontent.com/u/20958494?s=200&v=4
Expand Down
4 changes: 2 additions & 2 deletions charts/csi-powermax/charts/csireverseproxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: A Helm chart for CSI PowerMax ReverseProxy

type: application

version: 2.12.0
version: 2.13.0

appVersion: 2.12.0
appVersion: 2.13.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{{- /*
Deprecation notice: use of reverseproxy-config ConfigMap is deprecated and will
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of deprecation comments throughout. Will help when we remove these parameters in a future release.

be removed in a future release. The ConfigMap remains for backward compatibility
usage only.
*/}}
{{- /*
Use the ConfigMap only if the secretName value is empty or the key is not found
*/}}
{{- if or (not (hasKey .Values "secretName")) (empty .Values.secretName) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-reverseproxy-config
namespace: {{ .Release.Namespace }}
data:
{{ tpl (.Files.Glob "conf/config.yaml").AsConfig . | indent 2 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,50 @@ spec:
image: {{ required "Must provided an image for reverseproxy container." .Values.image }}
imagePullPolicy: Always
env:
{{- $useRevProxySecret := and (hasKey .Values "secretName") (not (empty .Values.secretName)) }}
- name: X_CSI_REVPROXY_USE_SECRET
value: {{ $useRevProxySecret | quote }}
{{- if $useRevProxySecret }}
- name: X_CSI_REVPROXY_SECRET_FILEPATH
value: "/etc/powermax/config"
{{- else }}
- name: X_CSI_REVPROXY_CONFIG_DIR
value: /etc/config/configmap
- name: X_CSI_REVPROXY_CONFIG_FILE_NAME
value: config.yaml
{{- end }}
- name: X_CSI_REVRPOXY_IN_CLUSTER
value: "true"
- name: X_CSI_REVPROXY_TLS_CERT_DIR
value: /app/tls
- name: X_CSI_REVPROXY_WATCH_NAMESPACE
value: {{ .Release.Namespace }}
volumeMounts:
{{- if and (hasKey .Values "secretName") (not (empty .Values.secretName)) }}
- name: powermax-reverseproxy-secret
mountPath: /etc/powermax
{{- else }}
- name: configmap-volume
mountPath: /etc/config/configmap
{{- end }}
- name: tls-secret
mountPath: /app/tls
- name: cert-dir
mountPath: /app/certs
volumes:
{{- if and (hasKey .Values "secretName") (not (empty .Values.secretName)) }}
- name: powermax-reverseproxy-secret
secret:
secretName: {{ .Values.secretName }}
{{- else }}
- name: configmap-volume
configMap:
name: {{ .Release.Name }}-reverseproxy-config
optional: true
{{- end }}
- name: tls-secret
secret:
secretName: {{ .Values.tlsSecret }}
- name: cert-dir
emptyDir:
{{- end }}
{{- end }}
9 changes: 8 additions & 1 deletion charts/csi-powermax/charts/csireverseproxy/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:v2.12.0
image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:v2.13.0
port: 2222

# TLS secret which is used for setting up the proxy HTTPS server
# Don't change this value unless really necessary
# If this value is modified, then the installation script will have to be modified
tlsSecret: "csirevproxy-tls-secret"

# Name of the reverseproxy secret as a Kubernetes resource, containing
# details required for connecting the csi-powermax driver to Unisphere for
# PowerMax endpoints.
# Default value: ""
# Example: "powermax-reverseproxy-secret"
secretName: ""
32 changes: 32 additions & 0 deletions charts/csi-powermax/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ spec:
value: /var/run/csi/csi.sock
- name: X_CSI_MODE
value: controller
{{- if or (not (hasKey .Values.csireverseproxy "secretName")) (empty .Values.csireverseproxy.secretName) }}
- name: X_CSI_POWERMAX_USER
valueFrom:
secretKeyRef:
Expand All @@ -424,10 +425,18 @@ spec:
secretKeyRef:
name: {{ .Values.global.defaultCredentialsSecret }}
key: password
{{- end }}
- name: X_CSI_POWERMAX_CONFIG_PATH
value: /powermax-config-params/driver-config-params.yaml
- name: X_CSI_POWERMAX_ARRAY_CONFIG_PATH
value: /powermax-array-config/powermax-array-config.yaml
{{- $useRevProxySecret := and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: X_CSI_REVPROXY_USE_SECRET
value: {{ $useRevProxySecret | quote }}
{{- if $useRevProxySecret }}
- name: X_CSI_REVPROXY_SECRET_FILEPATH
value: "/etc/powermax/config"
{{- end }}
- name: X_CSI_POWERMAX_DEBUG
value: {{ .Values.powerMaxDebug | default "false" | lower | quote }}
- name: X_CSI_POWERMAX_SKIP_CERTIFICATE_VALIDATION
Expand Down Expand Up @@ -509,26 +518,43 @@ spec:
mountPath: /powermax-config-params
- name: powermax-array-config
mountPath: /powermax-array-config
{{- if and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: powermax-reverseproxy-secret
mountPath: /etc/powermax
{{- end }}
- name: tls-secret
mountPath: /app/tls
{{- if eq .Values.csireverseproxy.deployAsSidecar true }}
- name: reverseproxy
image: {{ required "Must provided an image for reverseproxy container." .Values.images.csireverseproxy.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
env:
{{- $useRevProxySecret := and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: X_CSI_REVPROXY_USE_SECRET
value: {{ $useRevProxySecret | quote }}
{{- if $useRevProxySecret }}
- name: X_CSI_REVPROXY_SECRET_FILEPATH
value: "/etc/powermax/config"
{{- else }}
- name: X_CSI_REVPROXY_CONFIG_DIR
value: /etc/config/configmap
- name: X_CSI_REVPROXY_CONFIG_FILE_NAME
value: config.yaml
{{- end }}
- name: X_CSI_REVRPOXY_IN_CLUSTER
value: "true"
- name: X_CSI_REVPROXY_TLS_CERT_DIR
value: /app/tls
- name: X_CSI_REVPROXY_WATCH_NAMESPACE
value: {{ .Release.Namespace }}
volumeMounts:
{{- if and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: powermax-reverseproxy-secret
mountPath: /etc/powermax
{{- else }}
- name: configmap-volume
mountPath: /etc/config/configmap
{{- end }}
- name: tls-secret
mountPath: /app/tls
- name: cert-dir
Expand All @@ -541,10 +567,16 @@ spec:
secret:
secretName: {{ .Release.Name }}-certs
optional: true
{{- if and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: powermax-reverseproxy-secret
secret:
secretName: {{ .Values.csireverseproxy.secretName }}
{{- else }}
- name: configmap-volume
configMap:
name: {{ .Release.Name }}-reverseproxy-config
optional: true
{{- end }}
- name: tls-secret
secret:
secretName: {{ .Values.csireverseproxy.tlsSecret }}
Expand Down
33 changes: 24 additions & 9 deletions charts/csi-powermax/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ metadata:
{{- if eq .Values.authorization.enabled true }}
annotations:
com.dell.karavi-authorization-proxy: "true"
{{ end }}
{{ end }}
{{- end }}
{{- end }}
spec:
selector:
matchLabels:
Expand All @@ -112,14 +112,14 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ .Release.Name }}-node
{{ if .Values.node.nodeSelector }}
{{- if .Values.node.nodeSelector }}
nodeSelector:
{{- toYaml .Values.node.nodeSelector | nindent 8 }}
{{ end }}
{{ if .Values.node.tolerations }}
{{- end }}
{{- if .Values.node.tolerations }}
tolerations:
{{- toYaml .Values.node.tolerations | nindent 6 }}
{{ end }}
{{- end }}
hostIPC: true
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
Expand Down Expand Up @@ -153,15 +153,13 @@ spec:
value: "{{ .Values.maxPowerMaxVolumesPerNode }}"
- name: X_CSI_PRIVATE_MOUNT_DIR
value: "{{ .Values.kubeletConfigDir }}/plugins/powermax.emc.dell.com/disks"
{{- $managementServer := first .Values.global.managementServers }}
- name: X_CSI_POWERMAX_ENDPOINT
value: {{ required "Must provide a Unisphere HTTPS endpoint." $managementServer.endpoint }}
- name: X_CSI_POWERMAX_DEBUG
value: {{ .Values.powerMaxDebug | default "false" | lower | quote }}
- name: X_CSI_POWERMAX_SKIP_CERTIFICATE_VALIDATION
value: {{ .Values.skipCertificateValidation | default "true" | lower | quote }}
- name: X_CSI_K8S_CLUSTER_PREFIX
value: {{ required "Must provide a Cluster Prefix." .Values.clusterPrefix }}
{{- if or (not (hasKey .Values.csireverseproxy "secretName")) (empty .Values.csireverseproxy.secretName) }}
- name: X_CSI_POWERMAX_USER
valueFrom:
secretKeyRef:
Expand All @@ -172,11 +170,19 @@ spec:
secretKeyRef:
name: {{ .Values.global.defaultCredentialsSecret }}
key: password
{{- end }}
- name: X_CSI_POWERMAX_NODENAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{{- $useRevProxySecret := and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: X_CSI_REVPROXY_USE_SECRET
value: {{ $useRevProxySecret | quote }}
{{- if $useRevProxySecret }}
- name: X_CSI_REVPROXY_SECRET_FILEPATH
value: "/etc/powermax/config"
{{- end }}
{{- if eq .Values.enableCHAP true }}
- name: X_CSI_POWERMAX_ISCSI_ENABLE_CHAP
value: "true"
Expand Down Expand Up @@ -287,6 +293,10 @@ spec:
mountPath: /node-topology-config
{{- end }}
{{- end }}
{{- if and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: powermax-reverseproxy-secret
mountPath: /etc/powermax
{{- end }}
- name: tls-secret
mountPath: /app/tls
- name: registrar
Expand Down Expand Up @@ -479,6 +489,11 @@ spec:
- name: powermax-array-config
configMap:
name: {{ .Release.Name }}-array-config
{{- if and (hasKey .Values.csireverseproxy "secretName") (not (empty .Values.csireverseproxy.secretName)) }}
- name: powermax-reverseproxy-secret
secret:
secretName: {{ .Values.csireverseproxy.secretName }}
{{- end }}
- name: certs
secret:
secretName: {{ .Release.Name }}-certs
Expand Down
6 changes: 1 addition & 5 deletions charts/csi-powermax/templates/powermax-array-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ data:
powermax-array-config.yaml: |
X_CSI_POWERMAX_PORTGROUPS: {{ .Values.global.portGroups | toYaml | default "" }}
X_CSI_TRANSPORT_PROTOCOL: {{ .Values.global.transportProtocol | toYaml | default "" }}
{{- $_ := first .Values.global.storageArrays }}
{{- range $index, $value := .Values.global.storageArrays }}
X_CSI_POWERMAX_ENDPOINT: {{ $value.endpoint | toYaml | default "" }}
{{- end }}
X_CSI_MANAGED_ARRAYS: {{ .Values.global.managedArrays | toYaml | default "" }}
X_CSI_MANAGED_ARRAYS: {{ .Values.global.managedArrays | toYaml | default "" }}
27 changes: 24 additions & 3 deletions charts/csi-powermax/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ global:
# Default value: None
# Examples: "000000000001", "000000000002"
managedArrays: "000000000001,000000000002"

# defaultCredentialsSecret
# DEPRECATION NOTICE: The defaultCredentials parameter has been deprecated and will be
# removed in a future release. It remains for backward compatibility only.
# Please see use the parameter .csireverseproxy.secretName below and refer to the official
# documentation website for further details.
defaultCredentialsSecret: powermax-creds
# portGroups: Define the set of existing port groups that the driver will use.
# It is a comma separated list of portgroup names.
Expand All @@ -37,13 +42,23 @@ global:
# "" - Automatic selection of transport protocol
# Default value: "" <empty>
transportProtocol: ""

# DEPRECATION NOTICE: The storageArrays parameter has been deprecated in this helm chart
# and will be removed in a future release. It remains for backward compatibility only.
# storageArrays have been migrated to the 'secret' format. Please refer to the official
# documentation website for further details.
storageArrays:
- storageArrayId: "000000000001"
endpoint: https://primary-1.unisphe.re:8443
backupEndpoint: https://backup-1.unisphe.re:8443
# - storageArrayId: "000000000002"
# endpoint: https://primary-2.unisphe.re:8443
# backupEndpoint: https://backup-2.unisphe.re:8443

# DEPRECATION NOTICE: The managementServers parameter has been deprecated in this helm chart
# and will be removed in a future release. It remains for backward compatibility only.
# managementServers have been migrated to the 'secret' format. Please refer to the official
# documentation website for further details.
managementServers:
- endpoint: https://primary-1.unisphe.re:8443
credentialsSecret: primary-1-secret
Expand All @@ -67,16 +82,16 @@ global:

# Current version of the driver
# Don't modify this value as this value will be used by the install script
version: "v2.13.0"
version: "v2.14.0"

# "images" defines every container images used for the driver and its sidecars.
# To use your own images, or a private registry, change the values here.
images:
# "driver" defines the container image, used for the driver container.
driver:
image: quay.io/dell/container-storage-modules/csi-powermax:v2.13.0
image: quay.io/dell/container-storage-modules/csi-powermax:v2.14.0
csireverseproxy:
image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:v2.12.0
image: quay.io/dell/container-storage-modules/csipowermax-reverseproxy:v2.13.0
# CSI sidecars
attacher:
image: registry.k8s.io/sig-storage/csi-attacher:v4.8.0
Expand Down Expand Up @@ -323,6 +338,12 @@ csireverseproxy:
# Default value: None
# Examples: "1111", "8080"
port: 2222
# Name of the reverseproxy secret as a Kubernetes resource, containing
# details required for connecting the csi-powermax driver to Unisphere for
# PowerMax endpoints.
# Default value: ""
# Example: "powermax-reverseproxy-secret"
secretName: ""
falfaroc marked this conversation as resolved.
Show resolved Hide resolved
# Auto-create TLS certificate for csi-reverseproxy
certManager:
# Set selfSignedCert to use a self-signed certificate
Expand Down
Loading