From f158e1dfac756a4bd140ef0dfbf8036e9fd5de3f Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:36:47 +0200 Subject: [PATCH] cleanup featuregate comments Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- internal/cainjector/feature/features.go | 15 ++++++---- internal/controller/feature/features.go | 37 ++++++++++++++++++++----- internal/webhook/feature/features.go | 22 +++++++++------ 3 files changed, 54 insertions(+), 20 deletions(-) diff --git a/internal/cainjector/feature/features.go b/internal/cainjector/feature/features.go index 951ee7f25..08ba7aea7 100644 --- a/internal/cainjector/feature/features.go +++ b/internal/cainjector/feature/features.go @@ -26,16 +26,21 @@ import ( utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" ) +// see https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-stages + const ( - // FeatureName will enable XYZ feature. - // Fill this section out with additional details about the feature. - // - // Owner (responsible for graduating feature through to GA): @username + /////////////////////////////////////////////////////////////////////// + // Owner: @username // Alpha: vX.Y // Beta: ... + // + // FeatureName will enable XYZ feature. + // Fill this section out with additional details about the feature. // FeatureName featuregate.Feature = "FeatureName" + /////////////////////////////////////////////////////////////////////// - // alpha: v1.12.0 + // Owner: @inteon + // Alpha: v1.12 // // ServerSideApply enables the use of ServerSideApply in all API calls. ServerSideApply featuregate.Feature = "ServerSideApply" diff --git a/internal/controller/feature/features.go b/internal/controller/feature/features.go index 64c69bd34..1613be2ff 100644 --- a/internal/controller/feature/features.go +++ b/internal/controller/feature/features.go @@ -27,49 +27,70 @@ import ( utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" ) +// see https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-stages + const ( - // alpha: v0.7.2 + /////////////////////////////////////////////////////////////////////// + // Owner: @username + // Alpha: vX.Y + // Beta: ... + // + // FeatureName will enable XYZ feature. + // Fill this section out with additional details about the feature. + // FeatureName featuregate.Feature = "FeatureName" + /////////////////////////////////////////////////////////////////////// + + // Owner: N/A + // Alpha: v0.7.2 // // ValidateCAA enables CAA checking when issuing certificates ValidateCAA featuregate.Feature = "ValidateCAA" - // alpha: v1.4.0 + // Owner: N/A + // Alpha: v1.4 // // ExperimentalCertificateSigningRequestControllers enables all CertificateSigningRequest // controllers that sign Kubernetes CertificateSigningRequest resources ExperimentalCertificateSigningRequestControllers featuregate.Feature = "ExperimentalCertificateSigningRequestControllers" - // alpha: v1.5.0 + // Owner: N/A + // Alpha: v1.5 // // ExperimentalGatewayAPISupport enables the gateway-shim controller and adds support for // the Gateway API to the HTTP-01 challenge solver. ExperimentalGatewayAPISupport featuregate.Feature = "ExperimentalGatewayAPISupport" // Owner: @joshvanl - // alpha: v1.7.0 + // Alpha: v1.7 // // AdditionalCertificateOutputFormats enable output additional format AdditionalCertificateOutputFormats featuregate.Feature = "AdditionalCertificateOutputFormats" - // alpha: v1.8.0 + // Owner: @joshvanl + // Alpha: v1.8 // // ServerSideApply enables the use of ServerSideApply in all API calls. ServerSideApply featuregate.Feature = "ServerSideApply" - // Owner (responsible for graduating feature through to GA): @spockz , @irbekrm + // Owner: @spockz , @irbekrm // Alpha: v1.9 + // // LiteralCertificateSubject will enable providing a subject in the Certificate that will be used literally in the CertificateSigningRequest. The subject can be provided via `LiteralSubject` field on `Certificate`'s spec. // This feature gate must be used together with LiteralCertificateSubject webhook feature gate. // See https://github.com/cert-manager/cert-manager/issues/3203 and https://github.com/cert-manager/cert-manager/issues/4424 for context. LiteralCertificateSubject featuregate.Feature = "LiteralCertificateSubject" + // Owner: N/A // Alpha: v1.10 + // // StableCertificateRequestName will enable generation of CertificateRequest resources with a fixed name. The name of the CertificateRequest will be a function of Certificate resource name and its revision // This feature gate will disable auto-generated CertificateRequest name // Github Issue: https://github.com/cert-manager/cert-manager/issues/4956 StableCertificateRequestName featuregate.Feature = "StableCertificateRequestName" + // Owner: @SgtCoDFish // Alpha: v1.11 + // // UseCertificateRequestBasicConstraints will add Basic Constraints section in the Extension Request of the Certificate Signing Request // This feature will add BasicConstraints section with CA field defaulting to false; CA field will be set true if the Certificate resource spec has isCA as true // Github Issue: https://github.com/cert-manager/cert-manager/issues/5539 @@ -77,6 +98,7 @@ const ( // Owner: @irbekrm // Alpha v1.12 + // // SecretsFilteredCaching reduces controller's memory consumption by // filtering which Secrets are cached in full using // `controller.cert-manager.io/fao` label. By default all Certificate @@ -86,8 +108,9 @@ const ( // See https://github.com/cert-manager/cert-manager/blob/master/design/20221205-memory-management.md SecretsFilteredCaching featuregate.Feature = "SecretsFilteredCaching" - // Owner (responsible for graduating feature through to GA): @inteon + // Owner: @inteon // GA: v1.13 + // // DontAllowInsecureCSRUsageDefinition will prevent the webhook from allowing // CertificateRequest's usages to be only defined in the CSR, while leaving // the usages field empty. diff --git a/internal/webhook/feature/features.go b/internal/webhook/feature/features.go index 30aaaf6fd..a4643c7e9 100644 --- a/internal/webhook/feature/features.go +++ b/internal/webhook/feature/features.go @@ -26,30 +26,36 @@ import ( utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature" ) +// see https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-stages + const ( - // FeatureName will enable XYZ feature. - // Fill this section out with additional details about the feature. - // - // Owner (responsible for graduating feature through to GA): @username + /////////////////////////////////////////////////////////////////////// + // Owner: @username // Alpha: vX.Y // Beta: ... - //FeatureName featuregate.Feature = "FeatureName" + // + // FeatureName will enable XYZ feature. + // Fill this section out with additional details about the feature. + // FeatureName featuregate.Feature = "FeatureName" + /////////////////////////////////////////////////////////////////////// // Owner: @joshvanl - // alpha: v1.7.1 + // Alpha: v1.7.1 // // AdditionalCertificateOutputFormats enable output additional format AdditionalCertificateOutputFormats featuregate.Feature = "AdditionalCertificateOutputFormats" - // Owner (responsible for graduating feature through to GA): @spockz , @irbekrm + // Owner: @spockz, @irbekrm // Alpha: v1.9 + // // LiteralCertificateSubject will enable providing a subject in the Certificate that will be used literally in the CertificateSigningRequest. The subject can be provided via `LiteralSubject` field on `Certificate`'s spec. // This feature gate must be used together with LiteralCertificateSubject webhook feature gate. // See https://github.com/cert-manager/cert-manager/issues/3203 and https://github.com/cert-manager/cert-manager/issues/4424 for context. LiteralCertificateSubject featuregate.Feature = "LiteralCertificateSubject" - // Owner (responsible for graduating feature through to GA): @inteon + // Owner: @inteon // GA: v1.13 + // // DontAllowInsecureCSRUsageDefinition will prevent the webhook from allowing // CertificateRequest's usages to be only defined in the CSR, while leaving // the usages field empty.