-
Notifications
You must be signed in to change notification settings - Fork 40
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
selectively disable addons #275
Conversation
Can we update the Readme under infrastructure as well? |
@@ -15,6 +15,9 @@ export class KITInfrastructure extends Stack { | |||
const repoUrl = this.getContextOrDefault('FluxRepoURL', "https://github.com/awslabs/kubernetes-iteration-toolkit") | |||
const repoBranch = this.getContextOrDefault('FluxRepoBranch', 'main') | |||
const repoPath = this.getContextOrDefault('FluxRepoPath', './infrastructure/k8s-config/clusters/kit-infrastructure') | |||
const installEBSCSIDriverAddon = Boolean(this.getContextOrDefault("AWSEBSCSIDriverAddon", "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.
If you change this method to be getContextOrDefault(key: string, def: string | boolean | null)
it should return the context passed and have an if condition like this -
if (installKitAddon == 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.
If you change this method to be getContextOrDefault(key: string, def: string | boolean | null) it should return the context passed
It already returns the context passed with the change i made, no need to change ^^^ that function :D. Unless you are implying something here ?
if (installKitAddon == true)
-
hmmm ^^^ setting this value makes the value comparison to be explicit instead of implicit.
-
IOW, this change will ensure any value that is set through context is taken as
false
unless it is set totrue
explicitly
(opposite of default typescript behavior for boolean/string conversion). Instead of just empty value is taken asfalse
and any other value is taken astrue
( which is default typescript behavior).
I'm curious why we'd ever want to disable those add-ons? This setup should ideally be a very opinionated testing environment. Is there a use-case for testing without some add-ons installed? |
Yes, we have such use-case in Scalability where we only spin-up EKS specific clusters through Tekton and not having to do anything with Karpenter, KIT on management cluster/KIT Infra. |
947ac15
to
cb49570
Compare
cb49570
to
aa20323
Compare
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.
LGTM!
Issue #, if available:
#253
Description of changes:
Selectively disables addons from Infrastructure code at the time of deployment:
Testing
^^^ Empty values means disable addons - typescripty thing for String to Boolean.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.