Skip to content

Commit

Permalink
[patch] Allow specifying CERT_MANAGER_NAMESPACE in suite_dns (#1476)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrercm authored Oct 1, 2024
1 parent 7cef1f9 commit 672daca
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion ibm/mas_devops/roles/suite_app_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
namespace: "{{ mas_app_namespace }}"
kind: "{{ mas_app_kind }}"
register: app_cr_result

- name: "Check that the application is ready to configure a workspace"
assert:
that:
Expand Down
7 changes: 7 additions & 0 deletions ibm/mas_devops/roles/suite_dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ Role Variables - General
- Environment Variable: `OCP_INGRESS`
- Default: None

### cert_manager_namespace
Namespace where Certificate Manager is installed.

- Optional
- Environment Variable: `CERT_MANAGER_NAMESPACE`
- Default: None

### custom_labels
List of comma separated key=value pairs for setting custom labels on instance specific resources.

Expand Down
2 changes: 2 additions & 0 deletions ibm/mas_devops/roles/suite_dns/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ mas_manual_cert_mgmt: "{{ lookup('env', 'MAS_MANUAL_CERT_MGMT')| default(False,
# -----------------------------------------------------------------------------
# If IBM Certificate Manager is installed then 'cert_manager_service_account' must be 'ibm-cert-manager-controller'
# If Red Hat Certificate Manager is installed then 'cert_manager_service_account' must be 'cert-manager'
cert_manager_namespace: "{{ lookup('env', 'CERT_MANAGER_NAMESPACE') }}"

cert_manager_service_account: "{{ 'ibm-cert-manager-controller' if (cert_manager_namespace == 'ibm-common-services') else 'cert-manager' }}"

# MAS Domain
Expand Down
4 changes: 4 additions & 0 deletions ibm/mas_devops/roles/suite_dns/tasks/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
include_tasks: "{{ role_path }}/../../common_tasks/detect_cert_manager.yml"
when: cert_manager_namespace is not defined or cert_manager_namespace | length == 0

- debug:
msg:
- "Certificate Manager Namespace .......... {{ cert_manager_namespace }}"

# 2. Run provider task
# -----------------------------------------------------------------------------
- name: "Run the provider specific task"
Expand Down

0 comments on commit 672daca

Please sign in to comment.