Skip to content
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

Add retries for issuing initial serving cert #364

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

SgtCoDFish
Copy link
Member

This enables istio-csr to be installed concurrently with cert-manager and to continue trying to operate until the initial serving cert is available

@cert-manager-prow cert-manager-prow bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 31, 2024
This enables istio-csr to be installed concurrently with cert-manager
and to continue trying to operate until the initial serving cert is
available

Signed-off-by: Ashley Davis <ashley.davis@venafi.com>
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

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

I haven't tested this, but it looks like it should allow the istio-csr process to:

  1. first wait for a ConfigMap to exist
  2. wait for the ConfigMap to contain all of: issuer-name, issuer-kind, and issuer-group
  3. create cert-manager CertificateRequest resources (with the given issuer-ref) until one of them gets signed.
  4. Give up and exit with an error if this process is performed more than 250 times.

I don't really understand why the serving certificate for the istio-csr gRPC service has to use the same cert-manager issuer is used for the CRs it generates for the istio workload certificates. In fact I would expect the serving certificate for the gRPC server to be signed by a different (platform) CA than the mTLS certificates of the workloads running on the platform.

I'd have thought that the istio-csr Pod could just mount a Secret containing the serving certificate and have that Secret populated by a cert-manager Certificate, as and when cert-manager gets installed.
I suppose this would cause the Istio-csr helm deployment with --wait to fail...but nevertheless that would be a simple and easily understandable process for installing istio-csr in parallel with cert-manager.

I just don't know enough about how istio-csr works. Don't want to hold you up though so I'll add an lgtm and we can do thorough testing when you release the alpha.

/approve
/lgtm
/hold incase there's anything else to be changed.

@cert-manager-prow cert-manager-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Jul 31, 2024
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wallrj

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

The pull request process is described 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

@cert-manager-prow cert-manager-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2024
@SgtCoDFish
Copy link
Member Author

/unhold

Thanks for the review Richard! I'm going to unhold and merge so I can get an alpha release out to test this more.

I don't really understand why the serving certificate for the istio-csr gRPC service has to use the same cert-manager issuer is used for the CRs it generates for the istio workload certificates. In fact I would expect the serving certificate for the gRPC server to be signed by a different (platform) CA than the mTLS certificates of the workloads running on the platform.

You're definitely onto something here. I think istio-csr does conflate a few things together with issuance, and there might be value in revisiting that. I think people with more istio experience than me could helpfully chime in.

For now, it seems like the current setup works - but I do think this deserves more thought!

@cert-manager-prow cert-manager-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 1, 2024
@cert-manager-prow cert-manager-prow bot merged commit bbb57a5 into cert-manager:main Aug 1, 2024
13 checks passed
@SgtCoDFish SgtCoDFish deleted the backoff-startup branch August 1, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants