-
Notifications
You must be signed in to change notification settings - Fork 420
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
TriggerTemplate can't create Secret object #572
Comments
Hello dibyom! many thanks for the timely reponse! :) Just some background info: It would be nice to have a new type for params, e.g. password param, that isn't shown in clear text in the tekton logs :) Best regards! |
Nice!
Interesting. Not sure if this will work for your use case but a workaround I can think of is instead of each developer passing the apiKey as a param, they could pass a ref to a Secret name that contains the apiKey
Would this be in Triggers/Pipelines or both? |
Interesting use-case. I am not sure writing the key to a Secret is a good option for this use-case. Secrets must have unique name, you want to refer to it later. And there must be a way to garbage-collect or remove the Secret at some point. Secrets is usually not used in that dynamic context. Secrets in a namespace should probably be owned by the owners of the namespace. I understand that you want to authenticate the request to the Trigger. That should be supported. Can you describe how you want to use the api-key later in the Pipeline, I am not sure I fully understand your use-case. Is it an api-key intended for some other system than the Trigger? A possible solution, as it currently is implemented is that you create a service that receives the request with the api-key, and then triggers (on behalf of the user) the Trigger, then you can have a Task and lookup the secret from a reference passed in a param. |
Sorry for the late anwser!
Yeah, that would be nice!
I think our current solution matches the one you just described. I will try to explain a bit the use case, and the current implementation, hopefully it will understandable :) We have applications decomposed in bounded contexts. The CD Pipeline is implemented in Tekton from a centralized team and deployed in every bounded context in a [bounded-context]-cd-pipeline-namespace.
Team members of a bounded context must be able to deploy their microservices with their own personal api-key using the CD. So we are deploying the The current workflow looks like this:
|
@rannox thanks for a good description of the use case! I am working on a very similar setup.
I wouldn't call this an API-key, isn't this a ServiceAccount Token with access to the control plane? The way I solve it, in my solution that is very similar, is that when I generate the namespace In my case, the step:
is happening when a developer do git-push to a git-repository. And I have already setup an authenticated connection between the git-repository and the Trigger with authentication. Is that a setup that would work for you as well? |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hello Tekton Triggers Team! Hope you can help me out with that :-)
Expected Behavior
The TriggerTemplate can create a Kubernetes Secret Object.
Actual Behavior
I get the following error message by applying the trigger template resource:
Error from server (BadRequest): error when creating "trigger-template.yaml": admission webhook "validation.webhook.triggers.tekton.dev" denied the request: validation failed: invalid value: no kind "Secret" is registered for version "v1": spec.resourcetemplates[0]
Steps to Reproduce the Problem
kubectl apply -f tekton-triggers.txt
Additional Info
That example is taken from the IBM Tekton tutorial page: IBM Tekton (part "Secure Property" and "Secrets"), where they create a Secret object from the TriggerTemplate.
I am using Tekton Triggers 0.4.0 with Tekton Pipelines 0.12.0 on K8s 1.17.5.
The text was updated successfully, but these errors were encountered: