From 633d0324f1f3e2e982742707660c05198e4259e7 Mon Sep 17 00:00:00 2001 From: scabrinha Date: Fri, 21 Apr 2023 15:18:13 -0700 Subject: [PATCH 1/3] Portworx: etcdEndpoints list --- .../portworx/templates/storage-cluster.yaml | 21 ++++++--------- charts/portworx/values.yaml | 27 +++++++++++++------ 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/charts/portworx/templates/storage-cluster.yaml b/charts/portworx/templates/storage-cluster.yaml index dbf610f35..17f8dbb06 100644 --- a/charts/portworx/templates/storage-cluster.yaml +++ b/charts/portworx/templates/storage-cluster.yaml @@ -2,10 +2,6 @@ {{- $isCoreOS := .Values.isTargetOSCoreOS | default false }} {{- $internalKVDB := .Values.internalKVDB | default false }} - {{- $etcdEndPoints := .Values.etcdEndPoint }} - {{- $etcdCertPath := .Values.etcd.certPath | default "none" }} - {{- $etcdCert := .Values.etcd.cert | default "none" }} - {{- $etcdKey := .Values.etcd.key | default "none" }} {{- $kvdbAuthSecret := .Values.kvdb.authSecretName | default "none" }} {{- $openshiftInstall := .Values.openshiftInstall | default false }} {{- $EKSInstall := .Values.EKSInstall | default false }} @@ -82,14 +78,13 @@ spec: internal: true {{- else }} internal: false - {{- if empty $etcdEndPoints }} - "{{ required "A valid ETCD url in the format etcd:http:// is required. Verify that the key is correct and there isnt any typo in specifying that, also ensure it is accessible from all node of your kubernetes cluster" .etcdEndPoint}}" + {{- if empty .Values.etcdEndpoints }} + "{{ required "A valid ETCD url in the format etcd:http:// is required. Verify that the key is correct and there isnt any typo in specifying that, also ensure it is accessible from all nodes in your kubernetes cluster" .etcdEndpoints }}" {{- else }} + {{- with .Values.etcdEndpoints }} endpoints: - {{- $endpoints := $etcdEndPoints | split ";" }} - {{- range $key, $val := $endpoints }} - - {{$val}} - {{- end }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} {{- if ne $kvdbAuthSecret "none" }} authSecret: {{ .Values.kvdb.authSecretName }} @@ -263,7 +258,7 @@ spec: path: /lib/modules type: Directory {{- end }} - {{- if ne $etcdCertPath "none" }} + {{- if .Values.etcd.certPath }} - name: etcdcerts mountPath: /etc/pwx/etcdcerts secret: @@ -271,11 +266,11 @@ spec: items: - key: ca.pem path: ca.pem - {{- if ne $etcdCert "none" }} + {{- if .Values.etcd.cert }} - key: client.pem path: client.pem {{- end -}} - {{- if ne $etcdKey "none" }} + {{- if .Values.etcd.key }} - key: client-key.pem path: client-key.key {{- end -}} diff --git a/charts/portworx/values.yaml b/charts/portworx/values.yaml index 9ba93732d..a64d172a9 100644 --- a/charts/portworx/values.yaml +++ b/charts/portworx/values.yaml @@ -12,8 +12,13 @@ pksInstall: false # installation on PKS (Pivotal Container EKSInstall: false # installation on EKS. AKSInstall: false # installation on AKS OKEInstall: false # installation on OKE -etcdEndPoint: # The ETCD endpoint. Should be in the format etcd:http://:2379. If there are multiple etcd endpoints they need to be ";" seperated. - # the default value is empty since it requires to be explicity set using either the --set option of -f values.yaml. + +# List of endpoints for ETCD within the cluster. +# Should be in the format etcd:http://:2379 +etcdEndpoints: +- test +- one + clusterName: mycluster # This is the default. please change it to your cluster name. usefileSystemDrive: false # true/false Instructs PX to use an unmounted Drive even if it has a filesystem. usedrivesAndPartitions: false # Defaults to false. Change to true and PX will use unmounted drives and partitions. @@ -71,12 +76,18 @@ aut: false # Enable AutoPilot internalKVDB: false # internal KVDB kvdbDevice: none # specify a separate device to store KVDB data, only used when internalKVDB is set to true -etcd: # DEPRECATED: Use kvdb.authSecretName for configuring secure etcd - credentials: none:none # Username and password for ETCD authentication in the form user:password - certPath: none # Base path where the certificates are placed. (example: if the certificates ca,crt and the key are in /etc/pwx/etcdcerts the value should be provided as /etc/pwx/etcdcerts) - ca: none # Location of CA file for ETCD authentication. Should be /path/to/server.ca - cert: none # Location of certificate for ETCD authentication. Should be /path/to/server.crt - key: none # Location of certificate key for ETCD authentication Should be /path/to/servery.key +# DEPRECATED: Use kvdb.authSecretName for configuring secure etcd +# Username and password for ETCD authentication in the form user:password +# Base path where the certificates are placed. (example: if the certificates ca,crt and the key are in /etc/pwx/etcdcerts the value should be provided as /etc/pwx/etcdcerts) +# Location of CA file for ETCD authentication. Should be /path/to/server.ca +# Location of certificate for ETCD authentication. Should be /path/to/server.crt +# Location of certificate key for ETCD authentication Should be /path/to/servery.key +etcd: + credentials: null + certPath: null + ca: null + cert: null + key: null consul: # DEPRECATED: Use kvdb.authSecretName for configuring secure consul token: none # ACL token value used for Consul authentication. (example: 398073a8-5091-4d9c-871a-bbbeb030d1f6) From d4e1611aed3a706d5f82f7c630e6fccfcfeb2339 Mon Sep 17 00:00:00 2001 From: scabrinha Date: Fri, 21 Apr 2023 15:19:44 -0700 Subject: [PATCH 2/3] defaults --- charts/portworx/values.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/charts/portworx/values.yaml b/charts/portworx/values.yaml index a64d172a9..53ab7b042 100644 --- a/charts/portworx/values.yaml +++ b/charts/portworx/values.yaml @@ -15,9 +15,7 @@ OKEInstall: false # installation on OKE # List of endpoints for ETCD within the cluster. # Should be in the format etcd:http://:2379 -etcdEndpoints: -- test -- one +etcdEndpoints: [] clusterName: mycluster # This is the default. please change it to your cluster name. usefileSystemDrive: false # true/false Instructs PX to use an unmounted Drive even if it has a filesystem. From 48217abcd8f8e5c9e1899d43ef7796bf40bedbac Mon Sep 17 00:00:00 2001 From: scabrinha Date: Fri, 21 Apr 2023 15:26:59 -0700 Subject: [PATCH 3/3] another comment example, easy fix --- charts/portworx/values.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/charts/portworx/values.yaml b/charts/portworx/values.yaml index 53ab7b042..4a4a33c98 100644 --- a/charts/portworx/values.yaml +++ b/charts/portworx/values.yaml @@ -38,14 +38,15 @@ envVars: none # DEPRECATED: Use envs section to set env # NOTE: This is a ";" seperated list of environment variables. # For eg: MYENV1=myvalue1;MYENV2=myvalue2 -envs: # Add environment variables to the Portworx container in all Kubernetes supported formats - # - name: AWS_CA_BUNDLE - # value: "/etc/pwx/objectstore-cert/objectstore.pem" - # - name: AWS_ACCESS_KEY_ID - # valueFrom: - # secretKeyRef: - # name: aws-creds - # key: access-key +# Add environment variables to the Portworx container +envs: +# - name: AWS_CA_BUNDLE +# value: "/etc/pwx/objectstore-cert/objectstore.pem" +# - name: AWS_ACCESS_KEY_ID +# valueFrom: +# secretKeyRef: +# name: aws-creds +# key: access-key miscArgs: none # Miscellaneous arguments that will be passed to portworx verbatim. Only use this if there is # no equivalent way to specify these options directly via a StorageCluster spec field.