Honor tlsSecretName from ES application config #142
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we set a default tls_secret_name in the role, but have no way of supplying an override in the SmartGateway object. Adding it to the CRD seemed out of place because it's really only used for Elasticsearch, so I added it to the "freeform application config" that STO constructs for Elasticsearch[1]. This change allows the new config item to be honored, falling back to the existing default if it's not there. It feels a bit strange because that config is otherwise passed directly into sg-core, and this is only used by the operator, but this still seemed like the only logical place to add it.
[1] https://github.com/infrawatch/service-telemetry-operator/pull/439/files#diff-b661f3e2be8a3856711ae0ed99adda16e30a66a972ec5dc5118f57bfbf3ffe2dR22