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

Define credentials as a environment variable #185

Closed
nonamef opened this issue May 3, 2024 · 1 comment
Closed

Define credentials as a environment variable #185

nonamef opened this issue May 3, 2024 · 1 comment

Comments

@nonamef
Copy link

nonamef commented May 3, 2024

Currently if you want to add any username/password, it's done as a string. As the helm chart code is stored in a repository, anyone with access can see the credentials without issue.
e.g

# Docker Hub Credentials Configuration
docker:
  username:  admin-user
  password: password123

An enhancement would be to define the credentials as an environment variable so that secrets could be used to mask the credentials.
e.g

env:
  - name: DOCKER_USERNAME
    valueFrom:
      secretKeyRef:
        name: docker-credentials
        key: username
  - name: DOCKER_PASSWORD
    valueFrom:
      secretKeyRef:
        name: docker-credentials
        key: password
@nonamef
Copy link
Author

nonamef commented May 3, 2024

Looks like I missed the defined vars in the deployment. Would be good if it was in the readme.

- name: VERSION_CHECKER_DOCKER_USERNAME

        {{- if .Values.docker.username }}
        - name: VERSION_CHECKER_DOCKER_USERNAME
          valueFrom:
            secretKeyRef:
              name: {{ $chartname }}
              key: docker.username
        {{- end }}
        {{- if .Values.docker.password }}
        - name: VERSION_CHECKER_DOCKER_PASSWORD
          valueFrom:
            secretKeyRef:
              name: {{ $chartname }}
              key: docker.password
        {{- end }}

@nonamef nonamef closed this as completed May 3, 2024
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