GithubHelp home page GithubHelp logo

cert-manager / csi-driver-spiffe Goto Github PK

View Code? Open in Web Editor NEW
69.0 9.0 16.0 846 KB

A Kubernetes CSI plugin to automatically mount SPIFFE certificates to Pods using ephemeral volumes

Home Page: https://cert-manager.io/docs/usage/csi-driver-spiffe/

License: Apache License 2.0

Makefile 33.69% Go 61.15% Mustache 0.90% Shell 4.26%

csi-driver-spiffe's Issues

csi-driver-spiffe vs csi-driver

From the documentation of the cert-manager we can see that csi-driver spiffe allows to use SVIDs to enable mTLS between pods within their trust domain (https://cert-manager.io/docs/projects/csi-driver-spiffe/). However, in the csi-driver documentation (https://cert-manager.io/docs/projects/csi-driver/) there is also a way to use SPIFFE IDs and it also adds the right to use dnsNames (csi.cert-manager.io/dns-names). I am wondering, what is the difference between using these two tools, so what is the csi-driver-spiffe providing additionally and why it would be useful. Can the csi-driver-spiffe also be used to validate dns names when it requests the certificate? And is there any relevant documentation for this?

Add support for certificate expiry configuration

Currently the namespace csi.cert-manager.io supports many different volume configuration attributes.
This set of configuration can enable for example certificate renew period using the attributes csi.cert-manager.io/duration and csi.cert-manager.io/renew-before. However I've noted that it is not implemented on spiffe.csi.cert-manager.io namespace. Instead the expiry period seem to be fixed in 1 hour like image below.

image

What would take to implement at least the spiffe.csi.cert-manager.io/duration and spiffe.csi.cert-manager.io/renew-before attributes to enable certificate renew for csi-spiffe-driver?

Intermittent csi-driver-spiffe failure: Unable to mount cert

We have encountered intermittent issues where the CSI driver spiffe fails to mount the certificate on a pod.
This problem appears to occur more frequently when the CSI driver spiffe pod restarts.
Upon restarting the CSI driver spiffe pod, it seems to lose track of which pod certificates need to be renewed.
Interestingly, manually restarting the affected pod results in the correct mounting of new certificates.

We observed the following error messages in the csi-driver-spiffe log:

csi/manager "msg"="Failed to issue certificate, retrying after applying exponential backoff" "error"="waiting for request: certificaterequest.cert-manager.io \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\" not found" "volume_id"="csi-xxxxxxxx"
.......
csi/driver "msg"="failed processing request" "error"="timed out waiting for the condition" "request"={}
"rpc_method"="/csi.v1.Node/NodePublishVolume"
.......

We have already reviewed a previously closed issue (cert-manager/csi-driver#78) and updated the CSI data directory, but this did not resolve the problem.
We are actively looking for workarounds to address this behavior. One potential solution we are considering is utilizing a liveness probe.
We are seeking guidance on how to further identify and potentially resolve this issue.
Any suggestions regarding additional information we can provide would be greatly appreciated.

Investigate test timeouts

In #126, we bumped test timeouts.
However, it was not clear why the test is taking that long.
This issue aims to track any similar issues that might indicate that there is an underlying issue to these timeouts.

Increase e2e test timeouts

Currently timeouts for checking for success are scattered across tests (e.g. here) and so are hard to change.

They're also quite low and could easily flake in a resource constrained testing environment.

It would be better to have a single const controlling global timeouts to make this easier to change and to make it obvious what's happening.

The above linked code block could be rewritten to:

Eventually(func() bool {
	Expect(f.Client().Get(f.Context(), client.ObjectKeyFromObject(&certificateRequest), &certificateRequest)).NotTo(HaveOccurred())
	return apiutil.CertificateRequestIsApproved(&certificateRequest)
}).WithTimeout(testTimeout).WithInterval(pollInterval).WithContext(ctx).Should(BeTrue(), "expected request to become approved in time")

Note that this also passes the context into the Eventually function which would be useful if we were to enforce a global timeout on all e2e tests in the future

Add the ability to add custom annotations to certificate requests

Bit of a niche case but wanting to run the driver using firefly issuer- which when running in controller mode uses the certificate request annotation to determine which policy to apply to issue the certificate.

I have some code to do this globally and apply annotations to all certificate request resources, which seemed like the easiest way to configure it but could also configure it as volume attributes too if preferred

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.