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

Kubernetes compliant token secret name as volume mounts #327

Open
MarkusNeuron opened this issue Oct 21, 2022 · 0 comments
Open

Kubernetes compliant token secret name as volume mounts #327

MarkusNeuron opened this issue Oct 21, 2022 · 0 comments

Comments

@MarkusNeuron
Copy link

Is your feature request related to a problem? Please describe.
At the moment the charts render the token secret volume directly derived from .Values.auth.superUsers.x for the broker, the proxy- and the toolset-stateful sets.

Because the superUsers configuration represents a token subscription that is issued by an IDP there is no control over the syntax of this value. e.g. "sub": "NR_CO_PROD_ADM_M2M-T"

For values not compliant to Kubernetes metadata.name syntax value will break the deployment.

Describe the solution you'd like
To add more robustness I propose to introduce a simple transformation to lowercase + kebabcase like:

secretName: "{{ .Release.Name }}-token-{{ .Values.auth.superUsers.broker | lower | kebabcase }}"

This will cover most of the edge cases.

Describe alternatives you've considered
A even more generic approach to make the configured string value metadata.name compliant. Not aware of any.

Additional context
Deployments fails by try to mount a volume secret named like

  - name: client-token
    secret:
      secretName: pulsar-token-NR_CO_PROD_ADM_M2M-T
@MarkusNeuron MarkusNeuron changed the title Kubernetes compliant token secret names as volume mounts Kubernetes compliant token secret metadata.name as volume mounts Oct 21, 2022
@MarkusNeuron MarkusNeuron changed the title Kubernetes compliant token secret metadata.name as volume mounts Kubernetes compliant token secret name as volume mounts Oct 21, 2022
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

No branches or pull requests

1 participant