From 4bda511b3d361a84bdd3369b0c7b983dd31ae9e7 Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Mon, 23 Sep 2019 12:01:05 +0100 Subject: [PATCH] Rename API group to cert-manager.io Signed-off-by: James Munnelly --- pkg/apis/certmanager/doc.go | 5 ++-- pkg/apis/certmanager/v1alpha2/doc.go | 3 ++- pkg/apis/certmanager/v1alpha2/types.go | 24 +++++++++---------- .../v1alpha2/types_certificaterequest.go | 2 +- pkg/apis/doc.go | 2 +- pkg/internal/apis/certmanager/doc.go | 2 +- pkg/internal/apis/certmanager/types.go | 22 ++++++++--------- .../certmanager/types_certificaterequest.go | 2 +- pkg/internal/apis/certmanager/v1alpha2/doc.go | 2 +- 9 files changed, 33 insertions(+), 31 deletions(-) diff --git a/pkg/apis/certmanager/doc.go b/pkg/apis/certmanager/doc.go index 60b78265e..414d0c361 100644 --- a/pkg/apis/certmanager/doc.go +++ b/pkg/apis/certmanager/doc.go @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +groupName=certmanager.k8s.io +// +groupName=cert-manager.io +// +groupGoName=Certmanager // Package certmanager is the internal version of the API. package certmanager -const GroupName = "certmanager.k8s.io" +const GroupName = "cert-manager.io" diff --git a/pkg/apis/certmanager/v1alpha2/doc.go b/pkg/apis/certmanager/v1alpha2/doc.go index 0864c304f..a4e9252d8 100644 --- a/pkg/apis/certmanager/v1alpha2/doc.go +++ b/pkg/apis/certmanager/v1alpha2/doc.go @@ -20,5 +20,6 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // Package v1alpha2 is the v1alpha2 version of the API. -// +groupName=certmanager.k8s.io +// +groupName=cert-manager.io +// +groupGoName=Certmanager package v1alpha2 diff --git a/pkg/apis/certmanager/v1alpha2/types.go b/pkg/apis/certmanager/v1alpha2/types.go index 78c3ecdda..dbe48d9ea 100644 --- a/pkg/apis/certmanager/v1alpha2/types.go +++ b/pkg/apis/certmanager/v1alpha2/types.go @@ -18,17 +18,17 @@ package v1alpha2 // Annotation names for Secrets const ( - AltNamesAnnotationKey = "certmanager.k8s.io/alt-names" - IPSANAnnotationKey = "certmanager.k8s.io/ip-sans" - CommonNameAnnotationKey = "certmanager.k8s.io/common-name" - IssuerNameAnnotationKey = "certmanager.k8s.io/issuer-name" - IssuerKindAnnotationKey = "certmanager.k8s.io/issuer-kind" - CertificateNameKey = "certmanager.k8s.io/certificate-name" + AltNamesAnnotationKey = "cert-manager.io/alt-names" + IPSANAnnotationKey = "cert-manager.io/ip-sans" + CommonNameAnnotationKey = "cert-manager.io/common-name" + IssuerNameAnnotationKey = "cert-manager.io/issuer-name" + IssuerKindAnnotationKey = "cert-manager.io/issuer-kind" + CertificateNameKey = "cert-manager.io/certificate-name" ) // Annotation names for CertificateRequests const ( - CRPrivateKeyAnnotationKey = "certmanager.k8s.io/private-key-secret-name" + CRPrivateKeyAnnotationKey = "cert-manager.io/private-key-secret-name" ) const ( @@ -37,7 +37,7 @@ const ( // If it is present, a temporary internally signed certificate will be // stored in the target Secret resource whilst the real Issuer is processing // the certificate request. - IssueTemporaryCertificateAnnotation = "certmanager.k8s.io/issue-temporary-certificate" + IssueTemporaryCertificateAnnotation = "cert-manager.io/issue-temporary-certificate" ) const ( @@ -51,25 +51,25 @@ const ( // WantInjectAnnotation is the annotation that specifies that a particular // object wants injection of CAs. It takes the form of a reference to a certificate // as namespace/name. The certificate is expected to have the is-serving-for annotations. - WantInjectAnnotation = "certmanager.k8s.io/inject-ca-from" + WantInjectAnnotation = "cert-manager.io/inject-ca-from" // WantInjectAPIServerCAAnnotation, if set to "true", will make the cainjector // inject the CA certificate for the Kubernetes apiserver into the resource. // It discovers the apiserver's CA by inspecting the service account credentials // mounted into the cainjector pod. - WantInjectAPIServerCAAnnotation = "certmanager.k8s.io/inject-apiserver-ca" + WantInjectAPIServerCAAnnotation = "cert-manager.io/inject-apiserver-ca" // WantInjectFromSecretAnnotation is the annotation that specifies that a particular // object wants injection of CAs. It takes the form of a reference to a Secret // as namespace/name. - WantInjectFromSecretAnnotation = "certmanager.k8s.io/inject-ca-from-secret" + WantInjectFromSecretAnnotation = "cert-manager.io/inject-ca-from-secret" // AllowsInjectionFromSecretAnnotation is an annotation that must be added // to Secret resource that want to denote that they can be directly // injected into injectables that have a `inject-ca-from-secret` annotation. // If an injectable references a Secret that does NOT have this annotation, // the cainjector will refuse to inject the secret. - AllowsInjectionFromSecretAnnotation = "certmanager.k8s.io/allow-direct-injection" + AllowsInjectionFromSecretAnnotation = "cert-manager.io/allow-direct-injection" ) // KeyUsage specifies valid usage contexts for keys. diff --git a/pkg/apis/certmanager/v1alpha2/types_certificaterequest.go b/pkg/apis/certmanager/v1alpha2/types_certificaterequest.go index 1d0c25127..5130f902b 100644 --- a/pkg/apis/certmanager/v1alpha2/types_certificaterequest.go +++ b/pkg/apis/certmanager/v1alpha2/types_certificaterequest.go @@ -68,7 +68,7 @@ type CertificateRequestSpec struct { // 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. The group field refers to the API group of the - // issuer which defaults to 'certmanager.k8s.io' if empty. + // issuer which defaults to 'cert-manager.io' if empty. IssuerRef cmmeta.ObjectReference `json:"issuerRef"` // Byte slice containing the PEM encoded CertificateSigningRequest diff --git a/pkg/apis/doc.go b/pkg/apis/doc.go index 2b523ab3b..5341dc381 100644 --- a/pkg/apis/doc.go +++ b/pkg/apis/doc.go @@ -15,6 +15,6 @@ limitations under the License. */ // -// +domain=k8s.io +// +domain=cert-manager.io package apis diff --git a/pkg/internal/apis/certmanager/doc.go b/pkg/internal/apis/certmanager/doc.go index b27ed2690..403852c6f 100644 --- a/pkg/internal/apis/certmanager/doc.go +++ b/pkg/internal/apis/certmanager/doc.go @@ -17,5 +17,5 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // Package certmanager is the internal version of the API. -// +groupName=certmanager.k8s.io +// +groupName=cert-manager.io package certmanager diff --git a/pkg/internal/apis/certmanager/types.go b/pkg/internal/apis/certmanager/types.go index 9d4b170f0..68d49f5e9 100644 --- a/pkg/internal/apis/certmanager/types.go +++ b/pkg/internal/apis/certmanager/types.go @@ -18,17 +18,17 @@ package certmanager // Annotation names for Secrets const ( - AltNamesAnnotationKey = "certmanager.k8s.io/alt-names" - IPSANAnnotationKey = "certmanager.k8s.io/ip-sans" - CommonNameAnnotationKey = "certmanager.k8s.io/common-name" - IssuerNameAnnotationKey = "certmanager.k8s.io/issuer-name" - IssuerKindAnnotationKey = "certmanager.k8s.io/issuer-kind" - CertificateNameKey = "certmanager.k8s.io/certificate-name" + AltNamesAnnotationKey = "cert-manager.io/alt-names" + IPSANAnnotationKey = "cert-manager.io/ip-sans" + CommonNameAnnotationKey = "cert-manager.io/common-name" + IssuerNameAnnotationKey = "cert-manager.io/issuer-name" + IssuerKindAnnotationKey = "cert-manager.io/issuer-kind" + CertificateNameKey = "cert-manager.io/certificate-name" ) // Annotation names for CertificateRequests const ( - CRPrivateKeyAnnotationKey = "certmanager.k8s.io/private-key-secret-name" + CRPrivateKeyAnnotationKey = "cert-manager.io/private-key-secret-name" ) const ( @@ -42,25 +42,25 @@ const ( // WantInjectAnnotation is the annotation that specifies that a particular // object wants injection of CAs. It takes the form of a reference to a certificate // as namespace/name. The certificate is expected to have the is-serving-for annotations. - WantInjectAnnotation = "certmanager.k8s.io/inject-ca-from" + WantInjectAnnotation = "cert-manager.io/inject-ca-from" // WantInjectAPIServerCAAnnotation, if set to "true", will make the cainjector // inject the CA certificate for the Kubernetes apiserver into the resource. // It discovers the apiserver's CA by inspecting the service account credentials // mounted into the cainjector pod. - WantInjectAPIServerCAAnnotation = "certmanager.k8s.io/inject-apiserver-ca" + WantInjectAPIServerCAAnnotation = "cert-manager.io/inject-apiserver-ca" // WantInjectFromSecretAnnotation is the annotation that specifies that a particular // object wants injection of CAs. It takes the form of a reference to a Secret // as namespace/name. - WantInjectFromSecretAnnotation = "certmanager.k8s.io/inject-ca-from-secret" + WantInjectFromSecretAnnotation = "cert-manager.io/inject-ca-from-secret" // AllowsInjectionFromSecretAnnotation is an annotation that must be added // to Secret resource that want to denote that they can be directly // injected into injectables that have a `inject-ca-from-secret` annotation. // If an injectable references a Secret that does NOT have this annotation, // the cainjector will refuse to inject the secret. - AllowsInjectionFromSecretAnnotation = "certmanager.k8s.io/allow-direct-injection" + AllowsInjectionFromSecretAnnotation = "cert-manager.io/allow-direct-injection" ) // KeyUsage specifies valid usage contexts for keys. diff --git a/pkg/internal/apis/certmanager/types_certificaterequest.go b/pkg/internal/apis/certmanager/types_certificaterequest.go index ad70bdb53..793cad97d 100644 --- a/pkg/internal/apis/certmanager/types_certificaterequest.go +++ b/pkg/internal/apis/certmanager/types_certificaterequest.go @@ -61,7 +61,7 @@ type CertificateRequestSpec struct { // 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. The group field refers to the API group of the - // issuer which defaults to 'certmanager.k8s.io' if empty. + // issuer which defaults to 'cert-manager.io' if empty. IssuerRef cmmeta.ObjectReference `json:"issuerRef"` // Byte slice containing the PEM encoded CertificateSigningRequest diff --git a/pkg/internal/apis/certmanager/v1alpha2/doc.go b/pkg/internal/apis/certmanager/v1alpha2/doc.go index bc383e21c..eb3032a21 100644 --- a/pkg/internal/apis/certmanager/v1alpha2/doc.go +++ b/pkg/internal/apis/certmanager/v1alpha2/doc.go @@ -19,5 +19,5 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen-input=../../../../apis/certmanager/v1alpha2 -// +groupName=certmanager.k8s.io +// +groupName=cert-manager.io package v1alpha2