[go: nahoru, domu]

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

Tooling to set up cert-manager with external dependencies #4855

Closed
irbekrm opened this issue Feb 14, 2022 · 20 comments
Closed

Tooling to set up cert-manager with external dependencies #4855

irbekrm opened this issue Feb 14, 2022 · 20 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@irbekrm
Copy link
Contributor
irbekrm commented Feb 14, 2022

Is your feature request related to a problem? Please describe.

Currently when trying to reproduce a bug/verify a bugfix or work on a feature that requires deployment and configuration of an external dependency with cert-manager, a lot of engineer's time is spent figuring out how to set up the external dependency to work with cert-manager. And even if one of the maintainers has knowledge how to configure a particular dependency, this knowledge is not shared with the rest of the maintainers or community.

Describe the solution you'd like

There should be some means how to easily install and cross-configure cert-manager and related external dependencies ( i.e Ingress/Gateway API implementations, Vault etc) and associated cert-manager resources for common scenarios. An example scenario would be to deploy Vault, setup Vault's PKI Secrets Engine, configure auth and create a cert-manager [Cluster]Issuer that works with the configured Vault PKI.
It should be straightforward to change the configuration of any of the tools and resources.
It should be straightforward to update the scripts/tool to allow deploying a new tool.

Describe alternatives you've considered

We have some dependency configuration scripts for e2e tests here. However, arguably, these are too complex to be easily usable/understandable.

Additional context

The more concrete implementation design is still in progress.

Here is the initial design doc https://docs.google.com/document/d/10mm10rmQudssTY71Ou2oqvGDtz70VzosGuKy90Is9-g/edit?usp=sharing

Environment details (remove if not applicable):

  • Kubernetes version:
  • Cloud-provider/provisioner:
  • cert-manager version:
  • Install method: e.g. helm/static manifests

/kind feature

@lonelyCZ
Copy link
Contributor
lonelyCZ commented Apr 3, 2022

Hi @irbekrm , I have used cert-manager that was cool, and I have still researched cli tools before. I would like to apply this feature as my GSoC 2022. Could you give me some advice?

@irbekrm
Copy link
Contributor Author
irbekrm commented Apr 4, 2022

Hi @lonelyCZ

Thanks for your interest in working on this as GSoC project, glad to hear you've used cert-manager already!

I would like to apply this feature as my GSoC 2022. Could you give me some advice?

The first thing to do would be to familiarize yourself with the GSoC timeline and contributor docs (that you may have already done)

I'd recommend that you get involved with the cert-manager community, say hi on Slack and see if you have a chance to join some of our meetings, see the details for how to join in our contributing docs

We usually recommend that folks who are interested in applying to our GSoC project also try to work with cert-manager a bit, picking up a good first issue or finding some other way how to contribute is a great way to get started and helps you to understand if the project is suits your interests and helps us to see whether we work well together :). Again, do reach out to us on Slack if you want to contribute and have questions about how to get started!

In terms of deadlines, I understand that 19th of April is the deadline for submitting the proposal.
Between now and then is a period for students to discuss proposal ideas with mentoring organizations. As a mentor I am happy to review a draft proposal and some of cert-manager team may also be able to give advice, do reach out on Slack :)
There is also a discussion board set up in CNCF Github with some interesting discussions https://github.com/cncf/mentoring/discussions/categories/google-summer-of-code-2022

Does this make sense?

@lonelyCZ
Copy link
Contributor
lonelyCZ commented Apr 5, 2022

Thanks for your reply. :) @irbekrm

I will familiarize the community as soon as possible, and actively participate in the draft proposal. Looking forward to work with community members.

@lonelyCZ
Copy link
Contributor
lonelyCZ commented Apr 9, 2022

I understand the purpose of this feature is easily to recreate the installation of cert-manager with external dependencies for maintainers or members. There are two opinions:

  1. If there have been a cert-manager environment only lacking external dependencies, we should only deploy external dependencies, so should we separate cert-manger from externally dependent installations. For example, providing a option for script to certain install mode.
  2. Because each external dependency is configured differently, we may need to be flexible in configuring these options, so we can separate the configuration file from the installation file. Such as vault, we provide a default configuration file that users can modify as needed, as shown in the figure below.

image

@irbekrm
Copy link
Contributor Author
irbekrm commented Apr 11, 2022

If there have been a cert-manager environment only lacking external dependencies, we should only deploy external dependencies, so should we separate cert-manger from externally dependent installations. For example, providing a option for script to certain install mode.

Whatever installation mechanism you choose, it should be able to deploy different combinations of cert-manager + some external tools, i.e cert-manager + Vault, cert-manager + some ingress implementation etc.
It would be nice to consider how the installation mechanism you choose could be made further configurable so that the user can install just the dependencies and not cert-manager or perhaps you implement the mechanism in such a way that it already works for MVP.

Because each external dependency is configured differently, we may need to be flexible in configuring these options, so we can separate the configuration file from the installation file. Such as vault, we provide a default configuration file that users can modify as needed, as shown in the figure below.

