artemiscloud / activemq-artemis-operator

Apache License 2.0
66 stars 62 forks source link

CRD env JAVA_ARGS_APPEND fromSource needs to be flagged as invalid #981

Closed gaohoward closed 2 months ago

gaohoward commented 2 months ago

Describe the bug The operator currently uses this env var to configure a broker (such as defining custom logging file url) If use adds the JAVA_ARGS_APPEND in to the spec.env using ValueFrom (like from a secret) it will get overridden by the operator.

[!TIP] Vote this issue reacting with :+1: or :-1:

gtully commented 2 months ago

If it gets overwritten, that is also a bug. I would expect both to exist when we createOrAppend, making an invalid env spec that would lead to an error to create the SS.

If we trap in validation, this will be less of a problem, but in case createOrAppend is used on any other env, it would be good to fix too, such that it does not override and the error can be surfaced.

gtully commented 2 months ago

it is not overwritten, pod creation is failing, I guess we don't currently have a way to show this in our status? We have just boolean ready or not for the pod.

create Pod brokermq-ss-0 in StatefulSet brokermq-ss failed error: Pod "brokermq-ss-0" is invalid: spec.containers[0].env[19].valueFrom: Invalid value: "": may not be specified when value is not empty