diff --git a/helm/pmm-server/README.md b/helm/pmm-server/README.md index 1527f94..6f7d711 100644 --- a/helm/pmm-server/README.md +++ b/helm/pmm-server/README.md @@ -45,6 +45,10 @@ The following tables lists the configurable parameters of the Percona chart and | `service.type` | Option specifying the [Kubernetes Service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to be used | "" | | `service.loadBalancerIP` | IP address for the public access | "" | | `prometheus.configMap.name` | Name of k8s configMap with scrape_configs | "" | +| `statefulSet.labels` | Additional labels for the statefulset | "" | +| `statefulSet.annotations` | Annotations for the statefulset | "" | +| `statefulSet.podTemplate.labels` | Additional labels to be passed to the underlying Pod | "" | +| `statefulSet.podTemplate.annotations` | Annotations for the Pod | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/helm/pmm-server/templates/statefulset.yaml b/helm/pmm-server/templates/statefulset.yaml index efcd58e..57cc3be 100644 --- a/helm/pmm-server/templates/statefulset.yaml +++ b/helm/pmm-server/templates/statefulset.yaml @@ -7,6 +7,13 @@ metadata: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" +{{- if .Values.statefulSet.labels }} +{{ toYaml .Values.statefulSet.labels | indent 4 }} +{{- end }} +{{- with .Values.statefulSet.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} spec: serviceName: {{ template "percona.fullname" . }} replicas: 1 @@ -21,6 +28,13 @@ spec: labels: app: {{ template "percona.fullname" . }} component: pmm +{{- if .Values.statefulSet.podTemplate.labels }} +{{ toYaml .Values.statefulSet.podTemplate.labels | indent 8 }} +{{- end }} +{{- with .Values.statefulSet.podTemplate.annotations }} + annotations: +{{ toYaml . | indent 8 }} +{{- end }} spec: securityContext: supplementalGroups: [1000] diff --git a/helm/pmm-server/values.yaml b/helm/pmm-server/values.yaml index 956cf52..eff2dd9 100644 --- a/helm/pmm-server/values.yaml +++ b/helm/pmm-server/values.yaml @@ -54,3 +54,12 @@ service: prometheus: configMap: name: "" + +## Set Statefulset Labels and Annotations +statefulSet: + annotations: {} + labels: {} + ## Set Pod Labels and Annotations + podTemplate: + annotations: {} + labels: {}