blob: 09eea2bcd40eebbbc72d8ee1353e3bf36ea5cf75 [file] [log] [blame] [edit]
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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.
# NOTE(mnaser): We should get rid of this task eventually as it is suspending
# the old HelmRelease and removing it to avoid uninstalling the
# Helm chart.
- 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
namespace: cert-manager
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
namespace: cert-manager
- name: Deploy Helm chart
ansible.builtin.include_role:
name: vexxhost.kubernetes.cert_manager
vars:
cert_manager_image_cli: "{{ atmosphere_images['cert_manager_cli'] }}"
cert_manager_image_controller: "{{ atmosphere_images['cert_manager_controller'] }}"
cert_manager_image_cainjector: "{{ atmosphere_images['cert_manager_cainjector'] }}"
cert_manager_image_webhook: "{{ atmosphere_images['cert_manager_webhook'] }}"
cert_manager_image_acmesolver: "{{ atmosphere_images['cert_manager_acmesolver'] }}"
cert_manager_node_selector:
openstack-control-plane: enabled