Skip to content

Commit

Permalink
fix: disable monitoring by default
Browse files Browse the repository at this point in the history
Signed-off-by: Sunil Thaha <sthaha@redhat.com>
  • Loading branch information
sthaha committed Mar 28, 2024
1 parent ff30bfe commit 9598f9c
Show file tree
Hide file tree
Showing 4 changed files with 648 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
local_dev_cluster_version: v0.0.4
env:
# NOTE: prometheus is required since operator installs ServiceMonitor
PROMETHEUS_ENABLE: "true"
PROMETHEUS_ENABLE: "false"

- name: Ensure cluster is able to run OLM bundles
run: make cluster-prereqs
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,16 @@ docs: crdoc manifests ## Generate docs.
##@ Development env
CLUSTER_PROVIDER ?= kind
LOCAL_DEV_CLUSTER_VERSION ?= main
GRAFANA_ENABLE ?= true
GRAFANA_ENABLE ?= false
PROMETHEUS_ENABLE ?= false
KIND_WORKER_NODES ?=2

.PHONY: cluster-up
cluster-up: ## setup a cluster for local development
CLUSTER_PROVIDER=$(CLUSTER_PROVIDER) \
VERSION=$(LOCAL_DEV_CLUSTER_VERSION) \
GRAFANA_ENABLE=$(GRAFANA_ENABLE) \
PROMETHEUS_ENABLE=$(PROMETHEUS_ENABLE) \
KIND_WORKER_NODES=$(KIND_WORKER_NODES) \
./hack/cluster.sh up

Expand All @@ -137,6 +139,7 @@ cluster-restart: ## restart the local development cluster
CLUSTER_PROVIDER=$(CLUSTER_PROVIDER) \
VERSION=$(LOCAL_DEV_CLUSTER_VERSION) \
GRAFANA_ENABLE=$(GRAFANA_ENABLE) \
PROMETHEUS_ENABLE=$(PROMETHEUS_ENABLE) \
KIND_WORKER_NODES=$(KIND_WORKER_NODES) \
./hack/cluster.sh restart

Expand Down
6 changes: 4 additions & 2 deletions hack/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ set -eu -o pipefail
# config
declare -r VERSION=${VERSION:-v0.0.3}
declare -r CLUSTER_PROVIDER=${CLUSTER_PROVIDER:-kind}
declare -r GRAFANA_ENABLE=${GRAFANA_ENABLE:-true}
declare -r GRAFANA_ENABLE=${GRAFANA_ENABLE:-false}
declare -r PROMETHEUS_ENABLE=${PROMETHEUS_ENABLE:-false}
declare -r KIND_WORKER_NODES=${KIND_WORKER_NODES:-2}

# constants
Expand Down Expand Up @@ -63,7 +64,7 @@ git_checkout() {
}

cluster_prereqs() {
info "setting up SCC crd"
info "setting up external CRDs used by the operator"
kubectl apply --force -f "$PROJECT_ROOT/hack/crds"

kubectl get catalogsource && {
Expand Down Expand Up @@ -120,6 +121,7 @@ main() {
git_checkout
export CLUSTER_PROVIDER
export GRAFANA_ENABLE
export PROMETHEUS_ENABLE
export KIND_WORKER_NODES
cd "$DEV_CLUSTER_DIR"
"$DEV_CLUSTER_DIR/main.sh" "$op"
Expand Down
Loading

0 comments on commit 9598f9c

Please sign in to comment.