Skip to content

[chart] Refactor chart to only use cert-manager #4592

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

Closed
wants to merge 9 commits into from

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Jun 23, 2021

  • Refactor the helm chart to remove self-generated SSL certificates using helm to certificates from cert-manager.
    The chart already contains a section for cert-manager, something that is being used in staging and prod.

    By using cert-manager, we can use an Issuer (namespaces) to generate the certificates using only one internal CA.

  • Install the CA certificate in registry-facade to allow pulls from the internal docker registry (if enabled) without trust issues.

  • Simplified configuration of components affinity.

  • New Job to ensure the creation of gitpod-sessions database.

@aledbf aledbf force-pushed the aledbf/cert-manager branch 3 times, most recently from 8883629 to 764f63b Compare June 23, 2021 16:51
@aledbf aledbf force-pushed the aledbf/cert-manager branch from 764f63b to e65b98f Compare July 2, 2021 00:15
aledbf added 2 commits July 6, 2021 09:22
Remove session affinity
Add update ca-certificates initContainer
@aledbf aledbf force-pushed the aledbf/cert-manager branch from e65b98f to 8157c86 Compare July 6, 2021 13:44
@aledbf aledbf force-pushed the aledbf/cert-manager branch from 8157c86 to 0861494 Compare July 6, 2021 13:48
@@ -17,7 +16,6 @@ metadata:
data:
init.sql: |-
{{- $root := . }}
{{- range $path, $bytes := .Files.Glob "config/db/init/**.sql" }}
{{- range $path, $bytes := .Files.Glob "config/db/init/02-create-and-init-sessions-db.sql" }}
Copy link
Member

Choose a reason for hiding this comment

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

Could you elaborate on this change? Why not are the other scripts not needed anymore?

Copy link
Member Author

@aledbf aledbf Jul 9, 2021

Choose a reason for hiding this comment

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

@geropl 03-recreate-gitpod-db drops the db. Does it seem the scripts expect the chart will be used for testing?

If you provide a connection to MySQL we should only assume the user, password, and database are valid. Everything else should be done by typeorm (even the creation of the sessions db)

Copy link
Member

Choose a reason for hiding this comment

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

Does it seem the scripts expect the chart will be used for testing?

They are used for both use cases: initialization (because it's straight-forward to mount into any DB container) and testing.

If you provide a connection to MySQL we should only assume the user, password, and database are valid. Everything else should be done by typeorm (even the creation of the sessions db)

That's certainly another way to do it. What would be the advantage over the current approach?

@geropl
Copy link
Member

geropl commented Jul 9, 2021

@aledbf Although the PR is in Draft-mode I already have a comment: Is it still possible to (easily) manually pass in certs if that is necessary?

@geropl geropl mentioned this pull request Jul 9, 2021
8 tasks
@aledbf
Copy link
Member Author

aledbf commented Jul 9, 2021

@aledbf Although the PR is in Draft-mode I already have a comment: Is it still possible to (easily) manually pass in certs if that is necessary?

You mean, you already have a secret containing the SSL certificate to be used in proxy?

@aledbf
Copy link
Member Author

aledbf commented Jul 9, 2021

@geropl for context, I still have pending changes to this PR.
This is the repository that I am using for the EKS guide https://github.com/aledbf/gitpod-chart-cleanup

@geropl
Copy link
Member

geropl commented Jul 9, 2021

You mean, you already have a secret containing the SSL certificate to be used in proxy?

Yes.

for context, I still have pending changes to this PR.

Did not meant to steal your time, sorry! :-D Will come back once it's "green".

aledbf added 2 commits July 12, 2021 06:43
Sync changes
[registry-facade] Install gitpod self-signed CA certificate
@csweichel
Copy link
Contributor

csweichel commented Jul 13, 2021

/werft run

👍 started the job as gitpod-build-aledbf-cert-manager.10

@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Sep 29, 2021
@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from aledbf after the PR has been reviewed.

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@aledbf aledbf added the meta: never-stale This issue can never become stale label Sep 29, 2021
@aledbf aledbf closed this Nov 20, 2021
@aledbf aledbf deleted the aledbf/cert-manager branch August 23, 2022 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants