Skip to content

Manage external cert#233

Closed
kangclzjc wants to merge 48 commits into
ai-dynamo:mainfrom
kangclzjc:cert_manage
Closed

Manage external cert#233
kangclzjc wants to merge 48 commits into
ai-dynamo:mainfrom
kangclzjc:cert_manage

Conversation

@kangclzjc

@kangclzjc kangclzjc commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

What type of PR is this?

Currently we do the certificate generation ourselves. If they already have certificate in their system, we should manage external existing certificate by mounting them

What this PR does / why we need it:

We add support for allowing user to use external cert

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a API change?


Additional documentation e.g., enhancement proposals, usage docs, etc.:


Comment thread operator/api/config/v1alpha1/types.go Outdated
// If set to false, you must provide your own certificates via Secret.
// Default: true
// +optional
AutoProvision *bool `json:"autoProvision,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm... maybe just default to auto provision in the code if SecretName isn't set, then the user doesn't have to remember to disable and we don't need to track this variable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right. It seems that we can detect secretName or certFilesPath user want to mount to decide whether to auto provision

@gflarity gflarity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As discussed, let's simplify the logic by enabling automatic certs when the secretName isn't provided.

@kangclzjc kangclzjc marked this pull request as ready for review November 4, 2025 02:36
@kangclzjc

Copy link
Copy Markdown
Contributor Author

As discussed, let's simplify the logic by enabling automatic certs when the secretName isn't provided.
Currently, this ps will implement these feature:

  1. If enable certManagerEnabled, then certmanager should handle the certificate/secret creation process
  2. if certFilesPath is not empty, then we only mount the certfiles into grove operator pod
  3. if certManagerEnabled and certFilesPath are not provided, then we use the default auto provision logic which currently is cert controller

Comment thread operator/charts/templates/authorizer-webhook-config.yaml Outdated
Comment thread operator/charts/templates/pcs-defaulting-webhook-config.yaml
Comment thread operator/charts/templates/pcs-validating-webhook-config.yaml Outdated
Comment thread operator/charts/templates/webhook-server-cert-secret.yaml Outdated

@gflarity gflarity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, left an example that I implemented a while ago (running in production for some time now). The only difference is we need to enable auto provision. Otherwise you can just follow this.

Comment thread operator/charts/templates/authorizer-webhook-config.yaml Outdated
@gflarity

gflarity commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

Sorry for the delay, planning to review this today.

@gflarity gflarity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @kangclzjc, gave it a quick review today. Looks good, I'll do a slower review tomorrow morning first thing. In the mean time:

One thing we'll need is a simple E2E test to verifying everything works using cert manager. Please take a look at the current E2E tests, all it really needs to do is install cert manager, then update the helm values to use it. If you start a simple grove deployment successfully, it means the webhooks are still working with this change.

There is code in the cluster setup utilities for installing a helm chart (cert manager). You should be able to reuse some of that logic to install cert manager for this specific test. Please let me know if you have any questions.

@kangclzjc

Copy link
Copy Markdown
Contributor Author

Thanks @kangclzjc, gave it a quick review today. Looks good, I'll do a slower review tomorrow morning first thing. In the mean time:

One thing we'll need is a simple E2E test to verifying everything works using cert manager. Please take a look at the current E2E tests, all it really needs to do is install cert manager, then update the helm values to use it. If you stat a simple grove deployment successfully, it means the webhooks are still working with this change.

There code in the cluster setup utilities for installing a helm chart (cert manager). You should be able to reuse some of that logic to install cert manager for this specific test. Please let me know if you have any questions.

Thanks @gflarity , let me check the E2E test first. And then do a simple E2E test to verifying everything works using cert manager.

@gflarity gflarity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a couple small things, otherwise looks good. Just need the E2E test(s).

Comment thread docs/api-reference/operator-api.md Outdated
Comment thread operator/charts/values.yaml Outdated
Comment thread operator/charts/values.yaml Outdated
@kangclzjc kangclzjc force-pushed the cert_manage branch 2 times, most recently from dabcda6 to 46d8d99 Compare December 15, 2025 05:02
@kangclzjc kangclzjc requested a review from gflarity December 15, 2025 08:38

@gflarity gflarity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left some feedback on the E2E test.

Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/dependencies.yaml
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
Comment thread operator/e2e/tests/cert_manager_test.go Outdated
@gflarity

gflarity commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Just circling back on this @kangclz so we can get it merged. What's the current status?

Please resolve any comments you believe have now been addressed.

Also, looks like the E2E tests are failing. Please try rebasing from main to see if that helps with the tests.

gflarity and others added 24 commits January 16, 2026 13:23
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: Bashorun97 <bashorun.emma@gmail.com>
Signed-off-by: Bashorun97 <bashorun.emma@gmail.com>
Signed-off-by: Bashorun97 <bashorun.emma@gmail.com>
Signed-off-by: Emmanuel Bashorun <bashorun.emma@gmail.com>
Signed-off-by: Emmanuel Bashorun <bashorun.emma@gmail.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
Signed-off-by: kangclzjc <kangz@nvidia.com>
@gflarity

Copy link
Copy Markdown
Contributor

Closing this PR in favour of #344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants