-
Notifications
You must be signed in to change notification settings - Fork 116
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
As a shipwright developer, I want to stop relying on service accounts for mounting my secrets at the pod level #679
Comments
Adding more info on this issue. Today we use the Its my understanding that the Tekton community will make the The feature can be removed, by setting the An option to fulfill what we lost when disabling the feature, is to use Things to keep in mind from the above example:
|
The issue that @SaschaSchwarze0 mentioned in the grooming meeting today seems like a documentation issue. https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ mentions a couple ways to generate a Docker config Secret:
...generates a Secret like:
...generates a Secret like:
Unfortunately these don't make it very easy to consume for our use case, since we ultimately want to be able to mount this as a file at Aside: We can actually mount the file in any directory, e.g., Anyway, the problem is the name of the file is This variation on (2) above:
...will generate a secret like:
...which we can more easily mount and use in our Pods. |
@imjasonh the variation on (2) will work, but we still have (1) not cover, right? As (1) is heavily used when generating the registry secrets, I will say that we will eventually need glue-code in the controller, to: a) Generate a volume and volumemount with the desire b) Ensure the config file under the above volumemount is of the form |
Some glue code to help out users who did (1) or the original (2) could be useful, with a warning to users that they should migrate to the variation of (2). As for how that glue could work, we could simply prepend a step in the TaskRun that looks for |
I stumbled over a Kubernetes features that resolves all our problems: spec:
volumes:
- name: container-registry-secret
secret:
secretName: user-defined-secret-of-type-dockerconfigjson
items:
- key: .dockerconfigjson
path: config.json This allows us to specify a different file name. It actually is a relative path, relative to the path defined on the volumeMount in the container. |
Note that Tekton's feature that merges registry credentials is mainly used for the |
Idea:
This is coming as an outcome of #662. We want this issue as a way to understand the implication of stopping using serviceAccount and referencing that in Tekton TaskRun, in favor of dealing with our secrets directly, without the need of a service account, as seen in:
The text was updated successfully, but these errors were encountered: