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

Document how to install cert-manager using gitops and known issues with particular gitops implementations #320

Open
wallrj opened this issue Sep 4, 2020 · 7 comments
Labels
documentation Improvements or additions to documentation help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@wallrj
Copy link
Member

wallrj commented Sep 4, 2020

We could add some documentation briefly explaining how to install cert-manager using gitops systems like Flux or Anthos.

There are some known issues around the installation of CRDs and the subsequent injection of webhook caBundles into the CRDs where.

For example this conversations in Slack (https://kubernetes.slack.com/archives/C4NV3DWUC/p1599044537041800) where it is said that Flux does not work well with cert-manager upgrades.
Perhaps because as it upgrades CRDs it clobbers the injected caBundles and then attempts to read the state of the existing certificates before the caBundles have been re-injected and gets stuck because its calls to the K8S API server require a call to the (now unreachable) conversion webhook.

It could very well be that I have misunderstood the problem description, and I certainly don't know very much about Flux

But it would be good to try it, document any problems that do exist.

/cc @munnerz @meyskens @jfrancisco0

See also:

@jfrancisco0
Copy link
Contributor

My specific issue with cert-manager + Flux is as follows:

  • Deploy cert-manager via Flux:
    • Create HelmRelease
    • Create ClusterIssuers
    • Add ingress annotations
  • Something happens that breaks the webhook service, or it's broken by a new version. This was common for me in these situations:
  • Since Flux is watching some cert-manager custom resources (ClusterIssuers) it will start throwing errors because it can't reach the webhook (since it's not deployed), and fails to sync with git.

So, in the end, it won't deploy my updated cert-manager release (or anything else) and I need to either install cert-manager from outside Flux, or delete the CRDs (deleting the CRDs just hangs and doesn't complete successfully, I need to use this workaround kubernetes/kubernetes#60538 (comment)). Also note that, in this state, I can't delete the ClusterIssuers (or any other cert-manager resources) with kubectl either.

This is maybe more of an issue with Flux and K8s webhooks than with cert-manager, but perhaps something in the process can be improved. Hope my comment isn't too confusing!

@munnerz
Copy link
Member

munnerz commented Sep 4, 2020

I've also asked a question over in #sig-api-machinery on Slack about this, as I believe it's ultimately caused by the need for the webhook component to be upgraded before the CRDs (and then the controllers that consume those CRDs after that): https://kubernetes.slack.com/archives/C0EG7JC6T/p1599220160144500

That said, with the cainjector issue (cert-manager/cert-manager#3251) this will be made more problematic again, and even once that issue is solved, implies that the cainjector would need to be deployed alongside the webhook in 'phase 1' of installation.

@munnerz
Copy link
Member

munnerz commented Sep 4, 2020

I also think this issue affects more than just GitOps users - technically, whilst using kubectl replace or similar would work fine eventually (unlike in this GitOps case), it also leads to brief periods of outages for the cert-manager API whilst the upgrade is taking place (due to all the issues described here).

@wallrj
Copy link
Member Author

wallrj commented Sep 5, 2020

The tutorial A Complete Step by Step Guide to Implementing a GitOps Workflow with Flux includes an example of deploying cert-manager using Flux.

@irbekrm
Copy link
Contributor

irbekrm commented Apr 15, 2021

It would be good to get this done as the number of user issues/questions related to this seem to be increasing.

Related issue cert-manager#3291

/priority important-soon

@jetstack-bot jetstack-bot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 15, 2021
@irbekrm irbekrm added the documentation Improvements or additions to documentation label Apr 15, 2021
@irbekrm irbekrm added priority/backlog Higher priority than priority/awaiting-more-evidence. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Feb 14, 2023
@irbekrm
Copy link
Contributor

irbekrm commented Feb 14, 2023

We are currently short of bandwidth. I think this would still be a valuable addition to the documentation if someone is willing to contribute this.

@7h3-3mp7y-m4n
Copy link

hey can I work on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

6 participants