Skip to content
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

Injecting proxy by default not working #20

Closed
krancour opened this issue Oct 23, 2018 · 6 comments
Closed

Injecting proxy by default not working #20

krancour opened this issue Oct 23, 2018 · 6 comments
Labels
type/bug Something isn't working

Comments

@krancour
Copy link

I've confirmed this behavior on both AKS and minikube.

If I install using the master branch of the Helm chart (which uses consul-k8s v0.2.0), having configured values to enable injection by default (i.e. without requiring annotations) like so:

# ConnectInject will enable the automatic Connect sidecar injector.
connectInject:
  enabled: true
  image: null # image for consul-k8s that contains the injector
  default: true # true will inject by default, otherwise requires annotation

Auto-injection fails and pods never even get created. Inspecting the deployment, I find this message as the last status condition:

message: 'Internal error occurred: Internal error occurred: jsonpatch add operation
        does not apply: doc is missing path: /metadata/annotations/consul.hashicorp.com~1connect-inject-status'

If I add the following annotation, everything works exactly as expected, but I was hoping to avoid this since I'd probably prefer that use of Consul Connect be enforced by policy rather than by developer choice.

annotations:
        "consul.hashicorp.com/connect-inject": "true"
@adilyse adilyse added type/bug Something isn't working Azure labels Oct 25, 2018
@richthegeek
Copy link

+1 on MiniKube, automatic injection fails with this error.

@gregdurham
Copy link

+1 see this on EKS as well

@bartdzkan
Copy link

+1 See this on GKE as well.

@jleechp-occm
Copy link

See this on AKS as well.

@adilyse
Copy link
Contributor

adilyse commented Jan 9, 2019

For as widespread as this appears to be, I'm having a heck of a time reproducing it. Could folks please provide the versions of: Kubernetes, the Helm chart, Consul and consul-k8s where they see this? That will help give me a better place to start.

Thanks!

@adilyse
Copy link
Contributor

adilyse commented Jan 10, 2019

Turns out we were not correctly creating the metadata/annotations object in the case where an annotation was not already present. PR linked that will fix this.

ndhanushkodi pushed a commit to ndhanushkodi/consul-k8s that referenced this issue Jul 9, 2021
wilkermichael added a commit that referenced this issue Oct 13, 2022
wilkermichael added a commit that referenced this issue Oct 14, 2022
wilkermichael added a commit that referenced this issue Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants