Skip to content

Commit

Permalink
Add database secret to metric jobs (#1843)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhageman committed Apr 30, 2024
1 parent ed72dc1 commit 6baf3a1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions roles/installer/templates/cronjobs/metrics-utility-gather.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ spec:
mountPath: "/etc/tower/conf.d/credentials.py"
subPath: credentials.py
readOnly: true
- name: "{{ secret_key_secret_name }}"
mountPath: /etc/tower/SECRET_KEY
subPath: SECRET_KEY
readOnly: true
- name: {{ ansible_operator_meta.name }}-settings
mountPath: /etc/tower/settings.py
subPath: settings.py
Expand All @@ -74,6 +78,12 @@ spec:
items:
- key: credentials.py
path: 'credentials.py'
- name: "{{ secret_key_secret_name }}"
secret:
secretName: '{{ secret_key_secret_name }}'
items:
- key: secret_key
path: SECRET_KEY
- name: {{ ansible_operator_meta.name }}-settings
configMap:
name: '{{ ansible_operator_meta.name }}-{{ deployment_type }}-configmap'
Expand Down
10 changes: 10 additions & 0 deletions roles/installer/templates/cronjobs/metrics-utility-report.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ spec:
mountPath: "/etc/tower/conf.d/credentials.py"
subPath: credentials.py
readOnly: true
- name: "{{ secret_key_secret_name }}"
mountPath: /etc/tower/SECRET_KEY
subPath: SECRET_KEY
readOnly: true
- name: {{ ansible_operator_meta.name }}-settings
mountPath: /etc/tower/settings.py
subPath: settings.py
Expand All @@ -71,6 +75,12 @@ spec:
items:
- key: credentials.py
path: 'credentials.py'
- name: "{{ secret_key_secret_name }}"
secret:
secretName: '{{ secret_key_secret_name }}'
items:
- key: secret_key
path: SECRET_KEY
- name: {{ ansible_operator_meta.name }}-settings
configMap:
name: '{{ ansible_operator_meta.name }}-{{ deployment_type }}-configmap'
Expand Down

0 comments on commit 6baf3a1

Please sign in to comment.