-
Notifications
You must be signed in to change notification settings - Fork 104
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
Activating instance admission controller for the e2e tests #1473
Conversation
Summary: when initializing KUDO manager for the e2e tests we now use the `--webhook InstanceValidation --unsafe-self-signed-webhook-ca` options that activate the instance admission controller (IAC) using the self-signed webhook CA bundle. We must ensure that KUDO manager runs before we begin executing test steps, otherwise, IAC `MutatingWebhookConfiguration` will fail `CREATE` and `UPDATE` requests to the `Instance` resources if the webhook server is not up and running. To achieve this, I added first step to all e2e steps ensuring the `kudo-controller-manager` pod is `Running`. Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
@@ -1,5 +1,5 @@ | |||
apiVersion: kudo.dev/v1beta1 | |||
kind: TestStep | |||
commands: | |||
- command: kubectl kudo update --instance feature-operator-instance -p enable_cm=false | |||
namespaced: true | |||
- command: kubectl kudo update --instance feature-operator-instance -p enable_cm=true |
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.
This diff is confusing: I had to insert the 00-assert.yaml
at the beginning and so all other step files had their numbers increased and now it looks like there was a change here, but there wasn't.
@@ -13,7 +13,7 @@ docker build . \ | |||
-t "kudobuilder/controller:$VERSION" | |||
|
|||
# Generate the kudo.yaml that is used to install KUDO while running e2e-test | |||
./bin/kubectl-kudo init --dry-run --output yaml --kudo-image kudobuilder/controller:$VERSION \ | |||
./bin/kubectl-kudo init --webhook InstanceValidation --unsafe-self-signed-webhook-ca --dry-run --output yaml --kudo-image kudobuilder/controller:$VERSION \ |
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.
This activates the IAC
@@ -0,0 +1,12 @@ | |||
apiVersion: kudo.dev/v1beta1 |
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.
And this is waiting for KUDO manager to come up before every test
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
phase: Running |
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.
👍 nice! love this
Summary:
when initializing KUDO manager for the e2e tests we now use the
--webhook InstanceValidation --unsafe-self-signed-webhook-ca
options that activate the instance admission controller (IAC) using the self-signed webhook CA bundle.We must ensure that KUDO manager runs before we begin executing test steps, otherwise, IAC
MutatingWebhookConfiguration
will failCREATE
andUPDATE
requests to theInstance
resources if the webhook server is not up and running. To achieve this, I added first step to all e2e steps ensuring thekudo-controller-manager
pod isRunning
.Signed-off-by: Aleksey Dukhovniy alex.dukhovniy@googlemail.com