Giter VIP home page Giter VIP logo

testing-addons's Introduction

cert-manager project logo

Build Status Go Report Card
Artifact Hub Scorecard score CLOMonitor

cert-manager

cert-manager adds certificates and certificate issuers as resource types in Kubernetes clusters, and simplifies the process of obtaining, renewing and using those certificates.

It supports issuing certificates from a variety of sources, including Let's Encrypt (ACME), HashiCorp Vault, and Venafi TPP / TLS Protect Cloud, as well as local in-cluster issuance.

cert-manager also ensures certificates remain valid and up to date, attempting to renew certificates at an appropriate time before expiry to reduce the risk of outages and remove toil.

cert-manager high level overview diagram

Documentation

Documentation for cert-manager can be found at cert-manager.io.

For the common use-case of automatically issuing TLS certificates for Ingress resources, see the cert-manager nginx-ingress quick start guide.

For a more comprensive guide to issuing your first certificate, see our getting started guide.

Installation

Installation is documented on the website, with a variety of supported methods.

Troubleshooting

If you encounter any issues whilst using cert-manager, we have a number of ways to get help:

If you believe you've found a bug and cannot find an existing issue, feel free to open a new issue! Be sure to include as much information as you can about your environment.

Community

The cert-manager-dev Google Group is used for project wide announcements and development coordination. Anybody can join the group by visiting here and clicking "Join Group". A Google account is required to join the group.

Meetings

We have several public meetings which any member of our Google Group is more than welcome to join!

Check out the details on our website. Feel free to drop in and ask questions, chat with us or just to say hi!

Contributing

We welcome pull requests with open arms! There's a lot of work to do here, and we're especially concerned with ensuring the longevity and reliability of the project. The contributing guide will help you get started.

Coding Conventions

Code style guidelines are documented on the coding conventions page of the cert-manager website. Please try to follow those guidelines if you're submitting a pull request for cert-manager.

Importing cert-manager as a Module

⚠️ Please note that cert-manager does not currently provide a Go module compatibility guarantee. That means that most code under pkg/ is subject to change in a breaking way, even between minor or patch releases and even if the code is currently publicly exported.

The lack of a Go module compatibility guarantee does not affect API version guarantees under the Kubernetes Deprecation Policy.

For more details see Importing cert-manager in Go on the cert-manager website.

The import path for cert-manager versions 1.8 and later is github.com/cert-manager/cert-manager.

For all versions of cert-manager before 1.8, including minor and patch releases, the import path is github.com/jetstack/cert-manager.

Security Reporting

Security is the number one priority for cert-manager. If you think you've found a security vulnerability, we'd love to hear from you.

Follow the instructions in SECURITY.md to make a report.

Changelog

Every release on GitHub has a changelog, and we also publish release notes on the website.

History

cert-manager is loosely based upon the work of kube-lego and has borrowed some wisdom from other similar projects such as kube-cert-manager.

Logo design by Zoe Paterson

testing-addons's People

Contributors

irbekrm avatar jetstack-bot avatar lonelycz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

lonelycz

testing-addons's Issues

Make the Gateway API support to configurate an ACME issuer

In most (probably all) cases the Gateway API will be used with an ACME issuer because usually this Gateway will be how the services are exposed publicly. Also it probably makes more sense to test this with an ACME issuer with HTTP-01 challenge because that way we can also test that the Gateway controller configuration works.

So this issuer spec could be defaulted to ACME with Let'sEncrypt dev issuer similar to this. We can make the spec configurable so users can pass their own if they want another issuer type.

Come from #31 (comment)

Make cert-manager + Vault workflow more configurable

At the moment users can configure the path of kubeconfig.

It would also be good if other options could be made configurable:

  • cert-manager version to install
  • Vault version to install
  • root domain of the Vault PKI
  • flags to pass to cert-manager components
  • whether ClusterIssuer or an Issuer (in a particular namespace) gets created
    ...

Make it possible to pass configure Helm values for cert-manager installation

It would be good if users had some way to pass Helm chart values via Terraform variables.
It will probably require some Terraform input variable of list or map type (maybe there is a better solution?). We might need to loop over that value to create the necessary set blocks

Note: later when we add Gateway API workflow we should be able to use the same mechanism to configure the shared cert-manager installation to work with Gateway API.
(For context for cert-manager to work with Gateway API resources, the feature gate ExperimentalGatewayAPISupport needs to be enabled by passing --feature-gates=ExperimentalGatewayAPISupport=true to cert-manager controller. When using Helm chart this can be done via extraArgs Helm value)

Add basic tests

As this repo will mostly contain Terraform files, we could have a basic test that runs Terraform linter.

cert-manager with ingress certs via ingress-shim

