Skip to content

Commit

Permalink
Merge pull request #499 from rooftopcellist/revert-fs-perm
Browse files Browse the repository at this point in the history
Revert initContainer change to address FS permissions issues
  • Loading branch information
shanemcd authored Aug 12, 2021
2 parents 47cec1f + 8952d8f commit dcc32aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
3 changes: 1 addition & 2 deletions roles/installer/tasks/database_configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@
- block:
- name: Create Database if no database is specified
k8s:
apply: yes
apply: true
definition: "{{ lookup('template', 'postgres.yaml.j2') }}"
wait: yes
register: create_statefulset_result

rescue:
Expand Down
17 changes: 0 additions & 17 deletions roles/installer/templates/postgres.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,10 @@ spec:
imagePullSecrets:
- name: {{ image_pull_secret }}
{% 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:
- image: '{{ postgres_image }}:{{ postgres_image_version }}'
imagePullPolicy: '{{ image_pull_policy }}'
name: postgres
securityContext:
fsGroup: 999
env:
# For postgres_image based on rhel8/postgresql-12
- name: POSTGRESQL_DATABASE
Expand Down

0 comments on commit dcc32aa

Please sign in to comment.