-
Notifications
You must be signed in to change notification settings - Fork 24
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
UD-1190: Add support for plugin pod annotations and plugin service ac… #241
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameters
scan.plugins.annotations
scan.plugins.trivy.podAnnotations
scan.plugins.marvin.podAnnotations
scan.plugins.popeye.podAnnotations
are not present in charts/zora/values.yaml
.
It's important to ensure all parameters are included in values.yaml
for users who reference to this file to understand the available options and to ensure the consistency of auto-generated chart documentation.
95b6de4
to
8b7d827
Compare
@matheusfm I've added them into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @knrc
I think the only thing missing was commenting out the annotation examples, like in the Marvin section, right?
No, I did that originally but the generated document had each as a string. I left the examples in there so they would generate the appropriate content. |
Note I'm not convinced that the generated content is even correct, since the original content I added by hand is what you need to use for the helm command line. I'll see if there's an alternative which gives the right content. |
I would try set podAnnotations: {}
# trivy-annotation: trivy-value |
…count annotations Signed-off-by: Kevin Conner <[email protected]>
Yeah, this worked to change it to an object but wasn't really what I was looking for. I was hoping there was some way of specifying examples but couldn't find it, the only examples appear to be the assumed defaults set in the values.yaml file. |
…count annotations
Description
This PR enables annotations to be provided for each plugin pod and for the plugin service account.
One use of this would be to enable access to specific IAM roles when running in EKS, for example for Trivy to access a private ECR.
Linked Issues
How has this been tested?
--set scan.plugins.annotations.eks\\.amazonaws\\.com/role-arn=arn:aws:iam::127647282379:role/undistro-test-ecr-role
(annotation on the ServiceAccount, must use the role created for accessing the ECR)--set scan.plugins.marvin.podAnnotations.marvin-annotation="marvin-value"
--set scan.plugins.popeye.podAnnotations.popeye-annotation="popeye-value"
--set scan.plugins.trivy.podAnnotations.trivy-annotation="trivy-value"
kubectl get sa zora-plugins -o jsonpath='{.metadata.annotations}'
kubectl get cronjob -l zora.undistro.io/plugin=marvin -o jsonpath='{.items[*].spec.jobTemplate.spec.template.metadata.annotations}'
kubectl get cronjob -l zora.undistro.io/plugin=popeye -o jsonpath='{.items[*].spec.jobTemplate.spec.template.metadata.annotations}'
kubectl get cronjob -l zora.undistro.io/plugin=trivy -o jsonpath='{.items[*].spec.jobTemplate.spec.template.metadata.annotations}'
kubectl get pods -o jsonpath='{.items[*].metadata.annotations}'
Checklist