From 91b2e4046fd4d710e830f69472cde426444f64c2 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 24 Aug 2023 12:41:12 +0200 Subject: [PATCH 1/8] Add replicas for Operator deployment --- charts/connect/templates/operator-deployment.yaml | 2 +- charts/connect/values.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/connect/templates/operator-deployment.yaml b/charts/connect/templates/operator-deployment.yaml index 568c0de..6e96260 100644 --- a/charts/connect/templates/operator-deployment.yaml +++ b/charts/connect/templates/operator-deployment.yaml @@ -15,7 +15,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: 1 + replicas: {{ .Values.operator.replicas }} selector: matchLabels: name: {{ .Values.connect.applicationName }} diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index dafaa77..a3da48c 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -194,6 +194,9 @@ operator: # Denotes whether the 1Password Operator will be deployed create: false + # The number of replicas to run the 1Password Connect Operator deployment + replicas: 1 + # Denotes whether the 1Password Operator will automatically restart deployments based on associated updated secrets. autoRestart: false From bd6f2abc9b6535fb0edcfe012716f5a1f72a205b Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 24 Aug 2023 12:42:42 +0200 Subject: [PATCH 2/8] Add extraAnnotations function for _helpers.tpl --- charts/connect/templates/_helpers.tpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/charts/connect/templates/_helpers.tpl b/charts/connect/templates/_helpers.tpl index 9d900d1..fefa80f 100644 --- a/charts/connect/templates/_helpers.tpl +++ b/charts/connect/templates/_helpers.tpl @@ -106,6 +106,21 @@ Sets extra service annotations {{- end }} {{- end -}} +{{/* +Sets extra annotations +*/}} +{{- define "onepassword-connect.extraAnnotations" -}} + {{- with .annotations }} + annotations: + {{- $tp := typeOf . }} + {{- if eq $tp "string" }} + {{- tpl . . | nindent 4 }} + {{- else }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} +{{- end -}} + {{/* Sets environment variables when profiler is enabled */}} From b01fe158c4737938d77eab9cef681cd3e298710f Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 24 Aug 2023 12:44:30 +0200 Subject: [PATCH 3/8] Add HPA, PDB and Affinity for Connect resources --- .../connect/templates/connect-deployment.yaml | 10 +++-- charts/connect/templates/connect-hpa.yaml | 39 +++++++++++++++++++ charts/connect/templates/connect-pdb.yaml | 21 ++++++++++ charts/connect/values.yaml | 27 +++++++++++++ 4 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 charts/connect/templates/connect-hpa.yaml create mode 100644 charts/connect/templates/connect-pdb.yaml diff --git a/charts/connect/templates/connect-deployment.yaml b/charts/connect/templates/connect-deployment.yaml index cf4057a..0937214 100644 --- a/charts/connect/templates/connect-deployment.yaml +++ b/charts/connect/templates/connect-deployment.yaml @@ -33,10 +33,14 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: -{{- with .Values.connect.nodeSelector }} + {{- with .Values.connect.nodeSelector }} nodeSelector: -{{ toYaml . | indent 8 }} -{{- end }} + {{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.operator.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} volumes: - name: {{ .Values.connect.dataVolume.name }} {{ .Values.connect.dataVolume.type }}: {{- toYaml .Values.connect.dataVolume.values | nindent 12 }} diff --git a/charts/connect/templates/connect-hpa.yaml b/charts/connect/templates/connect-hpa.yaml new file mode 100644 index 0000000..e85f80d --- /dev/null +++ b/charts/connect/templates/connect-hpa.yaml @@ -0,0 +1,39 @@ +{{- if (and .Values.connect.create .Values.connect.hpa.enabled ) }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Values.connect.applicationName }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/component: connect + {{- include "onepassword-connect.labels" . | nindent 4 }} +{{- include "onepassword-connect.extraAnnotations" .Values.connect.hpa }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Values.connect.applicationName }} + minReplicas: {{ .Values.connect.hpa.minReplicas }} + maxReplicas: {{ .Values.connect.hpa.maxReplicas }} + metrics: + {{- with .Values.connect.hpa.avgMemoryUtilization }} + - type: Resource + resource: + name: memory + target: + averageUtilization: {{ . }} + type: Utilization + {{- end }} + {{- with .Values.connect.hpa.avgCpuUtilization }} + - type: Resource + resource: + name: cpu + target: + averageUtilization: {{ . }} + type: Utilization + {{- end }} + {{- with .Values.connect.hpa.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/connect/templates/connect-pdb.yaml b/charts/connect/templates/connect-pdb.yaml new file mode 100644 index 0000000..1ef7159 --- /dev/null +++ b/charts/connect/templates/connect-pdb.yaml @@ -0,0 +1,21 @@ +{{- if (and .Values.connect.create .Values.connect.pdb.enabled ) }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ .Values.connect.applicationName }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/component: connect + {{- include "onepassword-connect.labels" . | nindent 4 }} +{{- include "onepassword-connect.extraAnnotations" .Values.connect.pdb }} +spec: + {{- with .Values.connect.pdb.maxUnavailable }} + maxUnavailable: {{ . }} + {{- else }} + minAvailable: {{ .Values.connect.pdb.minAvailable }} + {{- end }} + selector: + matchLabels: + app.kubernetes.io/component: connect + {{- include "onepassword-connect.selectorLabels" . | nindent 6 }} +{{- end }} \ No newline at end of file diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index a3da48c..a1a8e3f 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -98,6 +98,33 @@ connect: # See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector nodeSelector: {} + # Affinity rules for the Connect pod + affinity: {} + + ## Horizontal Pod Autoscaling for the Connect pod + hpa: + # Enable Horizontal Pod Autoscaling for the Connect pod + enabled: false + # Minimum number of replicas for the Connect pod + minReplicas: 1 + # Maximum number of replicas for the Connect pod + maxReplicas: 3 + # Average Memory utilization percentage for the Connect pod + avgMemoryUtilization: 50 + # Average CPU utilization percentage for the Connect pod + avgCpuUtilization: 50 + # Defines the Autoscaling Behavior in up/down directions + behavior: {} + + ## Pod Disruption Budget for the Connect pod + pdb: + # Enable Horizontal Pod Autoscaling for the Connect pod + enabled: false + # Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) + maxUnavailable: 1 + # Number of pods that are available after eviction as number or percentage (eg.: 50%) + minAvailable: 0 + # 1Password Connect API and Sync Service probes: # Denotes whether the 1Password Connect API readiness probe will operate From 7688d2513ebd7ed1a828d298bafdb5dfb731d775 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 24 Aug 2023 12:44:53 +0200 Subject: [PATCH 4/8] Add HPA, PDB and Affinity for Operator resources --- .../templates/operator-deployment.yaml | 10 +++-- charts/connect/templates/operator-hpa.yaml | 39 +++++++++++++++++++ charts/connect/templates/operator-pdb.yaml | 21 ++++++++++ charts/connect/values.yaml | 31 +++++++++++++++ 4 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 charts/connect/templates/operator-hpa.yaml create mode 100644 charts/connect/templates/operator-pdb.yaml diff --git a/charts/connect/templates/operator-deployment.yaml b/charts/connect/templates/operator-deployment.yaml index 6e96260..a1a640c 100644 --- a/charts/connect/templates/operator-deployment.yaml +++ b/charts/connect/templates/operator-deployment.yaml @@ -32,10 +32,14 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: -{{- with .Values.operator.nodeSelector }} + {{- with .Values.operator.nodeSelector }} nodeSelector: -{{ toYaml . | indent 8 }} -{{- end }} + {{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.operator.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} tolerations: {{ toYaml .Values.operator.tolerations | indent 8 }} serviceAccountName: {{ .Values.operator.serviceAccount.name }} diff --git a/charts/connect/templates/operator-hpa.yaml b/charts/connect/templates/operator-hpa.yaml new file mode 100644 index 0000000..5639dc6 --- /dev/null +++ b/charts/connect/templates/operator-hpa.yaml @@ -0,0 +1,39 @@ +{{- if (and .Values.operator.create .Values.operator.hpa.enabled ) }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ .Values.operator.applicationName }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/component: operator + {{- include "onepassword-connect.labels" . | nindent 4 }} +{{- include "onepassword-connect.extraAnnotations" .Values.operator.hpa }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ .Values.operator.applicationName }} + minReplicas: {{ .Values.operator.hpa.minReplicas }} + maxReplicas: {{ .Values.operator.hpa.maxReplicas }} + metrics: + {{- with .Values.operator.hpa.avgMemoryUtilization }} + - type: Resource + resource: + name: memory + target: + averageUtilization: {{ . }} + type: Utilization + {{- end }} + {{- with .Values.operator.hpa.avgCpuUtilization }} + - type: Resource + resource: + name: cpu + target: + averageUtilization: {{ . }} + type: Utilization + {{- end }} + {{- with .Values.operator.hpa.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/connect/templates/operator-pdb.yaml b/charts/connect/templates/operator-pdb.yaml new file mode 100644 index 0000000..89e29ea --- /dev/null +++ b/charts/connect/templates/operator-pdb.yaml @@ -0,0 +1,21 @@ +{{- if (and .Values.operator.create .Values.operator.pdb.enabled ) }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ .Values.operator.applicationName }} + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/component: operator + {{- include "onepassword-connect.labels" . | nindent 4 }} +{{- include "onepassword-connect.extraAnnotations" .Values.operator.pdb }} +spec: + {{- with .Values.operator.pdb.maxUnavailable }} + maxUnavailable: {{ . }} + {{- else }} + minAvailable: {{ .Values.operator.pdb.minAvailable }} + {{- end }} + selector: + matchLabels: + app.kubernetes.io/component: operator + {{- include "onepassword-connect.selectorLabels" . | nindent 6 }} +{{- end }} \ No newline at end of file diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index a1a8e3f..f690b86 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -246,6 +246,37 @@ operator: # See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector nodeSelector: {} + # Affinity rules for the Operator pod + affinity: {} + + ## Horizontal Pod Autoscaling for the Operator pod + hpa: + # Enable Horizontal Pod Autoscaling for the Operator pod + enabled: false + # Additional annotations to be added to the HPA Operator. + annotations: {} + # Minimum number of replicas for the Operator pod + minReplicas: 1 + # Maximum number of replicas for the Operator pod + maxReplicas: 3 + # Average Memory utilization percentage for the Operator pod + avgMemoryUtilization: 50 + # Average CPU utilization percentage for the Operator pod + avgCpuUtilization: 50 + # Defines the Autoscaling Behavior in up/down directions + behavior: {} + + ## Pod Disruption Budget for the Operator pod + pdb: + # Enable Horizontal Pod Autoscaling for the Operator pod + enabled: false + # Additional annotations to be added to the PDB Operator. + annotations: {} + # Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) + maxUnavailable: 1 + # Number of pods that are available after eviction as number or percentage (eg.: 50%) + minAvailable: 0 + # Additional annotations to be added to the Operator pods. annotations: {} From c30a8c7561d1b20d0bb2d4ee47485027257c9856 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 24 Aug 2023 15:23:29 +0200 Subject: [PATCH 5/8] Update README.md and values.yaml with annotations value --- charts/connect/README.md | 25 +++++++++++++++++++++++++ charts/connect/values.yaml | 8 ++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/charts/connect/README.md b/charts/connect/README.md index bf1a8ef..951f1b1 100644 --- a/charts/connect/README.md +++ b/charts/connect/README.md @@ -83,6 +83,18 @@ helm install --set connect.applicationName=connect connect ./connect | connect.ingress.pathType | string | `"Prefix"` | Ingress PathType see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) | | connect.ingress.tls | list | `[]` | Ingress TLS see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) | | connect.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) stanza for the Connect pod | +| connect.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) Affinity rules for the Connect pod | +| connect.hpa.enabled | boolean | `false` | Enable Horizontal Pod Autoscaling for the Connect pod | +| connect.hpa.annotations | object | `{}` | Additional annotations to be added to the HPA Connect | +| connect.hpa.minReplicas | integer | `1` | Minimum number of replicas for the Connect pod | +| connect.hpa.maxReplicas | integer | `3` | Maximum number of replicas for the Connect pod | +| connect.hpa.avgMemoryUtilization | integer | `50` | Average Memory utilization percentage for the Connect pod | +| connect.hpa.avgCpuUtilization | integer | `50` | Average CPU utilization percentage for the Connect pod | +| connect.hpa.behavior | object | `{}` | Defines the Autoscaling Behavior in up/down directions | +| connect.pdb.enabled | boolean | `false` | Enable Horizontal Pod Autoscaling for the Connect pod | +| connect.pdb.annotations | object | `{}` | Additional annotations to be added to the PDB Connect | +| connect.pdb.maxUnavailable | integer | `1` | Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) | +| connect.pdb.minAvailable | integer | `0` | Number of pods that are available after eviction as number or percentage (eg.: 50%) | | connect.probes.readiness | boolean | `true` | Denotes whether the 1Password Connect API readiness probe will operate and ensure the pod is ready before serving traffic | | connect.probes.liveness | boolean | `true` | Denotes whether the 1Password Connect API will be continually checked by Kubernetes for liveness and restarted if the pod becomes unresponsive | | connect.annotations | object | `{}` | Additional annotations to be added to the Connect API deployment resource. | @@ -102,9 +114,22 @@ helm install --set connect.applicationName=connect connect ./connect | connect.version | string | `{{.Chart.AppVersion}}` | The 1Password Connect version to pull | | operator.autoRestart | boolean | `false` | Denotes whether the 1Password Operator will automatically restart deployments based on associated updated secrets. | | operator.create | boolean | `false` | Denotes whether the 1Password Operator will be deployed | +| operator.replicas | integer | `1` | The number of replicas to run the 1Password Operator deployment | | operator.imagePullPolicy | string | `"IfNotPresent"` | The 1Password Operator image pull policy | | operator.imageRepository | string | `"1password/onepassword-operator"` | The 1Password Operator repository | | operator.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) stanza for the operator pod | +| operator.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) Affinity rules for the Operator pod | +| operator.hpa.enabled | boolean | `false` | Enable Horizontal Pod Autoscaling for the Operator pod | +| operator.hpa.annotations | object | `{}` | Additional annotations to be added to the HPA Operator | +| operator.hpa.minReplicas | integer | `1` | Minimum number of replicas for the Operator pod | +| operator.hpa.maxReplicas | integer | `3` | Maximum number of replicas for the Operator pod | +| operator.hpa.avgMemoryUtilization | integer | `50` | Average Memory utilization percentage for the Operator pod | +| operator.hpa.avgCpuUtilization | integer | `50` | Average CPU utilization percentage for the Operator pod | +| operator.hpa.behavior | object | `{}` | Defines the Autoscaling Behavior in up/down directions | +| operator.pdb.enabled | boolean | `false` | Enable Horizontal Pod Autoscaling for the Operator pod | +| operator.pdb.annotations | object | `{}` | Additional annotations to be added to the PDB Operator | +| operator.pdb.maxUnavailable | integer | `1` | Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) | +| operator.pdb.minAvailable | integer | `0` | Number of pods that are available after eviction as number or percentage (eg.: 50%) | | operator.annotations | object | `{}` | Additional annotations to be added to the Operator deployment resource. | | operator.labels | object | `{}` | Additional labels to be added to the Operator deployment resource. | | operator.logLevel | string | `info` | Log level of the Operator container. Valid options are: debug, info and error. | diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index f690b86..b22077a 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -105,6 +105,8 @@ connect: hpa: # Enable Horizontal Pod Autoscaling for the Connect pod enabled: false + # Additional annotations to be added to the HPA Connect + annotations: {} # Minimum number of replicas for the Connect pod minReplicas: 1 # Maximum number of replicas for the Connect pod @@ -120,6 +122,8 @@ connect: pdb: # Enable Horizontal Pod Autoscaling for the Connect pod enabled: false + # Additional annotations to be added to the PDB Connect + annotations: {} # Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) maxUnavailable: 1 # Number of pods that are available after eviction as number or percentage (eg.: 50%) @@ -253,7 +257,7 @@ operator: hpa: # Enable Horizontal Pod Autoscaling for the Operator pod enabled: false - # Additional annotations to be added to the HPA Operator. + # Additional annotations to be added to the HPA Operator annotations: {} # Minimum number of replicas for the Operator pod minReplicas: 1 @@ -270,7 +274,7 @@ operator: pdb: # Enable Horizontal Pod Autoscaling for the Operator pod enabled: false - # Additional annotations to be added to the PDB Operator. + # Additional annotations to be added to the PDB Operator annotations: {} # Number of pods that are unavailble after eviction as number or percentage (eg.: 50%) maxUnavailable: 1 From 6abd9694274bbd81f7b0c290cc2d7ab0873ee308 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 24 Aug 2023 15:27:49 +0200 Subject: [PATCH 6/8] Fix README.md values description --- charts/connect/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/connect/README.md b/charts/connect/README.md index 951f1b1..b71093f 100644 --- a/charts/connect/README.md +++ b/charts/connect/README.md @@ -83,7 +83,7 @@ helm install --set connect.applicationName=connect connect ./connect | connect.ingress.pathType | string | `"Prefix"` | Ingress PathType see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) | | connect.ingress.tls | list | `[]` | Ingress TLS see [docs](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) | | connect.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) stanza for the Connect pod | -| connect.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) Affinity rules for the Connect pod | +| connect.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) rules for the Connect pod | | connect.hpa.enabled | boolean | `false` | Enable Horizontal Pod Autoscaling for the Connect pod | | connect.hpa.annotations | object | `{}` | Additional annotations to be added to the HPA Connect | | connect.hpa.minReplicas | integer | `1` | Minimum number of replicas for the Connect pod | @@ -118,7 +118,7 @@ helm install --set connect.applicationName=connect connect ./connect | operator.imagePullPolicy | string | `"IfNotPresent"` | The 1Password Operator image pull policy | | operator.imageRepository | string | `"1password/onepassword-operator"` | The 1Password Operator repository | | operator.nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) stanza for the operator pod | -| operator.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) Affinity rules for the Operator pod | +| operator.affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) rules for the Operator pod | | operator.hpa.enabled | boolean | `false` | Enable Horizontal Pod Autoscaling for the Operator pod | | operator.hpa.annotations | object | `{}` | Additional annotations to be added to the HPA Operator | | operator.hpa.minReplicas | integer | `1` | Minimum number of replicas for the Operator pod | From fa6272126710206b2c00db13d974c980f5d59db2 Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Thu, 24 Aug 2023 15:53:22 +0200 Subject: [PATCH 7/8] Fix indents for both deployments --- charts/connect/templates/connect-deployment.yaml | 6 +++--- charts/connect/templates/operator-deployment.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/connect/templates/connect-deployment.yaml b/charts/connect/templates/connect-deployment.yaml index 0937214..231bc05 100644 --- a/charts/connect/templates/connect-deployment.yaml +++ b/charts/connect/templates/connect-deployment.yaml @@ -35,9 +35,9 @@ spec: spec: {{- with .Values.connect.nodeSelector }} nodeSelector: - {{ toYaml . | indent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.operator.affinity }} + {{- with .Values.connect.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} @@ -53,7 +53,7 @@ spec: secretName: {{ .Values.connect.tls.secret }} {{- end }} tolerations: -{{ toYaml .Values.connect.tolerations | indent 8 }} + {{- toYaml .Values.connect.tolerations | nindent 8 }} containers: - name: {{ .Values.connect.api.name }} image: {{ .Values.connect.api.imageRepository }}:{{ tpl .Values.connect.version . }} diff --git a/charts/connect/templates/operator-deployment.yaml b/charts/connect/templates/operator-deployment.yaml index a1a640c..beee471 100644 --- a/charts/connect/templates/operator-deployment.yaml +++ b/charts/connect/templates/operator-deployment.yaml @@ -34,14 +34,14 @@ spec: spec: {{- with .Values.operator.nodeSelector }} nodeSelector: - {{ toYaml . | indent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.operator.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} tolerations: -{{ toYaml .Values.operator.tolerations | indent 8 }} + {{- toYaml .Values.operator.tolerations | nindent 8 }} serviceAccountName: {{ .Values.operator.serviceAccount.name }} containers: - name: {{ .Values.connect.applicationName }} From a0a154cf05fdf301942c946d13abcb1f558578ee Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Fri, 25 Aug 2023 12:13:21 +0200 Subject: [PATCH 8/8] Fix README.md values description --- charts/connect/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/connect/values.yaml b/charts/connect/values.yaml index b22077a..41ff938 100644 --- a/charts/connect/values.yaml +++ b/charts/connect/values.yaml @@ -120,7 +120,7 @@ connect: ## Pod Disruption Budget for the Connect pod pdb: - # Enable Horizontal Pod Autoscaling for the Connect pod + # Enable Pod Disruption Budget for the Connect pod enabled: false # Additional annotations to be added to the PDB Connect annotations: {} @@ -272,7 +272,7 @@ operator: ## Pod Disruption Budget for the Operator pod pdb: - # Enable Horizontal Pod Autoscaling for the Operator pod + # Enable Pod Disruption Budget for the Operator pod enabled: false # Additional annotations to be added to the PDB Operator annotations: {}