mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 22:02:53 +00:00
Merge pull request #499 from rooftopcellist/revert-fs-perm
Revert initContainer change to address FS permissions issues
This commit is contained in:
@@ -80,9 +80,8 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: Create Database if no database is specified
|
- name: Create Database if no database is specified
|
||||||
k8s:
|
k8s:
|
||||||
apply: yes
|
apply: true
|
||||||
definition: "{{ lookup('template', 'postgres.yaml.j2') }}"
|
definition: "{{ lookup('template', 'postgres.yaml.j2') }}"
|
||||||
wait: yes
|
|
||||||
register: create_statefulset_result
|
register: create_statefulset_result
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
|
|||||||
@@ -37,27 +37,10 @@ spec:
|
|||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: {{ image_pull_secret }}
|
- name: {{ image_pull_secret }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
initContainers:
|
|
||||||
- name: init-chmod-data
|
|
||||||
image: '{{ postgres_image }}:{{ postgres_image_version }}'
|
|
||||||
imagePullPolicy: '{{ image_pull_policy }}'
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
if [ ! -f {{ postgres_data_path }}/PG_VERSION ]; then
|
|
||||||
chown postgres:root {{ postgres_data_path | dirname }}
|
|
||||||
fi
|
|
||||||
volumeMounts:
|
|
||||||
- name: postgres
|
|
||||||
mountPath: '{{ postgres_data_path | dirname }}'
|
|
||||||
subPath: '{{ postgres_data_path | dirname | basename }}'
|
|
||||||
containers:
|
containers:
|
||||||
- image: '{{ postgres_image }}:{{ postgres_image_version }}'
|
- image: '{{ postgres_image }}:{{ postgres_image_version }}'
|
||||||
imagePullPolicy: '{{ image_pull_policy }}'
|
imagePullPolicy: '{{ image_pull_policy }}'
|
||||||
name: postgres
|
name: postgres
|
||||||
securityContext:
|
|
||||||
fsGroup: 999
|
|
||||||
env:
|
env:
|
||||||
# For postgres_image based on rhel8/postgresql-12
|
# For postgres_image based on rhel8/postgresql-12
|
||||||
- name: POSTGRESQL_DATABASE
|
- name: POSTGRESQL_DATABASE
|
||||||
|
|||||||
Reference in New Issue
Block a user