This will really depend on what installation mechanism you choose and how much abstraction you build on top. For example, you could have chosen to implement this as a Go CLI and pass each configuration option as a CLI flag and then in your code translate those into the format suitable to configure each dependency. Or you can have configuration templates for each dependency as you say, they are all valid options and each has its pros and cons.
It would be good if your proposal would show how you expect the configuration options can be passed. It can also be good to have a 'Questions' section for things that are not clean yet at this point. You could also add a 'Constraints' section if you can think of any constraints for this particular installation mechanism.

@lonelyCZ
Copy link
Contributor

Thank you! :)

they are all valid options and each has its pros and cons.

Yes, I consider their pros and cons as follows

  1. If we implement this as a Go CLI, it is easy to use, but not easy to extend. Each extension of a dependency requires redevelopment and compilation, which is not conducive to sharing knowledge.
  2. If we implement this as configuration templates, implementing a configuration framework, which facilitates scaling, but we need to design a friendly way to use it.
  3. If we were using Terraform, we might need to ask members to learn a new build language.

I tend to option 2 or option 3 because developing a command-line tool can be complex and difficult to maintain, especially considering that it can install multiple dependencies.

What do you think, or what do you think of Terraform and how many members use this tool?@irbekrm I think the implementation ideas of scheme 2 and 3 are similar.

@irbekrm
Copy link
Contributor Author
irbekrm commented Apr 12, 2022

Hi @lonelyCZ

Yes, I consider their pros and cons as follows

Good work on considering those, I think you can even include that in the proposal as I think it's always valuable to show that you've considered alternatives 👍🏼

I don't want to influence which option you choose in the proposal 😄 The point of the proposal is for you to choose an implementation mechanism that you think is best and describe how you will solve the problem with it.

Some thoughts though

If we implement this as a Go CLI, it is easy to use, but not easy to extend. Each extension of a dependency requires redevelopment and compilation, which is not conducive to sharing knowledge.

I think if the solution was a CLI, it should be built in such a way that there is some sort of 'framework' that makes adding a new extension easy, i.e adding a new extension should not require touching too many unrelated parts of code (redevelopment). I would argue that having to compile it (most likely this would mean making a new release for the tool) is not a big problem. There could be other maintentance related cons though and agree that it might be more complex than just scripts.

What do you think, or what do you think of Terraform and how many members use this tool

I think all of us are familiar with Terraform

@lonelyCZ
Copy link
Contributor

Thanks for your response @irbekrm

I will write a proposal as soon as possible, including all of my consideration.

@irbekrm
Copy link
Contributor Author
irbekrm commented Apr 13, 2022

Thanks @lonelyCZ

Good luck with the proposal!

To add, the actual GSoC work includes working on a design doc and discussing it with the cert-manager team, so the actual implementation might differ from what you will describe in the proposal. I'd just encourage you to choose the implementation mechanism you think is best suited and describe that.

@lonelyCZ
Copy link
Contributor

Hi, @irbekrm , I have submited a proposal, there is a replica at https://docs.google.com/document/d/1wZ5ia0j4-5UVWN24xgj25UaYffPaTlBtpmerr5Uw8Io/edit#, looking forward to your comments, thanks :)

If possible, I would like to discuss the feasibility of the proposal with the community to determine the final practical proposal.

@irbekrm
Copy link
Contributor Author
irbekrm commented Apr 19, 2022

Thanks @lonelyCZ! I will take a look now.

discuss the feasibility of the proposal with the community to determine the final practical proposal

Once a student gets accepted, there will be a period of time to discuss the final design with the whole team following the same process as we usually do when discussing a design document, so you should not worry about smaller details at this stage I think (The alternative would have been to have the whole of the team involved in working with each candidate on their proposal, which would not be feasible).
Also, CNCF org admin will have the final say about which projects get accepted.
Does this make sense?

@lonelyCZ
Copy link
Contributor

Yes, thanks for your reply. @irbekrm During this period, I will try my best to implement some demos to verify the feasibility of the proposal.

Also, CNCF org admin will have the final say about which projects get accepted.

Regardless of the results, we hope to complete the project in a better way and bring more convenience to the community.

@lonelyCZ
Copy link
Contributor

Thanks for you comments @irbekrm , I will improve it as soon as possible.

@wallrj
Copy link
Member
wallrj commented Apr 28, 2022

/priority important-soon

Assigned during triage party. Seems like this will be embarked on during the next few months of GSoC.

@wallrj
Copy link
Member
wallrj commented Apr 28, 2022

/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 28, 2022
@lonelyCZ
Copy link
Contributor
lonelyCZ commented May 3, 2022

Hi, @irbekrm. I'm excited to tell you that I have implemented an easy demo that can deploy and setup Cert-manager and Vault with Terraform at this repository https://github.com/lonelyCZ/terraform-cm.

It currently supports the deployment of Cert-manager and Vault, configures the PKI engine for Vault by default, and generates a ClusterIssuer object named vault-issuer. However, the current implementation is simple, lacks some necessary dependency checking, and may not be stable.

@jetstack-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 1, 2022
@jetstack-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 31, 2022
@jetstack-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

@jetstack-bot
Copy link
Contributor

@jetstack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

4 participants