Skip to content

Commit

Permalink
fix(cert_manager): Remove release before upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Nov 16, 2023
1 parent 9659edd commit 737b982
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions roles/cert_manager/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,32 @@
# License for the specific language governing permissions and limitations
# under the License.

- name: Uninstall the legacy HelmRelease
run_once: true
block:
- name: Suspend the existing HelmRelease
failed_when: false
kubernetes.core.k8s:
state: patched
api_version: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: "{{ cert_manager_helm_release_name }}"
chart_ref: "{{ cert_manager_helm_chart_ref }}"
release_namespace: "{{ cert_manager_helm_release_namespace }}"
definition:
spec:
suspend: true

- name: Remove the existing HelmRelease
failed_when: false
kubernetes.core.k8s:
state: absent
api_version: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: "{{ cert_manager_helm_release_name }}"
chart_ref: "{{ cert_manager_helm_chart_ref }}"
release_namespace: "{{ cert_manager_helm_release_namespace }}"

- name: Deploy Helm chart
run_once: true
kubernetes.core.helm:
Expand Down

0 comments on commit 737b982

Please sign in to comment.