Skip to content

Commit

Permalink
add interval in scrpits and fix bug in namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoYang0000 committed Dec 26, 2024
1 parent 4cd1754 commit 593441a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -654,13 +654,19 @@ deploy-prometheus:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install $(DEPLOY_WAIT) -n $(PROMETHEUS_NAMESPACE) --create-namespace $(PROMETHEUS_HELM_NAME) $(PROMETHEUS_CHART) --values helm-charts/prometheus/values.yaml $(PROMETHEUS_HELM_OVERRIDES)
scripts/deploy-prometheus.sh -n $(PROMETHEUS_NAMESPACE) -l $(PROMETHEUS_HELM_NAME) -i $(PROMETHEUS_INTERVAL) -a deploy -u $(DB_USER) -p '$(DB_PASSWORD)' -d $(VDB_NAME)

.PHONY: undeploy-prometheus
undeploy-prometheus:
scripts/deploy-prometheus.sh -n $(PROMETHEUS_NAMESPACE) -l $(PROMETHEUS_HELM_NAME) -i $(PROMETHEUS_INTERVAL) -a undeploy -u $(DB_USER) -p '$(DB_PASSWORD)' -d $(VDB_NAME)
helm uninstall $(PROMETHEUS_HELM_NAME)

.PHONY: deploy-prometheus-service-monitor
deploy-prometheus-service-monitor:
scripts/deploy-prometheus.sh -n $(PROMETHEUS_NAMESPACE) -l $(PROMETHEUS_HELM_NAME) -i $(PROMETHEUS_INTERVAL) -a deploy -u $(DB_USER) -p '$(DB_PASSWORD)' -d $(VDB_NAME)

.PHONY: undeploy-prometheus-service-monitor
undeploy-prometheus-service-monitor:
scripts/deploy-prometheus.sh -n $(PROMETHEUS_NAMESPACE) -l $(PROMETHEUS_HELM_NAME) -i $(PROMETHEUS_INTERVAL) -a undeploy -u $(DB_USER) -p '$(DB_PASSWORD)' -d $(VDB_NAME)

.PHONY: undeploy-operator
undeploy-operator: ## Undeploy operator that was previously deployed
scripts/undeploy.sh $(if $(filter false,$(ignore-not-found)),,-i)
Expand Down
4 changes: 3 additions & 1 deletion scripts/deploy-prometheus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function usage() {
exit 1
}

while getopts "n:l:a:u:p:d:h" opt
while getopts "n:l:a:u:p:d:i:h" opt
do
case $opt in
n)
Expand Down Expand Up @@ -103,6 +103,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: k8s-vertica-prometheus-$DBNAME
namespace: $NAMESPACE
labels:
release: $LABEL
spec:
Expand Down Expand Up @@ -137,6 +138,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: k8s-vertica-prometheus-$DBNAME
namespace: $NAMESPACE
labels:
release: $LABEL
spec:
Expand Down

0 comments on commit 593441a

Please sign in to comment.