You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have stumbled on a couple of use cases that the current helm/trivy templates do not support. I hope that you developer reading this will realize the suggested changes are good and can be added to the helm templates.
NOTE This is my first time trying to contribute to a open source project so if I'm breaking some unspoken rules or doing it the wrong order. I'm sorry then, first try 😅
Use-cases
Let's start with my problem. I don't inject secrets throw the Kubernetes Operator and instead use the Vault Agent Injector.
The secrets I am trying to inject from Vault are:
The plan is to have the vault agent injector run as an init container that fetches the secrets and the Trivy container then needs to override the image entrypoint first source file that the agent injector volume shares with the Trivy container and then run the command trivy server.
My expectation of change to the helm/trivy values.yaml file was to perform a:
However, the helm template does not support command or args overriding.
But the template does support changing the trivy image to any custom image reference and repository.
By this use case of supporting custom images, I would argue the command and args should be able to be overwritten. In a use-case like mine or if the custom image is being used and the entrypoint isn't the same as the original trivy image i.e:
Finally. To use the vault agent injector with your Statefulset it can't be a hardcode value on the automountServiceAccountToken since I need to control the boolean to set it to true. Currently in the helm/trivy/templates/statefulset.yaml#L45:
spec:
automountServiceAccountToken: false
Required changes
Control the Statefulset automountServiceAccountToken boolean logic
Override the default Trivy container command (useful when using custom images)
Override the default Trivy container args (useful when using custom images)
Suggested Solutions
Modify the automountServiceAccountToken in the templates/statefulset.yaml file to:
I hope my suggestion is to follow the aquasec/trivy way because I really enjoy what you guys have built 🥳 ❤️ and I
want to use it for the work I am doing but...
To use it I need the following required changes to take place.
I tried to find as much information about how to contribute but it did just from my reading it says to create a discussion.
If my suggested changes look decent please tell me the next steps in the process to get this into your helm chart 😄
Target
Helm
Scanner
None
The text was updated successfully, but these errors were encountered:
Discussed in #5319
Originally posted by meDracula October 3, 2023
Description
I have stumbled on a couple of use cases that the current helm/trivy templates do not support. I hope that you developer reading this will realize the suggested changes are good and can be added to the helm templates.
Use-cases
Let's start with my problem. I don't inject secrets throw the Kubernetes Operator and instead use the Vault Agent Injector.
The secrets I am trying to inject from Vault are:
The plan is to have the vault agent injector run as an init container that fetches the secrets and the Trivy container then needs to override the image
entrypoint
first source file that the agent injector volume shares with the Trivy container and then run the commandtrivy server
.My expectation of change to the helm/trivy
values.yaml
file was to perform a:However, the helm template does not support
command
orargs
overriding.But the template does support changing the trivy image to any custom image reference and repository.
By this use case of supporting custom images, I would argue the
command
andargs
should be able to be overwritten. In a use-case like mine or if the custom image is being used and theentrypoint
isn't the same as the originaltrivy image i.e:
And the argument from the custom image isn't
helm/trivy/templates/statefulset.yaml#L74
:Finally. To use the vault agent injector with your
Statefulset
it can't be a hardcode value on theautomountServiceAccountToken
since I need to control the boolean to set it totrue
. Currently in thehelm/trivy/templates/statefulset.yaml#L45
:Required changes
automountServiceAccountToken
boolean logicSuggested Solutions
automountServiceAccountToken
in thetemplates/statefulset.yaml
file to:values.yaml
file contains thecommand
option exists then set the command:templates/statefulset.yaml
file to:And introduce a default in the
values.yaml
file by addingI have already developed this possible solution in this fork My Trivy forked solution.
Final
I hope my suggestion is to follow the aquasec/trivy way because I really enjoy what you guys have built 🥳 ❤️ and I
want to use it for the work I am doing but...
To use it I need the following required changes to take place.
I tried to find as much information about how to contribute but it did just from my reading it says to create a discussion.
If my suggested changes look decent please tell me the next steps in the process to get this into your helm chart 😄
Target
Helm
Scanner
None
The text was updated successfully, but these errors were encountered: