blob: 32688fb7206d7e88be4e21fa9bc54ce337fa5481 [file] [log] [blame]
Mohammed Naserb7b97d62022-03-12 16:30:00 -05001# 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 Nasere169eb92023-01-24 14:03:34 +000015- name: Uninstall the legacy HelmRelease
16 run_once: true
17 block:
18 - name: Suspend the existing HelmRelease
19 kubernetes.core.k8s:
20 state: patched
21 api_version: helm.toolkit.fluxcd.io/v2beta1
22 kind: HelmRelease
Mohammed Naser2145fc32023-01-29 23:23:03 +000023 name: "{{ heat_helm_release_name }}"
24 namespace: "{{ heat_helm_release_namespace }}"
Mohammed Nasere169eb92023-01-24 14:03:34 +000025 definition:
26 spec:
27 suspend: true
28
29 - name: Remove the existing HelmRelease
30 kubernetes.core.k8s:
31 state: absent
32 api_version: helm.toolkit.fluxcd.io/v2beta1
33 kind: HelmRelease
Mohammed Naser2145fc32023-01-29 23:23:03 +000034 name: "{{ heat_helm_release_name }}"
35 namespace: "{{ heat_helm_release_namespace }}"
Mohammed Naserb7b97d62022-03-12 16:30:00 -050036
37- name: Deploy Helm chart
Mohammed Nasere169eb92023-01-24 14:03:34 +000038 run_once: true
39 kubernetes.core.helm:
Mohammed Naser2145fc32023-01-29 23:23:03 +000040 name: "{{ heat_helm_release_name }}"
41 chart_ref: "{{ heat_helm_chart_ref }}"
42 release_namespace: "{{ heat_helm_release_namespace }}"
Mohammed Nasere169eb92023-01-24 14:03:34 +000043 create_namespace: true
44 kubeconfig: /etc/kubernetes/admin.conf
Mohammed Naser2145fc32023-01-29 23:23:03 +000045 values: "{{ _heat_helm_values | combine(heat_helm_values, recursive=True) }}"
Mohammed Naserb7b97d62022-03-12 16:30:00 -050046
47- name: Create Ingress
48 ansible.builtin.include_role:
49 name: openstack_helm_ingress
50 vars:
51 openstack_helm_ingress_endpoint: orchestration
52 openstack_helm_ingress_service_name: heat-api
53 openstack_helm_ingress_service_port: 8004
Mohammed Naser2145fc32023-01-29 23:23:03 +000054 openstack_helm_ingress_annotations: "{{ heat_ingress_annotations }}"
Mohammed Naserb7b97d62022-03-12 16:30:00 -050055
56- name: Create Ingress
57 ansible.builtin.include_role:
58 name: openstack_helm_ingress
59 vars:
60 openstack_helm_ingress_endpoint: cloudformation
61 openstack_helm_ingress_service_name: heat-cfn
62 openstack_helm_ingress_service_port: 8000
Mohammed Naser2145fc32023-01-29 23:23:03 +000063 openstack_helm_ingress_annotations: "{{ heat_ingress_annotations }}"