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

Commit

Permalink
Apply CSV best practices (#1020)
Browse files Browse the repository at this point in the history
* 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 <pknezevi@redhat.com>
  • Loading branch information
pedjak authored Sep 13, 2021
1 parent 07c0269 commit d272438
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ vet:

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

.PHONY: setup-venv
Expand Down
8 changes: 4 additions & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
control-plane: service-binding-controller-manager
name: system
---
apiVersion: apps/v1
Expand All @@ -11,16 +11,16 @@ metadata:
name: operator
namespace: system
labels:
control-plane: controller-manager
control-plane: service-binding-controller-manager
spec:
selector:
matchLabels:
control-plane: controller-manager
control-plane: service-binding-controller-manager
replicas: 1
template:
metadata:
labels:
control-plane: controller-manager
control-plane: service-binding-controller-manager
spec:
serviceAccountName: operator
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ metadata:
and operator backed services
repository: https://github.com/redhat-developer/service-binding-operator
support: Service Binding Operator Community
containerImage: ""
operators.openshift.io/infrastructure-features: '["disconnected"]'
name: service-binding-operator.v0.0.0
namespace: placeholder
spec:
Expand Down Expand Up @@ -63,7 +65,8 @@ spec:
maintainers:
- email: service-binding-support@redhat.com
name: Openshift Application Services
maturity: alpha
maturity: candidate
minKubeVersion: 1.16.0
provider:
name: Red Hat
url: redhat.com
Expand Down
4 changes: 2 additions & 2 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
control-plane: service-binding-controller-manager
name: controller-manager-metrics-monitor
namespace: system
spec:
Expand All @@ -13,4 +13,4 @@ spec:
port: https
selector:
matchLabels:
control-plane: controller-manager
control-plane: service-binding-controller-manager
4 changes: 2 additions & 2 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
control-plane: service-binding-controller-manager
name: controller-manager-metrics-service
namespace: system
spec:
Expand All @@ -11,4 +11,4 @@ spec:
port: 8443
targetPort: https
selector:
control-plane: controller-manager
control-plane: service-binding-controller-manager
2 changes: 1 addition & 1 deletion config/webhook/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ spec:
- port: 443
targetPort: 9443
selector:
control-plane: controller-manager
control-plane: service-binding-controller-manager

0 comments on commit d272438

Please sign in to comment.