From c949b01aac6e780bba58f7da64ff28d13c853746 Mon Sep 17 00:00:00 2001 From: JoshVanL Date: Mon, 8 Jul 2019 11:56:46 +0100 Subject: [PATCH 1/2] Adds Group to CertificateRequest IssuerRef to distinguish controller ownership Signed-off-by: JoshVanL --- deploy/manifests/00-crds.yaml | 15 ++++- .../output/reference/api-docs/index.html | 6 +- pkg/apis/certmanager/v1alpha1/types.go | 4 +- .../v1alpha1/types_certificaterequest.go | 5 +- .../certificaterequests/BUILD.bazel | 1 + pkg/controller/certificaterequests/sync.go | 6 ++ .../certificaterequests/sync_test.go | 62 ++++++++++++++++++- 7 files changed, 92 insertions(+), 7 deletions(-) diff --git a/deploy/manifests/00-crds.yaml b/deploy/manifests/00-crds.yaml index 4da49d4dc..89a5154dd 100644 --- a/deploy/manifests/00-crds.yaml +++ b/deploy/manifests/00-crds.yaml @@ -112,6 +112,8 @@ spec: with the provided name will be used. The 'name' field in this stanza is required at all times. properties: + group: + type: string kind: type: string name: @@ -279,9 +281,12 @@ spec: the 'kind' field is not set, or set to 'Issuer', an Issuer resource with the given name in the same namespace as the CertificateRequest will be used. If the 'kind' field is set to 'ClusterIssuer', a ClusterIssuer - with the provided name will be used. The 'name' field in this stanza - is required at all times. + with the provided name will be used. The 'name' field in this stanza + is required at all times. The group field refers to the API group + of the issuer which defaults to 'certmanager.k8s.io' if empty. properties: + group: + type: string kind: type: string name: @@ -414,6 +419,8 @@ spec: Issuer, an error will be returned and the Challenge will be marked as failed. properties: + group: + type: string kind: type: string name: @@ -1243,6 +1250,8 @@ spec: Issuer, an error will be returned and the Order will be marked as failed. properties: + group: + type: string kind: type: string name: @@ -1290,6 +1299,8 @@ spec: is not an 'ACME' Issuer, an error will be returned and the Challenge will be marked as failed. properties: + group: + type: string kind: type: string name: diff --git a/docs/generated/reference/output/reference/api-docs/index.html b/docs/generated/reference/output/reference/api-docs/index.html index fbc42f9c7..3c4a5fec7 100755 --- a/docs/generated/reference/output/reference/api-docs/index.html +++ b/docs/generated/reference/output/reference/api-docs/index.html @@ -2172,7 +2172,7 @@ Appears In: ObjectReference -

ObjectReference is a reference to an object with a given name and kind.

+

ObjectReference is a reference to an object with a given name, kind and group.