[bitnami/rabbitmq] add commonAnnotations to values.yaml to apply it to all deployed resources (#6359)

* [bitnami/rabbitmq] commonAnnotations in values 6334

* pump chart version to 8.15.0 and add connotAnnotation to readme

Co-authored-by: d.migachev <d.migachev@alean.ru>
This commit is contained in:
Avaar0032
2021-05-14 10:52:48 +03:00
committed by GitHub
parent 285751495a
commit 395934bfc4
17 changed files with 66 additions and 12 deletions

View File

@@ -23,4 +23,4 @@ name: rabbitmq
sources:
- https://github.com/bitnami/bitnami-docker-rabbitmq
- https://www.rabbitmq.com
version: 8.14.1
version: 8.15.0

View File

@@ -55,12 +55,13 @@ The following table lists the configurable parameters of the RabbitMQ chart and
### Common parameters
| Parameter | Description | Default |
|--------------------|----------------------------------------------------------------------|-----------------|
| `nameOverride` | String to partially override rabbitmq.fullname | `nil` |
| `fullnameOverride` | String to fully override rabbitmq.fullname | `nil` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` |
| Parameter | Description | Default |
|---------------------|----------------------------------------------------------------------|--------------------------------|
| `nameOverride` | String to partially override rabbitmq.fullname | `nil` |
| `fullnameOverride` | String to fully override rabbitmq.fullname | `nil` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` (evaluated as a template) |
### RabbitMQ parameters

View File

@@ -5,6 +5,9 @@ metadata:
name: {{ include "rabbitmq.fullname" . }}-certs
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
ca.crt:

View File

@@ -4,6 +4,9 @@ metadata:
name: {{ template "rabbitmq.fullname" . }}-config
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
rabbitmq.conf: |-
{{- include "common.tplvalues.render" (dict "value" .Values.configuration "context" $) | nindent 4 }}

View File

@@ -9,6 +9,9 @@ metadata:
{{- if .Values.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- end }}

View File

@@ -5,6 +5,9 @@ metadata:
name: {{ include "rabbitmq.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
podSelector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}

View File

@@ -5,6 +5,9 @@ metadata:
name: {{ include "rabbitmq.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}

View File

@@ -12,6 +12,9 @@ metadata:
{{- if .Values.metrics.prometheusRule.additionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
groups:
{{- with .Values.metrics.prometheusRule.rules }}

View File

@@ -5,6 +5,9 @@ metadata:
name: {{ template "rabbitmq.fullname" . }}-endpoint-reader
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups: [""]
resources: ["endpoints"]

View File

@@ -5,6 +5,9 @@ metadata:
name: {{ template "rabbitmq.fullname" . }}-endpoint-reader
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ template "rabbitmq.serviceAccountName" . }}

View File

@@ -5,6 +5,9 @@ metadata:
name: {{ include "rabbitmq.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if and (not .Values.auth.existingPasswordSecret) (not .Values.loadDefinition.enabled) }}

View File

@@ -5,6 +5,9 @@ metadata:
name: {{ include "rabbitmq.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
secrets:
- name: {{ include "rabbitmq.fullname" . }}
{{- end }}

View File

@@ -12,6 +12,9 @@ metadata:
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics

View File

@@ -7,6 +7,9 @@ metadata:
{{- if .Values.statefulsetLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.statefulsetLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
serviceName: {{ template "rabbitmq.fullname" . }}-headless
podManagementPolicy: {{ .Values.podManagementPolicy }}
@@ -25,6 +28,9 @@ spec:
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
{{- end }}
checksum/config: {{ include (print $.Template.BasePath "/configuration.yaml") . | sha256sum }}
{{- if or (not .Values.auth.existingErlangSecret) (not .Values.auth.existingPasswordSecret) .Values.extraSecrets }}
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}

View File

@@ -4,8 +4,14 @@ metadata:
name: {{ include "rabbitmq.fullname" . }}-headless
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.service.annotationsHeadless }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.service.annotationsHeadless "context" $) | nindent 4 }}
{{- if or (.Values.service.annotationsHeadless) (.Values.commonAnnotations) }}
annotations:
{{- if .Values.commonAnnotations}}
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
{{- end -}}
{{- if .Values.service.annotationsHeadless}}
{{- include "common.tplvalues.render" (dict "value" .Values.service.annotationsHeadless "context" $) | nindent 4 }}
{{- end -}}
{{- end }}
spec:
clusterIP: None

View File

@@ -7,8 +7,14 @@ metadata:
{{- if .Values.service.labels }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.labels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- if or (.Values.service.annotations) (.Values.commonAnnotations) }}
annotations:
{{- if .Values.commonAnnotations}}
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
{{- end -}}
{{- if .Values.service.annotations}}
{{- include "common.tplvalues.render" (dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- end -}}
{{- end }}
spec:
type: {{ .Values.service.type }}

View File

@@ -53,7 +53,9 @@ clusterDomain: cluster.local
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## @param commonAnnotations Annotations to add to all deployed objects
##
commonAnnotations: {}
## RabbitMQ Authentication parameters
##
auth: