-
Notifications
You must be signed in to change notification settings - Fork 326
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
[NET-11187] Nightly openshift basic test #4424
Conversation
We will need to consume the cloned repo chart in the future, but I'm trying to get something working first
2d6e8a0
to
9daa878
Compare
.PHONY: openshift-test-packages | ||
openshift-test-packages: ## openshift test packages | ||
@./control-plane/build-support/scripts/set_test_package_matrix.sh "acceptance/ci-inputs/openshift_acceptance_test_packages.yaml" | ||
|
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.
Is this only for CI or could I run make openshift-test-packages locally?
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.
You could run this locally if you were connected to an openshift cluster and passed in the --use-openshift flag
port: 443 | ||
tls: | ||
certificateRefs: | ||
- name: consul-server-cert |
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.
Does this refer to a secret that gets created by our helm templates?
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.
Yes
logf.SetLogger(logr.New(nil)) | ||
logger.Log(t, "creating resources for OpenShift test") | ||
|
||
cmd = exec.Command("kubectl", "apply", "-f", "../fixtures/cases/openshift/basic") |
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.
We also typically use a helper to run kubectl commands: https://github.com/hashicorp/consul-k8s/blob/main/acceptance/tests/partitions/partitions_connect_test.go#L219. I know you're bypassing the framework because of the root issue, but potentially you could still use the same pattern as other tests for these kubectl commands. Let me know if theres a reason not to though!!
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.
When I tried to use that function it got a bunch of errors from trying to connect to the static client pod, I'm not sure why
|
||
// FUTURE for some reason NewHelmCluster creates a consul server pod that runs as root which | ||
// isn't allowed in OpenShift. In order to test OpenShift properly, we have to call helm and k8s | ||
// directly to bypass. Ideally we would just fix the framework that is running the pod as root. |
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.
Ahh got it, thanks I was wondering about that.
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.
I know theres also some common test defaults that get set through those helper functions so it may be worth using those in the near future so the same defaults get set across our tests.
Note
This PR is related to https://github.com/hashicorp/consul-k8s-workflows/pull/77
Changes proposed in this PR
How I've tested this PR
How I expect reviewers to test this PR
Checklist