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

Add pod_labels for custom pod labels #676

Closed
wants to merge 1 commit into from
Closed
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 @@ -134,6 +134,9 @@ spec:
node_selector:
description: nodeSelector for the pods
type: string
pod_labels:
description: Additional labels to apply to the pod
type: string
service_labels:
description: Additional labels to apply to the service
type: string
Expand Down
6 changes: 6 additions & 0 deletions config/manifests/bases/olm-parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,12 @@
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Pod Labels
path: pod_labels
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:text
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Service Labels
path: service_labels
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 @@ -3,6 +3,12 @@ deployment_type: awx
kind: '{{ deployment_type | upper }}'
api_version: '{{ deployment_type }}.ansible.com/v1beta1'

# Custom labels for the tower pod. Specify as literal block. E.g.:
# pod_labels: |
# environment: non-production
# zone: internal
pod_labels: ''

database_name: "{{ deployment_type }}"
database_username: "{{ deployment_type }}"

Expand Down
1 change: 1 addition & 0 deletions roles/installer/templates/deployment.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
app.kubernetes.io/part-of: '{{ ansible_operator_meta.name }}'
app.kubernetes.io/managed-by: '{{ deployment_type }}-operator'
app.kubernetes.io/component: '{{ deployment_type }}'
{{ pod_labels | indent(width=8) }}
spec:
serviceAccountName: '{{ ansible_operator_meta.name }}'
{% if image_pull_secret %}
Expand Down