Skip to content

Commit

Permalink
Fix qdr auth one_time_upgrade label check (#518) (#521)
Browse files Browse the repository at this point in the history
* Fix qdr auth one_time_upgrade label check

* Fix incorrect variable naming on one_time_upgrade label check

* Adjust QDR authentication password generation (#520)

Adjust the passwords being generated for QDR authentication since
certain characters (such as colon) will cause a failure in the parsing
routine within qpid-dispatch. Updates the lookup function to only use
ascii_letters and digits and increases the length to 32 characters.

---------

Co-authored-by: Leif Madsen <[email protected]>
  • Loading branch information
csibbitt and leifmadsen authored Nov 6, 2023
1 parent 03a5873 commit b063b92
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions roles/servicetelemetry/tasks/component_qdr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@
block:
- name: Get QDR BasicAuth secret
k8s_info:
api_version: interconnectedcloud.github.io/v1alpha1
kind: Interconnect
name: "{{ ansible_operator_meta.name }}-interconnect"
api_version: v1
kind: Secret
name: "{{ ansible_operator_meta.name }}-interconnect-users"
namespace: "{{ ansible_operator_meta.namespace }}"
register: _qdr_basicauth_object

Expand All @@ -175,9 +175,9 @@
labels:
stf_one_time_upgrade: "{{ lookup('pipe', 'date +%s') }}"
stringData:
guest: "{{ lookup('password', '/dev/null') }}"
guest: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=32') }}"
when:
- _qdr_basicauth_object.resources[0] is defined and _qdr_basicauth_object[0].metadata.labels.stf_one_time_upgrade is not defined
- _qdr_basicauth_object.resources[0] is defined and _qdr_basicauth_object.resources[0].metadata.labels.stf_one_time_upgrade is not defined

- name: Set default Interconnect manifest
set_fact:
Expand Down

0 comments on commit b063b92

Please sign in to comment.