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

Remove -default-protocol and annotation support #418

Merged
merged 4 commits into from
Jan 25, 2021

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Jan 12, 2021

Changes proposed in this PR:

  • Remove support for -default-protocol and -enable-central-config flags passed to consul-k8s inject-connect command. These flags would cause Consul to write a service-defaults config entry that would set the protocol of the service.
  • Remove support for the consul.hashicorp.com/connect-service-protocol annotation. Connect pods that have this annotation will not be injected and the injector will return an error.

How I've tested this PR:

  • Using ghcr.io/lkysow/consul-k8s-dev:jan11 I created a service that sets the annotation and confirmed the replicaset won't start with error:
    Error creating: admission webhook "consul-connect-injector.consul.hashicorp.com" denied the request: Error validating pod: 
    the consul.hashicorp.com/connect-service-protocol annotation is no longer supported. Instead, create a ServiceDefaults 
    resource (see www.consul.io/docs/k8s/crds/upgrade-to-crds)
    

How I expect reviewers to test this PR:

  • code

Checklist:

  • Tests added
  • CHANGELOG entry added (HashiCorp engineers only, community PRs should not add a changelog entry)

Companion to: hashicorp/consul-helm#763

@lkysow lkysow requested review from a team, ishustava and thisisnotashwin and removed request for a team January 12, 2021 22:55
@lkysow lkysow marked this pull request as ready for review January 12, 2021 23:20
Copy link
Contributor

@thisisnotashwin thisisnotashwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!! Good work @lkysow 🦊

Copy link
Contributor

@ishustava ishustava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect! Looking at all the code removals gives you such a satisfying feeling 😃

connect-inject/handler.go Outdated Show resolved Hide resolved
@lkysow lkysow merged commit 33b6f35 into master Jan 25, 2021
@lkysow lkysow deleted the deprecate-central-config branch January 25, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants