Skip to content

Commit

Permalink
re-enable eks 1.30 and use custom storage class
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Jun 26, 2024
1 parent 2c0d10e commit b914908
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .github/actions/cmx-versions/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7656,9 +7656,7 @@ async function getClusterVersions() {
latest_minor_versions: true,
},
eks: {
// latest_version: true,
// TODO: re-enable latest_version once we have compatibility with 1.30
versions: new Set(["1.29"]),
latest_version: true,
instance_type: "m7g.large" // arm64
},
openshift: {
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/cmx-versions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ async function getClusterVersions() {
latest_minor_versions: true,
},
eks: {
// latest_version: true,
// TODO: re-enable latest_version once we have compatibility with 1.30
versions: new Set(["1.29"]),
latest_version: true,
instance_type: "m7g.large" // arm64
},
openshift: {
Expand Down
1 change: 1 addition & 0 deletions .github/actions/kots-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ runs:
KOTS_DOCKERHUB_PASSWORD=${{ inputs.kots-dockerhub-password }} \
AIRGAP=${{ inputs.kots-airgap }} \
IS_OPENSHIFT=${{ inputs.k8s-distribution == 'openshift' && 'true' || 'false' }} \
IS_EKS=${{ inputs.k8s-distribution == 'eks' && 'true' || 'false' }} \
SKIP_TEARDOWN=1
shell: bash

Expand Down
2 changes: 2 additions & 0 deletions cmd/kots/cli/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func PullCmd() *cobra.Command {
Username: v.GetString("registry-username"),
Password: v.GetString("registry-password"),
},
StorageClassName: v.GetString("storage-class"),
HTTPProxyEnvValue: v.GetString("http-proxy"),
HTTPSProxyEnvValue: v.GetString("https-proxy"),
NoProxyEnvValue: v.GetString("no-proxy"),
Expand Down Expand Up @@ -127,6 +128,7 @@ func PullCmd() *cobra.Command {
cmd.Flags().Bool("exclude-kots-kinds", true, "set to true to exclude rendering kots custom objects to the base directory")
cmd.Flags().Bool("exclude-admin-console", false, "set to true to exclude the admin console (replicated apps only)")
cmd.Flags().String("shared-password", "", "shared password to use when deploying the admin console")
cmd.Flags().String("storage-class", "", "sets the storage class to use for the KOTS Admin Console components (if unset, the default storage class will be used)")
cmd.Flags().String("http-proxy", "", "sets HTTP_PROXY environment variable in all KOTS Admin Console components")
cmd.Flags().String("https-proxy", "", "sets HTTPS_PROXY environment variable in all KOTS Admin Console components")
cmd.Flags().String("no-proxy", "", "sets NO_PROXY environment variable in all KOTS Admin Console components")
Expand Down
2 changes: 2 additions & 0 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ test: KOTSADM_IMAGE_TAG ?= alpha
test: TESTIM_BRANCH ?= master
test: AIRGAP ?= 0
test: IS_OPENSHIFT ?= 0
test: IS_EKS ?= 0
test: SKIP_TEARDOWN ?= 0
ifneq ($(EXISTING_KUBECONFIG),)
test: EXISTING_KUBECONFIG_VOLUME_MOUNT := "-v=$(EXISTING_KUBECONFIG):$(EXISTING_KUBECONFIG)"
Expand All @@ -48,6 +49,7 @@ test:
--kotsadm-image-tag=$(KOTSADM_IMAGE_TAG) \
--airgap=$(AIRGAP) \
--is-openshift=$(IS_OPENSHIFT) \
--is-eks=$(IS_EKS) \
--kots-helm-chart-url=$(KOTS_HELM_CHART_URL) \
--kots-helm-chart-version=$(KOTS_HELM_CHART_VERSION) \
--kots-dockerhub-username=$(KOTS_DOCKERHUB_USERNAME) \
Expand Down
4 changes: 3 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var (
kotsadmImageTag string
airgap bool
isOpenShift bool
isEKS bool
kotsadmForwardPort string
kotsHelmChartURL string
kotsHelmChartVersion string
Expand All @@ -61,6 +62,7 @@ func init() {
flag.StringVar(&kotsadmImageTag, "kotsadm-image-tag", "alpha", "override the kotsadm images tag")
flag.BoolVar(&airgap, "airgap", false, "run install in airgapped mode")
flag.BoolVar(&isOpenShift, "is-openshift", false, "the cluster is an openshift cluster")
flag.BoolVar(&isEKS, "is-eks", false, "the cluster is an eks cluster")
flag.StringVar(&kotsadmForwardPort, "kotsadm-forward-port", "", "sets the port that the admin console will be exposed on instead of generating a random one")
flag.StringVar(&kotsHelmChartURL, "kots-helm-chart-url", "", "kots helm chart url")
flag.StringVar(&kotsHelmChartVersion, "kots-helm-chart-version", "", "kots helm chart version")
Expand Down Expand Up @@ -96,7 +98,7 @@ var _ = BeforeSuite(func() {

veleroCLI = velero.NewCLI(w.GetDir(), isOpenShift)

kotsInstaller = kots.NewInstaller(kotsadmImageRegistry, kotsadmImageNamespace, kotsadmImageTag, airgap, kotsDockerhubUsername, kotsDockerhubPassword)
kotsInstaller = kots.NewInstaller(kotsadmImageRegistry, kotsadmImageNamespace, kotsadmImageTag, airgap, kotsDockerhubUsername, kotsDockerhubPassword, isEKS)
})

var _ = AfterSuite(func() {
Expand Down
7 changes: 6 additions & 1 deletion e2e/kots/kots.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ type Installer struct {
airgap bool
dockerhubUsername string
dockerhubPassword string
isEKS bool
}

func NewInstaller(imageRegistry, imageNamespace, imageTag string, airgap bool, dockerhubUsername string, dockerhubPassword string) *Installer {
func NewInstaller(imageRegistry, imageNamespace, imageTag string, airgap bool, dockerhubUsername string, dockerhubPassword string, isEKS bool) *Installer {
return &Installer{
imageRegistry: imageRegistry,
imageNamespace: imageNamespace,
imageTag: imageTag,
airgap: airgap,
dockerhubUsername: dockerhubUsername,
dockerhubPassword: dockerhubPassword,
isEKS: isEKS,
}
}

Expand Down Expand Up @@ -100,6 +102,9 @@ func (i *Installer) install(kubeconfig string, test inventory.Test) (*gexec.Sess
fmt.Sprintf("--use-minimal-rbac=%t", test.UseMinimalRBAC),
fmt.Sprintf("--skip-compatibility-check=%t", test.SkipCompatibilityCheck),
}
if i.isEKS {
args = append(args, "--storage-class=gp2")
}

return util.RunCommand(exec.Command("kots", args...))
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/pull/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type PullOptions struct {
AppSequence int64
AppVersionLabel string
IsGitOps bool
StorageClassName string
HTTPProxyEnvValue string
HTTPSProxyEnvValue string
NoProxyEnvValue string
Expand Down Expand Up @@ -291,6 +292,7 @@ func Pull(upstreamURI string, pullOptions PullOptions) (string, error) {
IncludeAdminConsole: includeAdminConsole,
SharedPassword: pullOptions.SharedPassword,
EncryptConfig: encryptConfig,
StorageClassName: pullOptions.StorageClassName,
HTTPProxyEnvValue: pullOptions.HTTPProxyEnvValue,
HTTPSProxyEnvValue: pullOptions.HTTPSProxyEnvValue,
NoProxyEnvValue: pullOptions.NoProxyEnvValue,
Expand Down

0 comments on commit b914908

Please sign in to comment.