Skip to content

Commit

Permalink
enable setting labels just for pods (#1876)
Browse files Browse the repository at this point in the history
the 'additionalLabels' setting is a bit too coarse-grained especially
if you want to utilize e.g. istio sidecar injection, which is only
valid for pods.
  • Loading branch information
diurnalist authored Feb 28, 2025
1 parent bc4e52f commit 10b863e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy/helm/grafana-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ It's easier to just manage this configuration outside of the operator.
| namespaceScope | bool | `false` | If the operator should run in namespace-scope or not, if true the operator will only be able to manage instances in the same namespace |
| nodeSelector | object | `{}` | pod node selector |
| podAnnotations | object | `{}` | pod annotations |
| podLabels | object | `{}` | pod labels |
| podSecurityContext | object | `{}` | pod security context |
| priorityClassName | string | `""` | pod priority class name |
| rbac.create | bool | `true` | Specifies whether to create the ClusterRole and ClusterRoleBinding. If "namespaceScope" is true or "watchNamespaces" is set, this will create Role and RoleBinding instead. |
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/grafana-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
labels:
{{- include "grafana-operator.labels" . | nindent 8 }}
app.kubernetes.io/component: operator
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/grafana-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ metricsService:
# -- additional labels to add to all resources
additionalLabels: {}

# -- pod labels
podLabels: {}

# -- pod annotations
podAnnotations: {}

Expand Down

0 comments on commit 10b863e

Please sign in to comment.