Option to deploy Instrumentation resource when operator sub chart is disabled #1650
+7
−1
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.
Providing an option to deploy the
Instrumentation
resource when the internaloperator
sub chart is disabled, for example when managed by externalopentelemetry-operator
chart.Motivation
We are using ArgoCD to deploy this chart to EKS and is not working. The operator Pod is stuck creating:
because of missing
splunk-otel-collector-operator-controller-manager-service-cert
secret mount point:which in turn is caused by the missing
Certificate
resource:The reason for this are the Helm hooks that prevent the
Certificate
andIssuer
from being deployed, see https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks/ and https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#helm-hooks to understand why and how the Helm hooks are being mapped into ArgoCD resource hooks.In other words, the Helm hooks in the Chart are creating
chicken and egg
problem: theIssuer
and theCertificate
can not get deployed until all other resources are deployed and healthy which can not happen without them already being installed.The
certificateAnnotations
andissuerAnnotations
have hard coded Helm hooks in the Chart's values file:that we can't override via our custom values file no matter what we do. Setting them as empty has no effect:
the hooks still get rendered in the
Certificate
andIssuer
manifests. And setting any other value in those objects only gets added to the hard coded ones instead of replacing the values. For example this settings:produces this
Certificate
manifest with the hard coded hooks still rendered:when running
helm template --debug ...
for the chart.Workaround
To workaround this problem we deploy the
operator
and theotel-collector
as two separate charts via dependencies:and disable the
operator
sub chart in theotel-collector
chart:This works well (because both problematic annotations are actually empty
{}
in theopentelemetry-operator
chart) BUT because of that theInstrumentation
resource does not get deployed because it depends onoperator.enabled
beingtrue
. Hence the PR.Conclusion
Unless you have a suggestion on how to resolve the
ArgoCD
issues with the Helm hooks preventing resources from deploying I hope this change makes sense being simple as it is and non intrusive to the chart's overall operation.Other info
There is a feature request open in the ArgoCD project argoproj/argo-cd#4331 providing for exactly the user case we have with this chart which is an option to tell ArgoCD to ignore some resources Helm hooks that may cause the issues we are seeing.