From 6c004efd5f50b656e5cb6afc41d92086210b2677 Mon Sep 17 00:00:00 2001 From: rtsp Date: Mon, 11 Oct 2021 23:40:40 +0700 Subject: [PATCH] cert_manager: Remove deprecated ClusterIssuer and its Secret (#8064) --- .../cert_manager/tasks/main.yml | 29 ------------------- .../clusterissuer-cert-manager.yml.j2 | 23 --------------- .../templates/secret-cert-manager.yml.j2 | 9 ------ 3 files changed, 61 deletions(-) delete mode 100644 roles/kubernetes-apps/ingress_controller/cert_manager/templates/clusterissuer-cert-manager.yml.j2 delete mode 100644 roles/kubernetes-apps/ingress_controller/cert_manager/templates/secret-cert-manager.yml.j2 diff --git a/roles/kubernetes-apps/ingress_controller/cert_manager/tasks/main.yml b/roles/kubernetes-apps/ingress_controller/cert_manager/tasks/main.yml index c36f2c993..a4926a25a 100644 --- a/roles/kubernetes-apps/ingress_controller/cert_manager/tasks/main.yml +++ b/roles/kubernetes-apps/ingress_controller/cert_manager/tasks/main.yml @@ -45,7 +45,6 @@ - { name: deploy-cert-manager, file: deploy-cert-manager.yml, type: deploy } - { name: svc-cert-manager, file: svc-cert-manager.yml, type: svc } - { name: webhook-cert-manager, file: webhook-cert-manager.yml, type: webhook } - - { name: secret-cert-manager, file: secret-cert-manager.yml, type: secret } - name: Cert Manager | Create manifests template: @@ -66,31 +65,3 @@ with_items: "{{ cert_manager_manifests.results }}" when: - inventory_hostname == groups['kube_control_plane'][0] - -- name: Cert Manager | Wait for Webhook pods become ready - command: "{{ bin_dir }}/kubectl wait po --namespace={{ cert_manager_namespace }} --selector app=webhook --for=condition=Ready --timeout=600s" - register: cert_manager_webhook_pods_ready - when: inventory_hostname == groups['kube_control_plane'][0] - until: cert_manager_webhook_pods_ready is succeeded - retries: 30 - delay: 10 - -- name: Cert Manager | Create ClusterIssuer manifest - template: - src: "clusterissuer-cert-manager.yml.j2" - dest: "{{ kube_config_dir }}/addons/cert_manager/clusterissuer-cert-manager.yml" - register: cert_manager_clusterissuer_manifest - when: - - inventory_hostname == groups['kube_control_plane'][0] and cert_manager_webhook_pods_ready is succeeded - -- name: Cert Manager | Apply ClusterIssuer manifest - kube: - name: "clusterissuer-cert-manager" - kubectl: "{{ bin_dir }}/kubectl" - filename: "{{ kube_config_dir }}/addons/cert_manager/clusterissuer-cert-manager.yml" - state: "latest" - when: inventory_hostname == groups['kube_control_plane'][0] and cert_manager_clusterissuer_manifest is succeeded - register: cert_manager_apply_clusterissuer_manifest - until: cert_manager_apply_clusterissuer_manifest is succeeded - retries: 30 - delay: 10 diff --git a/roles/kubernetes-apps/ingress_controller/cert_manager/templates/clusterissuer-cert-manager.yml.j2 b/roles/kubernetes-apps/ingress_controller/cert_manager/templates/clusterissuer-cert-manager.yml.j2 deleted file mode 100644 index f016ad053..000000000 --- a/roles/kubernetes-apps/ingress_controller/cert_manager/templates/clusterissuer-cert-manager.yml.j2 +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright YEAR The Jetstack cert-manager contributors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: cert-manager.io/v1alpha2 -kind: ClusterIssuer -metadata: - name: ca-issuer - namespace: {{ cert_manager_namespace }} -spec: - ca: - secretName: ca-key-pair diff --git a/roles/kubernetes-apps/ingress_controller/cert_manager/templates/secret-cert-manager.yml.j2 b/roles/kubernetes-apps/ingress_controller/cert_manager/templates/secret-cert-manager.yml.j2 deleted file mode 100644 index c9785f43e..000000000 --- a/roles/kubernetes-apps/ingress_controller/cert_manager/templates/secret-cert-manager.yml.j2 +++ /dev/null @@ -1,9 +0,0 @@ ---- -apiVersion: v1 -kind: Secret -metadata: - name: ca-key-pair - namespace: {{ cert_manager_namespace }} -data: - tls.crt: L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