blob: 136a86b9c966d44b8062440066d571680d8d0634 [file] [log] [blame]
- name: Configure Helm repository
run_once: true
kubernetes.core.helm_repository:
name: "{{ percona_xtradb_cluster_operator_helm_repository_name }}"
repo_url: "{{ percona_xtradb_cluster_operator_helm_repository_url }}"
# 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
kubernetes.core.k8s:
state: patched
api_version: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: pxc-operator
namespace: openstack
definition:
spec:
suspend: true
- name: Remove the existing HelmRelease
kubernetes.core.k8s:
state: absent
api_version: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: pxc-operator
namespace: openstack
- name: Deploy Helm chart
run_once: true
kubernetes.core.helm:
name: "{{ percona_xtradb_cluster_operator_helm_release_name }}"
chart_ref: "{{ percona_xtradb_cluster_operator_helm_repository_name }}/{{ percona_xtradb_cluster_operator_helm_chart_name }}"
chart_version: "{{ percona_xtradb_cluster_operator_helm_chart_version }}"
release_namespace: "{{ percona_xtradb_cluster_operator_helm_release_namespace }}"
create_namespace: true
kubeconfig: /etc/kubernetes/admin.conf
values: "{{ _percona_xtradb_cluster_operator_helm_values | combine(percona_xtradb_cluster_operator_helm_values, recursive=True) }}"