[stable/stolon] Add annotation support for jobs (#21894)

* Add annotation support for jobs

Signed-off-by: Emrah Çetiner <emrah.cetiner@loodos.com>

* Bump the version

Signed-off-by: Emrah Çetiner <emrah.cetiner@loodos.com>
Signed-off-by: Emrah Çetiner <emrah.cetiner@loodos.com>

* Wrap job.annotations with if statement

Signed-off-by: Emrah Çetiner <emrah.cetiner@loodos.com>
Signed-off-by: Emrah Çetiner <emrah.cetiner@loodos.com>
This commit is contained in:
emrah
2020-04-26 03:21:28 -07:00
committed by GitHub
parent 50e9c336ed
commit 3cae659574
6 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: stolon
version: 1.5.9
version: 1.5.10
appVersion: 0.13.0
description: Stolon - PostgreSQL cloud native High Availability.
home: https://github.com/sorintlab/stolon
+1
View File
@@ -64,6 +64,7 @@ Kubernetes is the default store backend. `consul`, `etcdv2` or `etcdv3` can also
| `serviceMonitor.scrapeTimeout` | Set to use a different value than the default Prometheus scrape timeout | `nil` |
| `job.autoCreateCluster` | Set to `false` to force-disable auto-cluster-creation which may clear pre-existing postgres db data | `true` |
| `job.autoUpdateClusterSpec` | Set to `false` to force-disable auto-cluster-spec-update | `true` |
| `job.annotations` | Annotations for Jobs, the value is evaluated as a template. | `{}` |
| `clusterSpec` | Stolon cluster spec [reference](https://github.com/sorintlab/stolon/blob/master/doc/cluster_spec.md) | `{}` |
| `tls.enabled` | Enable tls support to postgresql | `false` |
| `tls.rootCa` | Ca certificate | `""` |
@@ -17,6 +17,10 @@ spec:
labels:
app: {{ template "stolon.fullname" . }}
release: {{ .Release.Name }}
{{- if .Values.job.annotations }}
annotations:
{{ toYaml .Values.job.annotations | indent 8 }}
{{- end }}
spec:
restartPolicy: OnFailure
serviceAccountName: {{ template "stolon.serviceAccountName" . }}
@@ -29,6 +29,10 @@ spec:
heritage: {{.Release.Service | quote }}
release: {{.Release.Name | quote }}
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
{{- if .Values.job.annotations }}
annotations:
{{ toYaml .Values.job.annotations | indent 8 }}
{{- end }}
spec:
restartPolicy: Never
containers:
@@ -17,6 +17,10 @@ spec:
labels:
app: {{ template "stolon.fullname" . }}
release: {{ .Release.Name }}
{{- if .Values.job.annotations }}
annotations:
{{ toYaml .Values.job.annotations | indent 8 }}
{{- end }}
spec:
restartPolicy: OnFailure
serviceAccountName: {{ template "stolon.serviceAccountName" . }}
+1
View File
@@ -88,6 +88,7 @@ serviceMonitor:
job:
autoCreateCluster: true
autoUpdateClusterSpec: true
annotations: {}
clusterSpec: {}
# sleepInterval: 1s