Skip to content

Remove unused caCertSecret #16793

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 15 commits into from
Mar 21, 2023
Merged

Remove unused caCertSecret #16793

merged 15 commits into from
Mar 21, 2023

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Mar 10, 2023

Description

Remove an unused feature that also creates an invalid configuration in registry-facade.

It also introduces trust-manager to centralize and simplify the management of ca-certificate.crt in the components

If in the future we need to add support for a custom CA certificate, we only need to add a reference to a secret in the bundle

How to test

  • cert-manager certificates should generates all the secrets
  • the file /etc/ss/ca-certificates should be mounted from a configmap
  • integration tests should pass
  • open workspaces should work

Related issues

fixes #16767

  • Any Dedicated cell older than 2 months will experience trouble renewing TLS certificates w/o this change

Release Notes

NONE

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=workspace
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.8 because the annotations in the pull request description changed
(with .werft/ from main)

@aledbf aledbf force-pushed the aledbf/bye-custom-ca-cert branch 5 times, most recently from 600e75e to 3ea0c27 Compare March 10, 2023 23:46
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.26 because the annotations in the pull request description changed
(with .werft/ from main)

@aledbf aledbf force-pushed the aledbf/bye-custom-ca-cert branch from 3ea0c27 to bca0027 Compare March 11, 2023 00:41
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.30 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.31 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.32 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.34 because the annotations in the pull request description changed
(with .werft/ from main)

@aledbf
Copy link
Member Author

aledbf commented Mar 11, 2023

/werft with-integration-tests=workspace with-large-vm=true with-gce-vm=true

👎 unknown command: with-integration-tests=workspace
Use /werft help to list the available commands

@aledbf
Copy link
Member Author

aledbf commented Mar 11, 2023

/werft run with-integration-tests=workspace with-large-vm=true with-gce-vm=true

👍 started the job as gitpod-build-aledbf-bye-custom-ca-cert.35
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.36 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.37 because the annotations in the pull request description changed
(with .werft/ from main)

@aledbf
Copy link
Member Author

aledbf commented Mar 11, 2023

/werft run with-integration-tests=workspace with-large-vm=true with-gce-vm=true

👍 started the job as gitpod-build-aledbf-bye-custom-ca-cert.39
(with .werft/ from main)

@aledbf aledbf marked this pull request as ready for review March 11, 2023 15:58
@aledbf aledbf requested review from a team March 11, 2023 15:58
@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team labels Mar 11, 2023
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-bye-custom-ca-cert.54 because the annotations in the pull request description changed
(with .werft/ from main)

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

The combination of installer and application level changes make this PR more difficult to review. An approach to make that easier is to first update/remove from the installer, and then make the application level changes. This also ensures that we can do an install in between (with just installer config changes) without actually removing the app code. That in turn can make our life easier should we need to revert this.

@@ -180,6 +180,23 @@ function installFluentBit {
upgrade --install fluent-bit fluent/fluent-bit --version 0.21.6 -n "${PREVIEW_NAMESPACE}" -f "$ROOT/.werft/vm/charts/fluentbit/values.yaml"
}

function installTrustManager {
Copy link
Member

Choose a reason for hiding this comment

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

How is this change related to this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

To be able to get a workspace preview running after running the installer

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I don't follow. What in this PR makes it so that we now have to install the trust manager which we didn't need before?

Copy link
Member Author

@aledbf aledbf Mar 17, 2023

Choose a reason for hiding this comment

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

The new Bundle definitions solve the issues we have right an invalid cert-manager CA, certificate rotation, and complexity to update /etc/ssl/ca-certificates.crt

@aledbf
Copy link
Member Author

aledbf commented Mar 17, 2023

The combination of installer and application level changes make this PR more difficult to review. An approach to make that easier is to first update/remove from the installer, and then make the application level changes. This also ensures that we can do an install in between (with just installer config changes) without actually removing the app code. That in turn can make our life easier should we need to revert this.

I can't do that here. If I only remove the feature without fixing the CA state, we break registry-facade (in particular)
For context please check https://gitpod.slack.com/archives/C04EY56P1HN/p1678552918962709

@aledbf aledbf force-pushed the aledbf/bye-custom-ca-cert branch from 4c02380 to 35b75c3 Compare March 20, 2023 23:55
Copy link
Member

@WVerlaek WVerlaek left a comment

Choose a reason for hiding this comment

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

lgtm, tested in a preview env starting a workspace and an image build

@roboquat roboquat merged commit 5b30eb5 into main Mar 21, 2023
@roboquat roboquat deleted the aledbf/bye-custom-ca-cert branch March 21, 2023 10:44
@roboquat roboquat added the deployed: IDE IDE change is running in production label Mar 21, 2023
easyCZ added a commit that referenced this pull request Mar 21, 2023
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production labels Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production release-note-none size/XXL team: IDE team: security-infrastructure-and-delivery team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
Status: In Validation
Status: Done
Development

Successfully merging this pull request may close these issues.

Remove the customCACert field from the installer
7 participants