Mohammed Naser | b7b97d6 | 2022-03-12 16:30:00 -0500 | [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 | |
Mohammed Naser | e169eb9 | 2023-01-24 14:03:34 +0000 | [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 |
Mohammed Naser | e169eb9 | 2023-01-24 14:03:34 +0000 | [diff] [blame] | 20 | kubernetes.core.k8s: |
| 21 | state: patched |
| 22 | api_version: helm.toolkit.fluxcd.io/v2beta1 |
| 23 | kind: HelmRelease |
Mohammed Naser | 2145fc3 | 2023-01-29 23:23:03 +0000 | [diff] [blame] | 24 | name: "{{ heat_helm_release_name }}" |
| 25 | namespace: "{{ heat_helm_release_namespace }}" |
Mohammed Naser | e169eb9 | 2023-01-24 14:03:34 +0000 | [diff] [blame] | 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 |
Mohammed Naser | e169eb9 | 2023-01-24 14:03:34 +0000 | [diff] [blame] | 32 | kubernetes.core.k8s: |
| 33 | state: absent |
| 34 | api_version: helm.toolkit.fluxcd.io/v2beta1 |
| 35 | kind: HelmRelease |
Mohammed Naser | 2145fc3 | 2023-01-29 23:23:03 +0000 | [diff] [blame] | 36 | name: "{{ heat_helm_release_name }}" |
| 37 | namespace: "{{ heat_helm_release_namespace }}" |
Mohammed Naser | b7b97d6 | 2022-03-12 16:30:00 -0500 | [diff] [blame] | 38 | |
| 39 | - name: Deploy Helm chart |
Mohammed Naser | e169eb9 | 2023-01-24 14:03:34 +0000 | [diff] [blame] | 40 | run_once: true |
| 41 | kubernetes.core.helm: |
Mohammed Naser | 2145fc3 | 2023-01-29 23:23:03 +0000 | [diff] [blame] | 42 | name: "{{ heat_helm_release_name }}" |
| 43 | chart_ref: "{{ heat_helm_chart_ref }}" |
| 44 | release_namespace: "{{ heat_helm_release_namespace }}" |
Mohammed Naser | e169eb9 | 2023-01-24 14:03:34 +0000 | [diff] [blame] | 45 | create_namespace: true |
| 46 | kubeconfig: /etc/kubernetes/admin.conf |
Mohammed Naser | 2145fc3 | 2023-01-29 23:23:03 +0000 | [diff] [blame] | 47 | values: "{{ _heat_helm_values | combine(heat_helm_values, recursive=True) }}" |
Mohammed Naser | b7b97d6 | 2022-03-12 16:30:00 -0500 | [diff] [blame] | 48 | |
| 49 | - name: Create Ingress |
| 50 | ansible.builtin.include_role: |
| 51 | name: openstack_helm_ingress |
| 52 | vars: |
| 53 | openstack_helm_ingress_endpoint: orchestration |
| 54 | openstack_helm_ingress_service_name: heat-api |
| 55 | openstack_helm_ingress_service_port: 8004 |
Mohammed Naser | 576f04d | 2023-03-31 17:11:25 +0000 | [diff] [blame] | 56 | openstack_helm_ingress_annotations: "{{ _heat_ingress_annotations | combine(heat_ingress_annotations, recursive=True) }}" |
Mohammed Naser | b7b97d6 | 2022-03-12 16:30:00 -0500 | [diff] [blame] | 57 | |
| 58 | - name: Create Ingress |
| 59 | ansible.builtin.include_role: |
| 60 | name: openstack_helm_ingress |
| 61 | vars: |
| 62 | openstack_helm_ingress_endpoint: cloudformation |
| 63 | openstack_helm_ingress_service_name: heat-cfn |
| 64 | openstack_helm_ingress_service_port: 8000 |
Mohammed Naser | 576f04d | 2023-03-31 17:11:25 +0000 | [diff] [blame] | 65 | openstack_helm_ingress_annotations: "{{ _heat_ingress_annotations | combine(heat_ingress_annotations, recursive=True) }}" |