Skip to content

Commit 358c315

Browse files
authored
Add podLabels value to add custom labels to operator pods (#522)
1 parent c555f54 commit 358c315

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: ENHANCEMENTS
2+
body: '`Helm Chart`: Add the ability to configure additional labels for the Operator pod.'
3+
time: 2024-12-01T18:56:49.558093+01:00
4+
custom:
5+
PR: "522"

charts/hcp-terraform-operator/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ For a more detailed explanation, please refer to the [FAQ](../../docs/faq.md#gen
182182
| operator.tfeAddress | string | `""` | The API URL of a Terraform Enterprise instance. |
183183
| operator.tolerations | list | `[]` | Kubernetes Tolerations. More information: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
184184
| operator.watchedNamespaces | list | `[]` | List of namespaces the controllers should watch. |
185+
| podLabels | object | `{}` | Additional labels to add to the Operator pods. |
185186
| priorityClassName | string | `""` | Deployment priorityClassName. More information in [Kubernetes documentation](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/). |
186187
| rbac.create | bool | `true` | Specifies whether a Role-Based Access Control (RBAC) resources should be created |
187188
| replicaCount | int | `2` | The number of Operator replicas. |

charts/hcp-terraform-operator/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ spec:
2020
labels:
2121
{{- include "hcp-terraform-operator.selectorLabels" . | nindent 8 }}
2222
control-plane: {{ .Release.Name }}-controller-manager
23+
{{- with .Values.podLabels }}
24+
{{- tpl (toYaml .) $ | nindent 8 }}
25+
{{- end }}
2326
spec:
2427
{{- with .Values.priorityClassName }}
2528
priorityClassName: {{ . | quote }}

charts/hcp-terraform-operator/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# -- Reference to one or more secrets essential for pulling container images.
55
imagePullSecrets: []
66

7+
# -- Additional labels to add to the Operator pods.
8+
podLabels: {}
9+
710
# -- The number of Operator replicas.
811
replicaCount: 2
912

0 commit comments

Comments
 (0)