-
Notifications
You must be signed in to change notification settings - Fork 703
Expand file tree
/
Copy pathmanagement-pod.yml.j2
More file actions
36 lines (36 loc) · 1.14 KB
/
management-pod.yml.j2
File metadata and controls
36 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
apiVersion: v1
kind: Pod
metadata:
name: {{ ansible_operator_meta.name }}-db-management
namespace: "{{ backup_pvc_namespace }}"
labels:
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
spec:
containers:
- name: {{ ansible_operator_meta.name }}-db-management
image: "{{ _postgres_image }}"
imagePullPolicy: "{{ image_pull_policy }}"
command: ["sleep", "infinity"]
volumeMounts:
- name: {{ ansible_operator_meta.name }}-backup
mountPath: /backups
readOnly: false
{% if backup_resource_requirements is defined %}
resources:
{{ backup_resource_requirements | to_nice_yaml(indent=2) | indent(width=6, first=False) }}
{%- endif %}
{% if db_management_pod_node_selector %}
nodeSelector:
{{ db_management_pod_node_selector | indent(width=8) }}
{% endif %}
{% if db_management_pod_tolerations %}
tolerations:
{{ db_management_pod_tolerations | indent(width=8) }}
{% endif %}
volumes:
- name: {{ ansible_operator_meta.name }}-backup
persistentVolumeClaim:
claimName: {{ backup_claim }}
readOnly: false
restartPolicy: Never