-
Notifications
You must be signed in to change notification settings - Fork 729
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
Allow injecting labels onto the resources created by the elastic-operator. #1353
Comments
Actually it looks like this may be supported via the CRD |
I have now filled in the podTemplate I believe correctly based on the docs: However the operator still fails to start with label requirements. I receive the following message:
|
I also see:
So I'm guessing the operator fails to create the admission webhook pod, since it doesn't have the required labels. Is there anyway to specify additional labels for the admission webhook? |
Correct, it will be supported in the next release spec:
podTemplate:
metadata:
labels:
# additional labels for pods
foo: bar
It might look like this known issue, if you use EKS: #896 (comment). Which ECK version do you use? |
ECK version 0.8.1 The operator manifest is here: https://download.elastic.co/downloads/eck/0.8.1/all-in-one.yaml The cluster manifest I tried is:
Bear in mind this may work if you do not have an admission controller preventing resources from being created that are missing the |
@r0fls if I'm understanding you correctly, the manifest of your ES spec doesn't look like it's your only problem at least. Am I understanding correctly that the operator pod is failing to start because the What isn't clear is why the ECK validating webhook was able to be created at all -- normally the operator creates the validating webhook when it starts, but in this case it cannot start. I wonder if the operator was deployed first, and then the Once the operator pods are running and you are past the And for what it's worth, in the v0.9.0 release the |
I should have been more clear, I am already adding the pod labels to the statefulset. I can see the operator pod starts (it wouldn't even be created if it was missing the labels) but then it starts crash looping with the following error:
|
I think it's failing to create the webhook service because it doesn't have the labels needed for our environment. |
Ah understood. We'll take a look and see what we can do to make the error logging a little bit better there and any other improvements for this situation. In the meantime, the workaround suggested here: |
That does prevent the operator pod from crashlooping, but I still see:
When I try to deploy the ELK cluster. |
@r0fls if you remove that webhook configuration you should be good (for example It was created by the operator before you changed the operator config to not serve up webhooks. So right now there is a clusterwide admission webhook configuration telling it to use the https://elastic-webhook-service.elastic-system.svc endpoint, but we did not configure the operator to function in that capacity. |
Sweet, that got rid of the error! Thanks! |
Any idea when the 0.9.0 release will be available with support for the |
Actually I’m having second thoughts about using this: is this the right solution if we only want one centralized elk stack per kubernetes cluster? Or should we just use: https://github.com/helm/charts/tree/master/stable/elastic-stack
… On Jul 25, 2019, at 12:03 PM, Anya Sabo ***@***.***> wrote:
@r0fls if you remove that webhook configuration you should be good (for example kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io validating-webhook-configuration).
It was created by the operator before you changed the operator config to not serve up webhooks. So right now there is a clusterwide admission webhook configuration telling it to use the https://elastic-webhook-service.elastic-system.svc endpoint, but we did not configure the operator to function in that capacity.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Closing. Not an issue/fixed in 0.9.0 if I read the discussion correctly |
Proposal
Allow injecting labels onto the resources created by the elastic-operator.
Use case. Why is this important?
This is important for environments that enforce labelling requirements, for instance for cost reporting or alert routing.
For example, this should work to inject the
foo: bar
label to the resources that the operator creates:The text was updated successfully, but these errors were encountered: