Skip to content

Use life cycle hooks with OpenShift ConfigMap/Secret #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
commonquail opened this issue Apr 24, 2019 · 0 comments · Fixed by #352
Closed

Use life cycle hooks with OpenShift ConfigMap/Secret #325

commonquail opened this issue Apr 24, 2019 · 0 comments · Fixed by #352
Assignees

Comments

@commonquail
Copy link

I hoped to use the base postgresql:10 image in OpenShift (3.11) and bootstrap it using the documented life cycle hooks with ConfigMaps and/or Secrets -- without making a custom image, that is. Unfortunately that doesn't work.

process_extending_files delegates to get_matched_files which calls find with both -maxdepth 1 and -type f. OpenShift mounts the paths as symlinks to a (symlink to a) sibling directory, a bit like this:

$ ls -al /opt/app-root/src/postgresql-init/
total 0
drwxrwsrwt. 3 root     1000390000 120 Apr 24 12:13 .
drwxrwxr-x. 1 postgres root        29 Apr 24 12:13 ..
drwxr-sr-x. 2 root     1000390000  80 Apr 24 12:13 ..2019_04_24_12_13_09.447944352
lrwxrwxrwx. 1 root     root        31 Apr 24 12:13 ..data -> ..2019_04_24_12_13_09.447944352
lrwxrwxrwx. 1 root     root        16 Apr 24 12:13 00-init.sh -> ..data/00-init.sh
lrwxrwxrwx. 1 root     root        20 Apr 24 12:13 bootstrap.sql -> ..data/bootstrap.sql

That is, postgresql-init/00-init.sh is a symlink, which -type f excludes, pointing to a file in a subdirectory, which -maxdepth 1 excludes. Could one of these restrictions be lifted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants