Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 1becc59

Browse files
committed
Apply CSV best practices
* added annotation that indicates that the operator can be deployed in disconnected environments * specified minimal supported kube version * added containerImage annotation * maturity set to 'candidate' * explicit service account dropped from bundle * common label renamed to service-binding-controller-manager Signed-off-by: Predrag Knezevic <[email protected]>
1 parent 252987b commit 1becc59

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,12 @@ vet:
157157

158158
.PHONY: bundle
159159
# Generate bundle manifests and metadata, then validate generated files.
160-
bundle: manifests kustomize push-image
160+
bundle: manifests kustomize yq push-image
161161
# operator-sdk generate kustomize manifests -q
162162
cd config/manager && $(KUSTOMIZE) edit set image controller=$(OPERATOR_REPO_REF)@$(OPERATOR_IMAGE_SHA_REF)
163163
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
164+
$(YQ) e -i '.metadata.annotations.containerImage="$(OPERATOR_REPO_REF)@$(OPERATOR_IMAGE_SHA_REF)"' bundle/manifests/service-binding-operator.clusterserviceversion.yaml
165+
rm bundle/manifests/service-binding-operator_v1_serviceaccount.yaml
164166
operator-sdk bundle validate ./bundle --select-optional name=operatorhub
165167

166168
.PHONY: setup-venv

config/manager/manager.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: Namespace
33
metadata:
44
labels:
5-
control-plane: controller-manager
5+
control-plane: service-binding-controller-manager
66
name: system
77
---
88
apiVersion: apps/v1
@@ -11,16 +11,16 @@ metadata:
1111
name: operator
1212
namespace: system
1313
labels:
14-
control-plane: controller-manager
14+
control-plane: service-binding-controller-manager
1515
spec:
1616
selector:
1717
matchLabels:
18-
control-plane: controller-manager
18+
control-plane: service-binding-controller-manager
1919
replicas: 1
2020
template:
2121
metadata:
2222
labels:
23-
control-plane: controller-manager
23+
control-plane: service-binding-controller-manager
2424
spec:
2525
serviceAccountName: operator
2626
containers:

config/manifests/bases/service-binding-operator.clusterserviceversion.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ metadata:
99
and operator backed services
1010
repository: https://github.com/redhat-developer/service-binding-operator
1111
support: Service Binding Operator Community
12+
containerImage: ""
13+
operators.openshift.io/infrastructure-features: '["disconnected"]'
1214
name: service-binding-operator.v0.0.0
1315
namespace: placeholder
1416
spec:
@@ -63,7 +65,8 @@ spec:
6365
maintainers:
6466
6567
name: Openshift Application Services
66-
maturity: alpha
68+
maturity: candidate
69+
minKubeVersion: 1.16.0
6770
provider:
6871
name: Red Hat
6972
url: redhat.com

config/prometheus/monitor.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1
44
kind: ServiceMonitor
55
metadata:
66
labels:
7-
control-plane: controller-manager
7+
control-plane: service-binding-controller-manager
88
name: controller-manager-metrics-monitor
99
namespace: system
1010
spec:
@@ -13,4 +13,4 @@ spec:
1313
port: https
1414
selector:
1515
matchLabels:
16-
control-plane: controller-manager
16+
control-plane: service-binding-controller-manager

config/rbac/auth_proxy_service.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
labels:
5-
control-plane: controller-manager
5+
control-plane: service-binding-controller-manager
66
name: controller-manager-metrics-service
77
namespace: system
88
spec:
@@ -11,4 +11,4 @@ spec:
1111
port: 8443
1212
targetPort: https
1313
selector:
14-
control-plane: controller-manager
14+
control-plane: service-binding-controller-manager

config/webhook/service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ spec:
99
- port: 443
1010
targetPort: 9443
1111
selector:
12-
control-plane: controller-manager
12+
control-plane: service-binding-controller-manager

0 commit comments

Comments
 (0)