Skip to content
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

Mounts puppetserver.extraSecrets into pods #221

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cpiment
Copy link
Contributor

@cpiment cpiment commented Apr 16, 2024

Solves #166 and #192

Now puppetserver.extraSecrets must be a list of secret volumeMounts specifications like this:

extraSecrets:
  - name: myBigSecret
    mountPath: /custom/path/secret
    readOnly: true
  - name: myOtherBigSecret
    mountPath: /custom/other/key
    subPath: key
  - name: myOtherBigSecret
    mountPath: /custom/other/cert
    subPath: cert

That configuration creates two volumes in each pod: myBigSecret-volume and myOtherBigSecret-volume and three volumeMounts using the configuration specified in each extraSecrets items. The secrets referenced in name must exist in the namespace.

In #192 we discussed about a simpler implementation, but doing it like that supposed that we could not use extra configuration for the volumeMounts (e.g. subPath).

I open this as a draft PR because when I generate the manifests the new volumes an volumeMounts generate an extra blank line which I'm not able to get rid of. Could some of you please test it and help me with that blank lline?

Thanks in advance for your help

@cpiment
Copy link
Contributor Author

cpiment commented Apr 19, 2024

@Xtigyro @ldaneliukas have you had the chance to have a look to this PR?

Thanks in advance!

@Xtigyro
Copy link
Contributor

Xtigyro commented Apr 19, 2024

@cpiment I hadn't because it's a Draft PR. Now I did and it's looking good!

@cpiment
Copy link
Contributor Author

cpiment commented Apr 19, 2024

Hi @Xtigyro

I have opened this as a draft PR because when I generate the manifests the new volumes and volumeMounts generate an extra blank line in the YAML which I'm not able to get rid of. Could you please test it and help me with that blank lline? It has to be something with the carriage returns when including the template, but I cannot find what's wrong.

@Xtigyro
Copy link
Contributor

Xtigyro commented Apr 29, 2024

Hi @Xtigyro

I have opened this as a draft PR because when I generate the manifests the new volumes and volumeMounts generate an extra blank line in the YAML which I'm not able to get rid of. Could you please test it and help me with that blank lline? It has to be something with the carriage returns when including the template, but I cannot find what's wrong.

I might have some time to have a look towards the end of the week.
@ldaneliukas @davidphay If any of you have some time, in the meantime, and help @cpiment - will be appreciated.

@cpiment
Copy link
Contributor Author

cpiment commented May 24, 2024

Hi team,

Have you had time to check this fix? Do you have any idea how I can get rid of the blank lines every time I call the templates which insert the secrets and secretmounts?

Thanks in advance for your help

@ke5C2Fin
Copy link
Contributor

ke5C2Fin commented Jun 3, 2024

Maybe some of the {{- end }} need to be {{- end -}}?

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.

3 participants