Mohammed Naser | 462cd79 | 2022-08-22 14:17:20 -0400 | [diff] [blame] | 1 | # Copyright (c) 2022 VEXXHOST, Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
okozachenko1203 | ceff992 | 2023-01-27 00:29:16 +1100 | [diff] [blame] | 15 | - name: Uninstall the legacy HelmRelease |
| 16 | run_once: true |
| 17 | block: |
| 18 | - name: Suspend the existing HelmRelease |
Mohammed Naser | f0314a8 | 2023-04-11 18:53:30 +0000 | [diff] [blame] | 19 | failed_when: false |
okozachenko1203 | ceff992 | 2023-01-27 00:29:16 +1100 | [diff] [blame] | 20 | kubernetes.core.k8s: |
| 21 | state: patched |
| 22 | api_version: helm.toolkit.fluxcd.io/v2beta1 |
Mohammed Naser | 462cd79 | 2022-08-22 14:17:20 -0400 | [diff] [blame] | 23 | kind: HelmRelease |
okozachenko1203 | ceff992 | 2023-01-27 00:29:16 +1100 | [diff] [blame] | 24 | name: "{{ coredns_helm_release_name }}" |
| 25 | namespace: "{{ coredns_helm_release_namespace }}" |
| 26 | definition: |
| 27 | spec: |
| 28 | suspend: true |
| 29 | |
| 30 | - name: Remove the existing HelmRelease |
Mohammed Naser | f0314a8 | 2023-04-11 18:53:30 +0000 | [diff] [blame] | 31 | failed_when: false |
okozachenko1203 | ceff992 | 2023-01-27 00:29:16 +1100 | [diff] [blame] | 32 | kubernetes.core.k8s: |
| 33 | state: absent |
| 34 | api_version: helm.toolkit.fluxcd.io/v2beta1 |
| 35 | kind: HelmRelease |
| 36 | name: "{{ coredns_helm_release_name }}" |
| 37 | namespace: "{{ coredns_helm_release_namespace }}" |
| 38 | |
| 39 | - name: Deploy Helm chart |
| 40 | run_once: true |
Rico Lin | 3e26cdb | 2024-02-22 11:10:41 +0800 | [diff] [blame] | 41 | when: atmosphere_network_backend != 'ovn' |
okozachenko1203 | ceff992 | 2023-01-27 00:29:16 +1100 | [diff] [blame] | 42 | kubernetes.core.helm: |
| 43 | name: "{{ coredns_helm_release_name }}" |
| 44 | chart_ref: "{{ coredns_helm_chart_ref }}" |
| 45 | release_namespace: "{{ coredns_helm_release_namespace }}" |
| 46 | create_namespace: true |
| 47 | kubeconfig: /etc/kubernetes/admin.conf |
okozachenko1203 | 303d48d | 2023-01-27 00:45:50 +1100 | [diff] [blame] | 48 | values: "{{ _coredns_helm_values | combine(coredns_helm_values, recursive=True) }}" |