Skip to content

Commit

Permalink
feat: added support to skip cert-manager install
Browse files Browse the repository at this point in the history
  • Loading branch information
anaik91 committed Oct 20, 2023
1 parent b4ed7f0 commit 551cddb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion roles/cert-manager/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
---
# defaults file for cert-manager
setup_path: "~"
install_cert_manager: true
cert_manager_version: v1.7.2
cert_manager_status: present
cert_manager_status: present
19 changes: 11 additions & 8 deletions roles/cert-manager/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@
path: "{{ setup_path }}"
state: directory

- name: Download cert-manager
uri:
url: https://github.com/jetstack/cert-manager/releases/download/{{ cert_manager_version }}/cert-manager.yaml
dest: "{{ setup_path }}/cert-manager.yaml"
- name: Install cert manager
block:
- name: Download cert-manager
uri:
url: https://github.com/jetstack/cert-manager/releases/download/{{ cert_manager_version }}/cert-manager.yaml
dest: "{{ setup_path }}/cert-manager.yaml"

- name: Apply cert-manager manifest to the cluster.
kubernetes.core.k8s:
state: "{{cert_manager_status}}"
src: "{{ setup_path }}/cert-manager.yaml"
- name: Apply cert-manager manifest to the cluster.
kubernetes.core.k8s:
state: "{{cert_manager_status}}"
src: "{{ setup_path }}/cert-manager.yaml"
when: "install_cert_manager"

- name: Wait for cert-manager to be up.
kubernetes.core.k8s_info:
Expand Down
1 change: 1 addition & 0 deletions vars/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
setup_path: "/tmp"

# Set `cert_manager_version: : v1.7.2` refer: https://cloud.google.com/apigee/docs/hybrid/v1.10/install-cert-manager
install_cert_manager: false
cert_manager_version: v1.7.2

################################################ TLS certificate details ################################################
Expand Down

0 comments on commit 551cddb

Please sign in to comment.