mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 08:57:35 -02:30
Merge pull request #5776 from bhundven/5371-Upgrade_to_helm_3_x
Make AWX compatible with Helm 3.x Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -20,7 +20,6 @@ dockerhub_base=ansible
|
|||||||
# Kubernetes Install
|
# Kubernetes Install
|
||||||
# kubernetes_context=test-cluster
|
# kubernetes_context=test-cluster
|
||||||
# kubernetes_namespace=awx
|
# kubernetes_namespace=awx
|
||||||
# tiller_namespace=kube-system
|
|
||||||
# Optional Kubernetes Variables
|
# Optional Kubernetes Variables
|
||||||
# pg_image_registry=docker.io
|
# pg_image_registry=docker.io
|
||||||
# pg_serviceaccount=awx
|
# pg_serviceaccount=awx
|
||||||
|
|||||||
@@ -79,22 +79,35 @@
|
|||||||
|
|
||||||
- name: Deploy PostgreSQL (Kubernetes)
|
- name: Deploy PostgreSQL (Kubernetes)
|
||||||
block:
|
block:
|
||||||
- name: Template PostgreSQL Deployment (Kubernetes)
|
- name: Create Temporary Values File (Kubernetes)
|
||||||
set_fact:
|
tempfile:
|
||||||
pg_values: "{{ lookup('template', 'postgresql-values.yml.j2') }}"
|
state: file
|
||||||
|
suffix: .yml
|
||||||
|
register: values_file
|
||||||
|
|
||||||
|
- name: Populate Temporary Values File (Kubernetes)
|
||||||
|
template:
|
||||||
|
src: postgresql-values.yml.j2
|
||||||
|
dest: "{{ values_file.path }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: Deploy and Activate Postgres (Kubernetes)
|
- name: Deploy and Activate Postgres (Kubernetes)
|
||||||
shell: |
|
shell: |
|
||||||
helm repo update --tiller-namespace={{ tiller_namespace | default('kube-system') }}
|
helm repo add stable https://kubernetes-charts.storage.googleapis.com
|
||||||
echo {{ pg_values | quote }} | helm upgrade {{ postgresql_service_name }} --install \
|
helm repo update
|
||||||
|
helm upgrade {{ postgresql_service_name }} \
|
||||||
|
--install \
|
||||||
--namespace {{ kubernetes_namespace }} \
|
--namespace {{ kubernetes_namespace }} \
|
||||||
--version="6.2.1" \
|
--version="8.3.0" \
|
||||||
--tiller-namespace={{ tiller_namespace | default('kube-system') }} \
|
--values {{ values_file.path }} \
|
||||||
--values - \
|
|
||||||
stable/postgresql
|
stable/postgresql
|
||||||
register: kubernetes_pg_activate
|
register: kubernetes_pg_activate
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
|
- name: Remove tempfile
|
||||||
|
file:
|
||||||
|
path: "{{ values_file.path }}"
|
||||||
|
state: absent
|
||||||
when:
|
when:
|
||||||
- pg_hostname is not defined or pg_hostname == ''
|
- pg_hostname is not defined or pg_hostname == ''
|
||||||
- postgres_svc_details is defined and postgres_svc_details.rc != 0
|
- postgres_svc_details is defined and postgres_svc_details.rc != 0
|
||||||
|
|||||||
Reference in New Issue
Block a user