Skip to content

Commit

Permalink
Allow changing the size or requested memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
camilb committed Dec 29, 2017
1 parent ac4aae4 commit 45f9005
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions deploy
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PROMETHEUS_DEFAULT_VERSION=v2.0.0
PROMETHEUS_OPERATOR_DEFAULT_VERSION=v0.15.0
PROMETHEUS_STORAGE_DEFAULT_RETENTION=168h
PROMETHEUS_STORAGE_DEFAULT_VOLUME_SIZE=40Gi
PROMETHEUS_DEFAULT_MEMORY_REQUEST=1Gi
ALERTMANAGER_DEFAULT_VERSION=v0.12.0
NODE_EXPORTER_DEFAULT_VERSION=v0.15.2
KUBE_STATE_METRICS_DEFAULT_VERSION=v1.1.0
Expand Down Expand Up @@ -118,6 +119,11 @@ echo
read -p "Enter Prometheus storage volume size [$PROMETHEUS_STORAGE_DEFAULT_VOLUME_SIZE]: " PROMETHEUS_STORAGE_VOLUME_SIZE
PROMETHEUS_STORAGE_VOLUME_SIZE=${PROMETHEUS_STORAGE_VOLUME_SIZE:-$PROMETHEUS_STORAGE_DEFAULT_VOLUME_SIZE}

#Prometheus Memory Request
echo
read -p "Enter Prometheus memory request in Gi or Mi [$PROMETHEUS_DEFAULT_MEMORY_REQUEST]: " PROMETHEUS_MEMORY_REQUEST
PROMETHEUS_MEMORY_REQUEST=${PROMETHEUS_MEMORY_REQUEST:-$PROMETHEUS_DEFAULT_MEMORY_REQUEST}

#Grafana
echo
read -p "Enter Grafana version [$GRAFANA_DEFAULT_VERSION]: " GRAFANA_VERSION
Expand Down Expand Up @@ -160,6 +166,9 @@ sed -i -e 's/PROMETHEUS_STORAGE_RETENTION/'"$PROMETHEUS_STORAGE_RETENTION"'/g' m
#set prometheus storage volume size
sed -i -e 's/PROMETHEUS_STORAGE_VOLUME_SIZE/'"$PROMETHEUS_STORAGE_VOLUME_SIZE"'/g' manifests/prometheus/prometheus-k8s.yaml

#set prometheus memory request
sed -i -e 's/PROMETHEUS_MEMORY_REQUEST/'"$PROMETHEUS_MEMORY_REQUEST"'/g' manifests/prometheus/prometheus-k8s.yaml

#set grafana version
sed -i -e 's/GRAFANA_VERSION/'"$GRAFANA_VERSION"'/g' manifests/grafana/grafana.de.yaml

Expand Down
2 changes: 1 addition & 1 deletion manifests/prometheus/prometheus-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
requests:
storage: PROMETHEUS_STORAGE_VOLUME_SIZE
requests:
memory: 2Gi
memory: PROMETHEUS_MEMORY_REQUEST
alerting:
alertmanagers:
- namespace: monitoring
Expand Down

0 comments on commit 45f9005

Please sign in to comment.