Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding postgres annotations support #1829

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/crd/bases/awx.ansible.com_awxs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ spec:
web_annotations:
description: Web deployment annotations. This will override the general annotations parameter for the Web deployment.
type: string
postgres_annotations:
description: Annotations to add to the Postgres deployment.
type: string
tolerations:
description: node tolerations for the pods
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,11 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Postgres Annotations
path: postgres_annotations
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tolerations
path: tolerations
x-descriptors:
Expand Down
6 changes: 6 additions & 0 deletions roles/installer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ task_annotations: ''
# my.web-annotation/2: value2
web_annotations: ''

# Add annotations to postgres pod. Specify as literal block. E.g.:
# postgres_annotations: |
# my.annotation/1: value
# my.annotation/2: value2
postgres_annotations: ''

admin_user: admin
admin_email: test@example.com

Expand Down
3 changes: 3 additions & 0 deletions roles/installer/templates/statefulsets/postgres.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
app.kubernetes.io/component: 'database'
app.kubernetes.io/part-of: '{{ ansible_operator_meta.name }}'
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
{% if postgres_annotations %}
{{ postgres_annotations | indent(width=8) }}
{% endif %}
spec:
{% if image_pull_secret is defined %}
imagePullSecrets:
Expand Down
Loading