-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[infra-tests] Add self-signed
integration test
#12910
Conversation
.werft/installer-tests.ts
Outdated
@@ -18,9 +18,10 @@ const version: string = annotations.version || "-"; | |||
const preview: string = annotations.preview || "false"; // setting to true will not destroy the setup | |||
const upgrade: string = annotations.upgrade || "false"; // setting to true will not KOTS upgrade to the latest version. Set the channel to beta or stable in this case. | |||
const skipTests: string = annotations.skipTests || "false"; // setting to true skips the integration tests | |||
const selfSigned: string = annotations.selfSigned || "false"; |
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.
SelfSigned
annotation passed via job makes sense, but when running cron, this doesn't get toggled automatically, so I recommend doing a randomize on [true, false] for this boolean. So it rotates for tests.
const selfSigned: string = annotations.selfSigned || "false"; | |
const selfSigned: string = annotations.selfSigned || randomize(["true", "false"]); |
2ca9054
to
4bc6a89
Compare
With #11811, I've communicated that |
67765f2
to
b2b0e39
Compare
self-signed
infra phaseself-signed
integration test
install/tests/Makefile
Outdated
@@ -111,10 +111,14 @@ add-ns-record: check-env-cloud | |||
.PHONY: | |||
## cluster-issuer: Creates a cluster issuer for the correspondign provider | |||
cluster-issuer: check-env-cloud | |||
ifndef self_signed |
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 might be missing something here, but if self_signed
is not defined, skip cluster issuer? 🤔
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.
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.
Updated to use ifneq
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.
But wondering if this means, self-signed
is now triggered even when for -a self-signed=false
(which I'm not sure anyone would do though). ifneq
with a boolean seems to err for some reason. 🤔
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 feel like I might have been a bit short-sighted on my suggestion. I thought self-signed
is either set or not since you were using ifndef
. So, basically self-signed
is a string
that can have default value "false" or user provided value(can be "true", can be something else). So would it work if we did ifneq($(self_signed),"false")
?
I promise I will unblock you soon 🙈
Edit: I do not see any boolean values used
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.
So, using ifneq
for boolean strings doesn't feel great. Instead, I'm now setting self_signed
only when needed, and hence using ifdef
. Trying that out now. Sorry for the back and forth!
3e32b37
to
3daf524
Compare
207426e
to
761d399
Compare
c568241
to
1cae09f
Compare
This PR adds a new test option called `self-signed` which is used to enable `self-signed` integration tests. This is done by adding a new `generate-self-signed` make option, which is called whenever `self_signed` env variable is enabled. Once enabled, self-signed certs are genereated and relevant `self-signed-config` is called to attach those files into `kots` config. Signed-off-by: Tarun Pothulapati <[email protected]>
1cae09f
to
f9a2ff8
Compare
Description
This PR adds a new test option called
self-signed
which is used toenable
self-signed
integration tests. This is done by adding a newgenerate-self-signed
make option, which is called wheneverself_signed
env variable is enabled.
Once enabled, self-signed certs are genereated and relevant
self-signed-config
is called to attach those files into
kots
config.Signed-off-by: Tarun Pothulapati [email protected]
Related Issue(s)
Fixes #11270
How to test
Run
Release Notes
Documentation
Werft options: