Skip to content

Commit

Permalink
fix: Add support for upgrade of cert-manager apigee#34
Browse files Browse the repository at this point in the history
  • Loading branch information
zvdy committed Oct 10, 2024
1 parent e6a8eea commit b53ae46
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions roles/cert-manager/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@
# limitations under the License.
---
# tasks file for cert-manager
# tasks file for cert-manager
- name: Certificates directory exists
file:
path: "{{ setup_path }}"
state: directory

- name: Check if cert-manager is installed
kubernetes.core.k8s_info:
kind: Deployment
namespace: cert-manager
label_selectors:
- "app.kubernetes.io/instance=cert-manager"
register: cert_manager_deployments
ignore_errors: true

- name: Install cert manager
block:
- name: Download cert-manager
Expand All @@ -27,9 +37,9 @@

- name: Apply cert-manager manifest to the cluster.
kubernetes.core.k8s:
state: "{{cert_manager_status}}"
state: "{{ cert_manager_status }}"
src: "{{ setup_path }}/cert-manager.yaml"
when: "install_cert_manager"
when: "install_cert_manager and cert_manager_deployments.resources | length == 0"

- name: Wait for cert-manager to be up.
kubernetes.core.k8s_info:
Expand Down

0 comments on commit b53ae46

Please sign in to comment.