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

gitlab-ci-pipelines-exporter: Allow specifying name of existing Secret containing tokens #18

Closed
shivjm opened this issue Sep 16, 2021 · 0 comments · Fixed by #21
Closed

Comments

@shivjm
Copy link
Contributor

shivjm commented Sep 16, 2021

I have a Secret containing my GitLab API token and webhook token. I’d like to be able to use that instead of specifying them in plaintext when installing the chart, so I added them as env variables:

          - name: "GCPE_WEBHOOK_SECRET_TOKEN"
            valueFrom:
              secretKeyRef:
                name: gitlab-ci-pipelines-exporter-secret
                value: webhook-token
          - name: "GCPE_GITLAB_TOKEN"
            valueFrom:
              secretKeyRef:
                name: gitlab-ci-pipelines-exporter-secret
                value: gitlab-api-token

Unfortunately, the chart unconditionally expects them to be provided as plaintext parameters:

{{- if .Values.config.gitlab }}
GCPE_GITLAB_TOKEN: {{ required "gitlab token must be set" .Values.config.gitlab.token | b64enc }}
{{- else }}
{{- fail "gitlab token must be set" }}
{{- end }}

{{- if .Values.config.server }}
{{- if .Values.config.server.webhook }}
{{- if .Values.config.server.webhook.enabled }}
GCPE_WEBHOOK_SECRET_TOKEN: {{ required "webhook secret token must be set" .Values.config.server.webhook.secret_token | b64enc }}
{{- end }}
{{- end }}
{{- end }}

I’d like to be able to point at my Secret instead.

(Incidentally, I’m trying to get to the point where I can test whether mvisonneau/gitlab-ci-pipelines-exporter#280 is resolved… it’s been a really long road, for many reasons, and I apologize for the silence.)

@shivjm shivjm changed the title Allow specifying name of existing Secret containing tokens gitlab-ci-pipelines-exporter: Allow specifying name of existing Secret containing tokens Sep 24, 2021
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.

1 participant