Skip to content

Commit

Permalink
Fix lint issues and add annotation in the ClusterServiceVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
bmangoen committed Mar 15, 2023
1 parent 36eb17e commit 4240d75
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build/generate-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if [[ ${COMMUNITY} == "true" ]]; then
OLM_FEATURES="[]"
ARCHITECTURE_LABELS=$(generateArchitectureLabels amd64)
OLM_SUBSCRIPTION_ANNOTATION=""
OLM_CLUSTER_MONITORING=""
else
BUILD_TYPE="servicemesh"
JAEGER_STORAGE="Memory"
Expand All @@ -37,6 +38,7 @@ else
OLM_FEATURES="[\"Disconnected\"]"
ARCHITECTURE_LABELS=$(generateArchitectureLabels amd64 s390x ppc64le)
OLM_SUBSCRIPTION_ANNOTATION="operators.openshift.io/valid-subscription: '[\"OpenShift Container Platform\", \"OpenShift Platform Plus\"]'"
OLM_CLUSTER_MONITORING="operatorframework.io/cluster-monitoring: \"true\""
fi
: "${DEPLOYMENT_FILE:=deploy/${BUILD_TYPE}-operator.yaml}"
: "${MANIFESTS_DIR:=manifests-${BUILD_TYPE}}"
Expand Down Expand Up @@ -115,6 +117,7 @@ $RELATED_IMAGES"
sed -i -e 's+__BUG_URL__+'"$BUG_URL"'+' "${csv_path}"
sed -i -e 's+__OLM_FEATURES__+'"$OLM_FEATURES"'+' "${csv_path}"
sed -i -e 's+__OLM_SUBSCRIPTION_ANNOTATION__+'"$OLM_SUBSCRIPTION_ANNOTATION"'+' "${csv_path}"
sed -i -e 's+__OLM_CLUSTER_MONITORING__+'"$OLM_CLUSTER_MONITORING"'+' "${csv_path}"
sed -i -e 's/__JAEGER_STORAGE__/'${JAEGER_STORAGE}'/' "${csv_path}"
sed -i -e 's/__DATE__/'"$(date +%Y-%m-%dT%H:%M:%S%Z)"'/g' "${csv_path}"
sed -i -e 's+__IMAGE_SRC__+'"${IMAGE_SRC}"'+g' "${csv_path}"
Expand Down
1 change: 1 addition & 0 deletions build/manifest-templates/clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ metadata:
createdAt: __DATE__
support: Red Hat, Inc.
olm.skipRange: ">=1.0.2 <__SEMANTIC_VERSION__"
__OLM_CLUSTER_MONITORING__
operators.openshift.io/infrastructure-features: '__OLM_FEATURES__'
__OLM_SUBSCRIPTION_ANNOTATION__
alm-examples: |-
Expand Down
1 change: 1 addition & 0 deletions deploy/maistra-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10377,6 +10377,7 @@ rules:
- monitoring.coreos.com
resources:
- servicemonitors
- prometheusrules
verbs:
- get
- create
Expand Down
1 change: 1 addition & 0 deletions deploy/servicemesh-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10377,6 +10377,7 @@ rules:
- monitoring.coreos.com
resources:
- servicemonitors
- prometheusrules
verbs:
- get
- create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ metadata:
createdAt: 2022-12-19T14:03:48EST
support: Red Hat, Inc.
olm.skipRange: ">=1.0.2 <2.4.0-0"
operatorframework.io/cluster-monitoring: "true"

operators.openshift.io/infrastructure-features: '[]'

alm-examples: |-
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/servicemesh/webhooks/hacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ func createWebhookResources(ctx context.Context, mgr manager.Manager, log logr.L
"maistra-operator-prometheusrule",
"sum without (smcp_namespace) (servicemesh_member_count)",
"cluster:servicemesh_member_count:sum"), metav1.CreateOptions{}); err != nil {

if errors.IsAlreadyExists(err) {
log.Info("Maistra Operator webhook PrometheusRule already exists")
} else {
Expand Down

0 comments on commit 4240d75

Please sign in to comment.