We should have a workflow for setting up cert-manager with a ingress controller to test cert issuance via ingress shim. We could use Ingress NGINX for testing this.

The workflow should deploy

Here is how we set up Ingress NGINX in cert-manager e2e tests. I think we should be able to use the latest ingress NGINX version.
Let me know if you think there will be issues with testing ACME issuer- I can do testing in cloud if needed.

Create a single variables file for cert-manager + Vault workflow

At the moment 4 are three separate vars files in ./cm-vault/*.

We should have a single file, so that if users want to, for example, provide a different kube config file path, they only need to specify it in one place.

(I assume that it is possible to pass a variables file to terragrunt run-all apply command)

Allow to optionally use AppRole to authenticate with Vault

At the moment cert-manager deployed from cm-vault workflow authenticates to Vault using token authentication method.

Debugging issues that require a specific authentication method is a common task- it would be good if it was also possible to optionally set up authentication via AppRole.

I see that the Terraform Vault provider has approle resources.

Users could select which authentication mechanism (token or approle) they want via a variable, i.e authentication_mechanism. Perhaps we could use count to make some resources get created optionally, i.e

resource "vault_auth_backend" "approle" {
  count = var.authentication_mechanism == "approle" ? 1 : 0
  type = "approle"
}

Refactor terraform modules to allow sharing cert-manager installation code

We currently have one Terragrunt workflow that creates cert-manager, Vault and some cert-manager and Vault resources.

We will be adding more workflows, starting with one that installs cert-manager and Gateway API resources and a gateway controller.

It would be great if we could re-use the functionality that installs cert-manager to reduce the maintenance burden that comes with having the same code in two places.

We could do this, for example, using Terraform modules and child modules.
As an example the repo structure could be something like

- modules
  - cm-install # terraform files from the current ./cm-vault/cm-install
  - cm-config
  - vault-install
  ...
- workflows
  - cm-vault
    - installation
      - main.tf
      - terragrunt.hcl
    - cm-config
      - main.tf
      - terragrunt.hcl
    - vault-config
      - main.tf
      - terragrunt.hcl
    ...
  - cm-gateway
    - installation
      - main.tf
   ...

where the contents of the ./workflows/cm-vault/installation/main.tf` could be something like

module {
  source = "../../../modules/cm-install"
  ...
}
module {
  source = "../../../modules/vault-install"
}

Or similar, I haven't actually tested if the above works.

The main thing that I would suggest is to try to refactor this in a way that is as much standard/known best practices as possible to make it easier for devs who are already familiar with standard repo structures to work with this repo.
It would be good if we could look up some example repository structures for both Terragrunt and Terraform modules, I see that for example Gruntworks have some in in their Github repository https://github.com/gruntwork-io?q=example&type=all&language=&sort=

Perhaps we can find a couple examples that are relevant and link here or in the associated PR.

Applying Terragrunt Vault workflow second time changes Vault's backend role

It looks like some defaulted parameters in Vault's backend role get modified if terragrunt apply-all

Terraform will perform the following actions:

  # vault_pki_secret_backend_role.role will be updated in-place
  ~ resource "vault_pki_secret_backend_role" "role" {
        id                                 = "pki/roles/cert-manager-io"
      ~ key_usage                          = [
          - "DigitalSignature",
          - "KeyAgreement",
          - "KeyEncipherment",
        ]
        name                               = "cert-manager-io"
        # (36 unchanged attributes hidden)
    }

To reproduce:

  1. Run terragrunt run-all apply from cm-vault directory
  2. Run terragrunt run-all apply again
  3. Observe output that suggests that vault_pki_secret_backend_role.role got modified

To prevent this from happening, we probably want to explicitly specify the key usage that Vault otherwise seems to default https://registry.terraform.io/providers/hashicorp/vault/latest/docs/resources/pki_secret_backend_role#key_usage

There are remain resources after executing `terragrunt run-all destroy`

When I run terragrunt run-all destroy to destroy the test environment, there are remain cert-manager and vault namespace

[root@master68 testing-addons]# kubectl get ns
NAME              STATUS   AGE
cert-manager      Active   7d3h
default           Active   249d
kube-node-lease   Active   249d
kube-public       Active   249d
kube-system       Active   249d
vault             Active   7d3h

and the demo-app-tls secret that is issued by ClusterIssuer also isn't cleaned, which could affect the next test.

[root@master68 testing-addons]# kubectl get secret
NAME                                       TYPE                                  DATA   AGE
demo-app-tls                               kubernetes.io/tls                     3      7d3h

Initial Gateway API workflow

Add inital workflow to configure cert-manager with Gateway API resources.

This workflow should:

#23 and #24 should be worked on first.

There will likely have to be manual steps to configure networking/DNS, depending on users environment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.