cert-manager: Add option to set feature gates

This commit is contained in:
Ciprian Hacman 2024-05-05 07:34:10 +03:00
parent 7851837b4a
commit 28bc42e6a1
10 changed files with 43 additions and 0 deletions

View File

@ -302,6 +302,12 @@ spec:
Enabled enables the cert manager.
Default: false
type: boolean
featureGates:
additionalProperties:
type: boolean
description: FeatureGates is a list of experimental features that
can be enabled or disabled.
type: object
hostedZoneIDs:
description: HostedZoneIDs is a list of route53 hostedzone IDs
that cert-manager will be allowed to do dns-01 validation for

View File

@ -1142,6 +1142,9 @@ type CertManagerConfig struct {
// HostedZoneIDs is a list of route53 hostedzone IDs that cert-manager will be allowed to do dns-01 validation for
HostedZoneIDs []string `json:"hostedZoneIDs,omitempty"`
// FeatureGates is a list of experimental features that can be enabled or disabled.
FeatureGates map[string]bool `json:"featureGates,omitempty"`
}
// LoadBalancerControllerSpec determines the AWS LB controller configuration.

View File

@ -1205,6 +1205,9 @@ type CertManagerConfig struct {
// HostedZoneIDs is a list of route53 hostedzone IDs that cert-manager will be allowed to do dns-01 validation for
HostedZoneIDs []string `json:"hostedZoneIDs,omitempty"`
// FeatureGates is a list of experimental features that can be enabled or disabled.
FeatureGates map[string]bool `json:"featureGates,omitempty"`
}
// LoadBalancerControllerSpec determines the AWS LB controller configuration.

View File

@ -1904,6 +1904,7 @@ func autoConvert_v1alpha2_CertManagerConfig_To_kops_CertManagerConfig(in *CertMa
out.DefaultIssuer = in.DefaultIssuer
out.Nameservers = in.Nameservers
out.HostedZoneIDs = in.HostedZoneIDs
out.FeatureGates = in.FeatureGates
return nil
}
@ -1919,6 +1920,7 @@ func autoConvert_kops_CertManagerConfig_To_v1alpha2_CertManagerConfig(in *kops.C
out.DefaultIssuer = in.DefaultIssuer
out.Nameservers = in.Nameservers
out.HostedZoneIDs = in.HostedZoneIDs
out.FeatureGates = in.FeatureGates
return nil
}

View File

@ -507,6 +507,13 @@ func (in *CertManagerConfig) DeepCopyInto(out *CertManagerConfig) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.FeatureGates != nil {
in, out := &in.FeatureGates, &out.FeatureGates
*out = make(map[string]bool, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}

View File

@ -1134,6 +1134,9 @@ type CertManagerConfig struct {
// HostedZoneIDs is a list of route53 hostedzone IDs that cert-manager will be allowed to do dns-01 validation for
HostedZoneIDs []string `json:"hostedZoneIDs,omitempty"`
// FeatureGates is a list of experimental features that can be enabled or disabled.
FeatureGates map[string]bool `json:"featureGates,omitempty"`
}
// LoadBalancerControllerSpec determines the AWS LB controller configuration.

View File

@ -2086,6 +2086,7 @@ func autoConvert_v1alpha3_CertManagerConfig_To_kops_CertManagerConfig(in *CertMa
out.DefaultIssuer = in.DefaultIssuer
out.Nameservers = in.Nameservers
out.HostedZoneIDs = in.HostedZoneIDs
out.FeatureGates = in.FeatureGates
return nil
}
@ -2101,6 +2102,7 @@ func autoConvert_kops_CertManagerConfig_To_v1alpha3_CertManagerConfig(in *kops.C
out.DefaultIssuer = in.DefaultIssuer
out.Nameservers = in.Nameservers
out.HostedZoneIDs = in.HostedZoneIDs
out.FeatureGates = in.FeatureGates
return nil
}

View File

@ -568,6 +568,13 @@ func (in *CertManagerConfig) DeepCopyInto(out *CertManagerConfig) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.FeatureGates != nil {
in, out := &in.FeatureGates, &out.FeatureGates
*out = make(map[string]bool, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}

View File

@ -567,6 +567,13 @@ func (in *CertManagerConfig) DeepCopyInto(out *CertManagerConfig) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.FeatureGates != nil {
in, out := &in.FeatureGates, &out.FeatureGates
*out = make(map[string]bool, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}

View File

@ -5440,6 +5440,9 @@ spec:
- --default-issuer-kind=ClusterIssuer
- --default-issuer-group=cert-manager.io
{{ end }}
{{ range $key, $value := .CertManager.FeatureGates }}
- --feature-gates={{ $key }}={{ $value }}
{{ end }}
ports:
- containerPort: 9402
name: http-metrics