diff options
Diffstat (limited to 'roles/kubernetes/addons/cert-manager/tasks/main.yml')
-rw-r--r-- | roles/kubernetes/addons/cert-manager/tasks/main.yml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/roles/kubernetes/addons/cert-manager/tasks/main.yml b/roles/kubernetes/addons/cert-manager/tasks/main.yml index bc653e01..adac0548 100644 --- a/roles/kubernetes/addons/cert-manager/tasks/main.yml +++ b/roles/kubernetes/addons/cert-manager/tasks/main.yml @@ -8,18 +8,25 @@ path: /etc/kubernetes/addons/cert-manager state: directory - - name: copy config for cert-manager + ## you may download these using the following command: + # wget -O cert-manager.{{ kubernetes_cert_manager_version }}.yml https://github.com/cert-manager/cert-manager/releases/download/v{{ kubernetes_cert_manager_version }}/cert-manager.yaml + - name: copy base config for cert-manager + copy: + src: "cert-manager.{{ kubernetes_cert_manager_version }}.yml" + dest: /etc/kubernetes/addons/cert-manager/upstream.yml + + - name: generate kustomization for cert-manager template: - src: "config.{{ kubernetes_cert_manager_version }}.yml.j2" - dest: /etc/kubernetes/addons/cert-manager/config.yml + src: "kustomization.yml.j2" + dest: /etc/kubernetes/addons/cert-manager/kustomization.yml - name: check if cert-manager is already installed check_mode: no - command: kubectl --kubeconfig /etc/kubernetes/admin.conf diff -f /etc/kubernetes/addons/cert-manager/config.yml + command: kubectl --kubeconfig /etc/kubernetes/admin.conf diff -k /etc/kubernetes/addons/cert-manager failed_when: false changed_when: false register: kube_cert_manager_diff_result - name: install cert-manager onto the cluster when: kube_cert_manager_diff_result.rc != 0 - command: kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f /etc/kubernetes/addons/cert-manager/config.yml + command: kubectl --kubeconfig /etc/kubernetes/admin.conf apply -k /etc/kubernetes/addons/cert-manager |