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

[patch] Ensure cluster_ingress_tls_crt_remove_it is defined #1133

Merged
merged 1 commit into from
Dec 7, 2023
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
9 changes: 7 additions & 2 deletions ibm/mas_devops/common_tasks/get_signed_ingress_cert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@
cluster_ingress_tls_crt: "{{ cluster_ingress_tls_crt | regex_findall('(?s)(-----BEGIN .+?-----.+?-----END .+?-----)', multiline=True, ignorecase=True) }}"
no_log: true

# Filter DST Root CA X3 issuer certificate if present
# Filter out of date DST Root CA X3 issuer certificate if present
# This is a known problem in IBMCloud ROKS clusters, where an expired
# root certificate is included in the chain, the inclusion of this
# certificate in our truststore prevents MAS being able to connect
# to IBM User Data Services because it's an invalid certificate.
- name: "Check if DST Root CA X3 issuer certificate is present"
vars:
dst_root_x3: "Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5" # if DST Root CA X3 issuer certificate is present, we'll filter from the MAS config
dst_root_x3: "Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5"
no_log: true
set_fact:
cluster_ingress_tls_crt_remove_it: "{{ cluster_ingress_tls_crt_remove_it|default([]) + [item] }}"
Expand All @@ -115,6 +119,7 @@
set_fact:
cluster_ingress_tls_crt: "{{ cluster_ingress_tls_crt | difference(cluster_ingress_tls_crt_remove_it) | list }}"
when:
- cluster_ingress_tls_crt_remove_it is defined
- cluster_ingress_tls_crt is defined
- cluster_ingress_tls_crt | length > 0

Expand Down
Loading