Skip to content

[kots]: add the KOTS installation manifests #8395

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

Merged
merged 7 commits into from
Mar 2, 2022
Merged

Conversation

mrsimonemms
Copy link
Contributor

@mrsimonemms mrsimonemms commented Feb 22, 2022

Description

This incorporates the Replicated/KOTS installation into the installation section of the repo. KOTS is a way of allowing us to manage how enterprises install our software

The change to .gitpod.yml is to install the Replicated CLI (to publish the manifests) and the KOTS (to install Gitpod with KOTS) plugin

Tested on:

  • AWS in-cluster
  • AWS external
  • Azure in-cluster
  • Azure external
  • GCP in-cluster
  • GCP external

NB this does not install the external dependencies, but merely that it provisions the application in those environments

I'm proposing avoiding the AWS testing at this stage until we establish whether the errors with the 2022.02.0 release are caused by this release or (more likely) an error in the AWS setup

Related Issue(s)

Fixes #

How to test

Release Notes

[kots]: add the KOTS installation manifests

Documentation

@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #8395 (cdedf00) into main (d4a2db8) will decrease coverage by 3.88%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8395      +/-   ##
==========================================
- Coverage   15.06%   11.17%   -3.89%     
==========================================
  Files          51       18      -33     
  Lines        4899      993    -3906     
==========================================
- Hits          738      111     -627     
+ Misses       4089      880    -3209     
+ Partials       72        2      -70     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
components-ws-daemon-app ?
components-ws-daemon-lib ?
install-installer-raw-app ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...l/installer/pkg/components/ws-manager/tlssecret.go
components/ws-daemon/pkg/content/config.go
...installer/pkg/components/ws-manager/rolebinding.go
components/ws-daemon/pkg/content/initializer.go
install/installer/pkg/common/storage.go
components/ws-daemon/pkg/cpulimit/cpulimit.go
components/local-app/pkg/auth/auth.go
install/installer/pkg/common/render.go
components/ws-daemon/pkg/cpulimit/cfs.go
components/ws-daemon/pkg/daemon/markunmount.go
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4a2db8...cdedf00. Read the comment docs.

@mrsimonemms mrsimonemms force-pushed the sje/kots-install branch 3 times, most recently from f18f93b to 23d39ac Compare February 23, 2022 16:22
@mrsimonemms mrsimonemms force-pushed the sje/kots-install branch 8 times, most recently from 9ae983f to f87fe10 Compare February 24, 2022 16:32
helm:
@echo "Installing Helm dependencies"
@rm -f manifests/*.tgz
@for f in $(shell ls -d charts/*/); do cd $${f} && helm dep up && helm package . --destination ../../manifests && cd -; done
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of this helm magic, couldn't we just download the cert-manager package like this?

$ curl -sSLO https://charts.jetstack.io/charts/cert-manager-v1.7.0.tgz

Or wouldn't this work for some reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would work, but I've done it as a general function in case we ever put a second Helm chart in there - we use external-dns in all the guides which might be worth offering in Kots in future

Copy link
Contributor

Choose a reason for hiding this comment

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

It's awesome that we have a generic solution for this problem at hand. To be honest, I would prefer the simple curl command, for now, to keep it simple. With that, we wouldn't need to add (and maintain) helm to the workspace image right now.

I know it's not easy to part with such an elegant, generic solution once you've poured it into code. However, this still exists in the archived gitpod-io/replicated repo and we can release it from there at any time as soon as we need it. You're not forgotten you beautiful code. We remember you! Promise! 👋

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh @corneliusludmann, you'll make me blush 😊

Again, as I said in the .gitpod.yml comment - I treat these as a proposition and then we all talk about it. I'm happy with switching to a simpler solution.

Copy link
Contributor Author

@mrsimonemms mrsimonemms Mar 2, 2022

Choose a reason for hiding this comment

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

Right, I think that my original approach is the correct one. Using the .tgz file provided by cert-manager has everything nested in a cert-manager folder. For KOTS to work, it needs to be in the root of the .tgz file - try pulling in the curl command you used and then run make lint to see the error.

So, that makes there two ways of achieving this:

  1. create a noddy Chart.yaml file and use the helm package function
  2. download the .tgz file, extract it, re-compress it with the cert-manager and use that new .tgz file

Whilst both have their limitations, I think approach 1 is the simpler and more maintainable one. We could just put the correct .tgz file in there, but I think that this might be forgotten when we come to do an update in future

Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree. When a simple curl does not work, using helm seems to be the better approach.

@mrsimonemms mrsimonemms force-pushed the sje/kots-install branch 5 times, most recently from 96fdaa9 to fd35036 Compare March 1, 2022 13:17
@mrsimonemms mrsimonemms changed the title WIP: [kots]: add the KOTS installation manifests [kots]: add the KOTS installation manifests Mar 1, 2022
@mrsimonemms mrsimonemms marked this pull request as ready for review March 1, 2022 15:38
@mrsimonemms mrsimonemms requested a review from a team March 1, 2022 15:38
@github-actions github-actions bot added the team: delivery Issue belongs to the self-hosted team label Mar 1, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2022

⚠️ Hey reviewer! BE CAREFUL ⚠️
Review the code before opening in your Gitpod. .gitpod.yml was changed and it might be harmful.

helm:
@echo "Installing Helm dependencies"
@rm -f manifests/*.tgz
@for f in $(shell ls -d charts/*/); do cd $${f} && helm dep up && helm package . --destination ../../manifests && cd -; done
Copy link
Contributor

Choose a reason for hiding this comment

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

It's awesome that we have a generic solution for this problem at hand. To be honest, I would prefer the simple curl command, for now, to keep it simple. With that, we wouldn't need to add (and maintain) helm to the workspace image right now.

I know it's not easy to part with such an elegant, generic solution once you've poured it into code. However, this still exists in the archived gitpod-io/replicated repo and we can release it from there at any time as soon as we need it. You're not forgotten you beautiful code. We remember you! Promise! 👋

What do you think?

@mrsimonemms mrsimonemms marked this pull request as draft March 2, 2022 08:41
@mrsimonemms mrsimonemms force-pushed the sje/kots-install branch 2 times, most recently from 71f1942 to c62a6e2 Compare March 2, 2022 10:11
@mrsimonemms mrsimonemms marked this pull request as ready for review March 2, 2022 13:07
@roboquat roboquat merged commit 863bb02 into main Mar 2, 2022
@roboquat roboquat deleted the sje/kots-install branch March 2, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note size/XXL team: delivery Issue belongs to the self-hosted team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants