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

Activating instance admission controller for the e2e tests #1473

Merged
merged 1 commit into from
Apr 20, 2020

Conversation

zen-dog
Copy link
Contributor

@zen-dog zen-dog commented Apr 17, 2020

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

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
Copy link
Contributor Author

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 \
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

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

👍 nice! love this

@zen-dog zen-dog merged commit f181a85 into master Apr 20, 2020
@zen-dog zen-dog deleted the ad/e2e-with-iac branch April 20, 2020 09:28
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.

None yet

3 participants