Skip to content

Commit d5ebd19

Browse files
authored
CM-706: Revisits istiocsr API for GA release (#310)
* CM-706: Revisits istiocsr API for GA release Signed-off-by: Bharath B <[email protected]> * CM-706: incorporate AI code review suggestions Signed-off-by: Bharath B <[email protected]> * CM-706: Removes unused API fields --------- Signed-off-by: Bharath B <[email protected]>
1 parent 3628e51 commit d5ebd19

26 files changed

+674
-296
lines changed

api/operator/v1alpha1/features.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
)
66

77
var (
8-
// TechPreview: v1.15
9-
//
108
// IstioCSR enables the controller for istiocsr.operator.openshift.io resource,
119
// which extends cert-manager-operator to deploy and manage the istio-csr agent.
1210
// OpenShift Service Mesh facilitates the integration and istio-csr is an agent that
@@ -18,5 +16,5 @@ var (
1816
)
1917

2018
var OperatorFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
21-
FeatureIstioCSR: {Default: false, PreRelease: "TechPreview"},
19+
FeatureIstioCSR: {Default: true, PreRelease: featuregate.GA},
2220
}

api/operator/v1alpha1/istiocsr_types.go

Lines changed: 117 additions & 76 deletions
Large diffs are not rendered by default.

api/operator/v1alpha1/meta.go

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package v1alpha1
2+
3+
import (
4+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5+
)
6+
7+
// Mode indicates the operational state of the optional features.
8+
type Mode string
9+
10+
const (
11+
// Enabled indicates the optional configuration is enabled.
12+
Enabled Mode = "Enabled"
13+
14+
// Disabled indicates the optional configuration is disabled.
15+
Disabled Mode = "Disabled"
16+
)
17+
18+
// ConfigMapReference holds the details of a configmap.
19+
type ConfigMapReference struct {
20+
// name of the ConfigMap.
21+
// +kubebuilder:validation:MinLength:=1
22+
// +kubebuilder:validation:MaxLength:=253
23+
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="name must consist of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted."
24+
// +kubebuilder:validation:Required
25+
// +required
26+
Name string `json:"name"`
27+
28+
// namespace in which the ConfigMap exists. If empty, ConfigMap will be looked up in IstioCSR created namespace.
29+
// +kubebuilder:validation:MinLength:=0
30+
// +kubebuilder:validation:MaxLength:=63
31+
// +kubebuilder:validation:XValidation:rule=`size(self) == 0 || !format.dns1123Label().validate(self).hasValue()`,message="namespace must consist of only lowercase alphanumeric characters and hyphens, and must start with an alphabetic character and end with an alphanumeric character."
32+
// +kubebuilder:validation:Optional
33+
// +optional
34+
Namespace string `json:"namespace,omitempty"`
35+
36+
// key name holding the required data.
37+
// +kubebuilder:validation:MinLength:=1
38+
// +kubebuilder:validation:MaxLength:=253
39+
// +kubebuilder:validation:Pattern:=^[-._a-zA-Z0-9]+$
40+
// +kubebuilder:validation:Required
41+
// +required
42+
Key string `json:"key"`
43+
}
44+
45+
type ConditionalStatus struct {
46+
// conditions holds information about the current state of the istio-csr agent deployment.
47+
// +patchMergeKey=type
48+
// +patchStrategy=merge
49+
// +listType=map
50+
// +listMapKey=type
51+
Conditions []metav1.Condition `json:"conditions,omitempty"`
52+
}

api/operator/v1alpha1/zz_generated.deepcopy.go

Lines changed: 24 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/manifests/cert-manager-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ metadata:
211211
"kind": "IstioCSR",
212212
"metadata": {
213213
"annotations": {
214-
"kubernetes.io/description": "Creating this resource requires the istio-csr tech-preview feature to be enabled, which otherwise has no effect. Please refer to the cert-manager documentation for more information on enabling the istio-csr feature. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process"
214+
"kubernetes.io/description": "Resource behavior is managed through IstioCSR featuregate, which is enabled by default. Please refer to the cert-manager documentation for more information on the istio-csr feature."
215215
},
216216
"name": "default",
217217
"namespace": "istio-csr"

0 commit comments

Comments
 (0)