-
Notifications
You must be signed in to change notification settings - Fork 51
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
crd: can customize nifi container environment variables #394
crd: can customize nifi container environment variables #394
Conversation
I understand the desire here, but nifikop generates the container specs so that it knows how they're laid out and many assumptions are made throughout the operator based on this. Allowing users to configure any part of the container spec means you could potentially break an assumption the operator is making. This might be a little too open to expose as an option. Are just wanting to set environment variables in only the nifi container and not any other containers in the pod? |
At first I'd be happy to set an Env only for the nifi container. I see, that the container spec is quite complex. With this PR I wanted to avoid to create too many new fields in the CRD to make it not too complex. Would you suggest to have a |
It could be a good idea, to add the possibility to add env variable only for the nifi container and not for all the containers. Don't you think @mh013370? |
Yeah I can understand the need. Perhaps an |
…itional env variables that will only be embed in the nifi container
649a4d8
to
385f97a
Compare
Implemented |
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.
LGTM
@juldrixx do you need anything to merge? |
What's in this PR?
CRD / Controller: Can customize / overwrite the nifi container specification
Why?
When having custom certificates for the Java Truststore/Keystore this allows a flexible modification of the nifi container specification in the pods - where we can set the
JAVA_TOOL_OPTIONS
env var.This env var could also have been set using
NifiClusterSpec.Node[*].ReadOnlyConfig.AdditionalSharedEnvs
but this would share the maybe secret data between all containers in the pod and running a second Java container as a sidecar with a differentJAVA_TOOL_OPTIONS
configuration would not be possible.Additional context
The implementation is inspired by the solution in vault operator: https://github.com/bank-vaults/vault-operator/blob/v1.22.0/pkg/controller/vault/vault_controller.go#L1336
Checklist