This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 385
Fail scheduling all pods that are not part of consul when the webhook is offline #1024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kschoche
added
enhancement
New feature or request
area/connect
Related to Connect, e.g. injection
labels
Jul 6, 2021
kschoche
requested review from
ndhanushkodi and
ishustava
and removed request for
a team
July 6, 2021 16:45
ishustava
approved these changes
Jul 9, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this 🎉 🎉 🎉
Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
kschoche
commented
Jul 9, 2021
david-yu
changed the title
Fail scehduling all pods that are not part of consul when the webhook is offline
Fail scheduling all pods that are not part of consul when the webhook is offline
Jul 12, 2021
ndhanushkodi
approved these changes
Jul 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work Kyle!!
kschoche
commented
Jul 13, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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.
Fail scheduling all pods that are not labeled with
app: consul.name
.This ensures that no user apps are inadvertently scheduled and skip mutation while the webhook is offline (after consul has been installed).
I chose to match on
app: consul.name
so we do not fail to schedule our own pods in case the webhook object is applied to k8s before the rest of our consul components are scheduled.Changes proposed in this PR:
Fail
instead ofIgnore
connectInject.failurePolicy
default toFail
which controls the behaviour.How I've tested this PR:
kubectl exec -it consul-consul-connect-injector-webhook-deployment-84cb5c97llxd9 -- touch /tmp/healthy
How I expect reviewers to test this PR:
Code review
CI run against GKE: https://app.circleci.com/pipelines/github/hashicorp/consul-helm/3370/workflows/2ae29e9c-a234-407a-a4c9-84a96fad0979
CI run against Kind: https://app.circleci.com/pipelines/github/hashicorp/consul-helm/3369/workflows/5a0f3727-e04a-4b03-902a-0bc0137e45f4
Checklist: