Skip to content
Merged
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
25 changes: 25 additions & 0 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,31 @@
web_url: "https://{{ route_host }}"
when: ingress_type | lower == 'route'

- name: Look up details for this deployment
k8s_info:
api_version: "{{ api_version }}"
kind: "{{ kind }}"
name: "{{ ansible_operator_meta.name }}"
namespace: "{{ ansible_operator_meta.namespace }}"
register: this_galaxy

- name: set annotations based on this_galaxy
set_fact:
this_annotations: "{{ this_galaxy['resources'][0]['metadata']['annotations'] | default({}) }}"

- name: set client_request_timeout based on annotation
set_fact:
client_request_timeout: "{{ (this_annotations['aap.ansible.io/client-request-timeout'][:-1]) | int }}"
client_request_timeout_overidden: true
when:
- "'aap.ansible.io/client-request-timeout' in this_annotations"
- this_annotations['aap.ansible.io/client-request-timeout'] is match('^\\d+s$')

- name: client_request_timeout has been changed
debug:
msg: "client_request_timeout's default 30s value has been overriden by the annotation 'aap.ansible.io/client-request-timeout' to {{ client_request_timeout }}s"
when: client_request_timeout_overidden | default(false)

- name: Configure Postgres Configuration Secret
include_tasks: postgres_configuration.yml

Expand Down
Loading