Skip to content

Conversation

@nvanlaerebeke
Copy link

I needed support for adding the conf.php as a secret due to it containing the database password.

Previously it was possible to configure it in the values file in configs: {} but that means putting everything in the values file.
Another possibility was to use extraVolumes and extraVolumeMounts, but the config file needs to be put in /srv/cfg and will conflict with the other volume mounts already in the chart.

A solution to combine everything is to use a projected volume.
This allows the following configuration where a list of secrets and config maps can be given:

configsAsProjected: true
configsProjected:
  defaultMode: 420
  secrets:
    - privatebin-secret
  configMaps:
    - privatebin-extraconfig

Example secret:

apiVersion: v1
kind: Secret
metadata:
  name: privatebin-secret
  namespace: default
data:
  conf.php: >-
    ...
type: Opaque

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 this pull request may close these issues.

1 participant