[hotfix] Move prometheus to manual 2 (!105)
Co-authored-by: denis.patrakeev <denis.patrakeev@avroid.tech> Reviewed-on: https://git.avroid.tech/K8s/k8s-configs/pulls/105
This commit is contained in:
@@ -32,10 +32,10 @@ kubectl -n cloud-prod apply -f prometheus-network-policy.yaml
|
||||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||
helm repo update
|
||||
|
||||
helm install -n prometheus prometheus-community/prometheus -f values-override.yaml \
|
||||
--set serverFiles.prometheus.yml.scrape_configs[1].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus.yml.scrape_configs[2].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus.yml.scrape_configs[3].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE
|
||||
helm install -n cloud-prod prometheus prometheus-community/prometheus -f values-override.yaml \
|
||||
--set serverFiles.prometheus\\.yml.scrape_configs[1].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus\\.yml.scrape_configs[2].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus\\.yml.scrape_configs[3].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE
|
||||
```
|
||||
|
||||
## Upgrade/Changes
|
||||
@@ -55,8 +55,8 @@ source .creds
|
||||
|
||||
Затем применяем:
|
||||
```bash
|
||||
helm upgrade -n prometheus prometheus-community/prometheus -f values-override.yaml \
|
||||
--set serverFiles.prometheus.yml.scrape_configs[1].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus.yml.scrape_configs[2].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus.yml.scrape_configs[3].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE
|
||||
helm upgrade -n cloud-prod prometheus prometheus-community/prometheus -f values-override.yaml \
|
||||
--set serverFiles.prometheus\\.yml.scrape_configs[1].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus\\.yml.scrape_configs[2].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE \
|
||||
--set serverFiles.prometheus\\.yml.scrape_configs[3].consul_sd_configs[0].authorization.credentials=$PROMETHEUS_CONSUL_TOKEN_VALUE
|
||||
```
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
name: cloud-prometheus-in
|
||||
namespace: cloud-prod
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
app.kubernetes.io/managed-by: manually
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
@@ -24,7 +24,7 @@ metadata:
|
||||
name: cloud-prometheus-out
|
||||
namespace: cloud-prod
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
app.kubernetes.io/managed-by: manually
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
@@ -38,6 +38,8 @@ spec:
|
||||
protocol: TCP
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
- port: 8008
|
||||
protocol: TCP
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
@@ -45,4 +47,4 @@ spec:
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: prometheus-postgres-exporter
|
||||
app: prometheus-postgres-exporter
|
||||
|
||||
@@ -44,15 +44,6 @@ server:
|
||||
## Maybe same with Ingress host name
|
||||
baseURL: "cloud-k8s-prometheus.avroid.tech"
|
||||
|
||||
## Additional Prometheus server Secret mounts
|
||||
# Defines additional mounts with secrets. Secrets must be manually created in the namespace.
|
||||
extraSecretMounts:
|
||||
- name: consul-secret
|
||||
mountPath: /etc/secrets
|
||||
subPath: ""
|
||||
secretName: prometheus-secret
|
||||
readOnly: true
|
||||
|
||||
ingress:
|
||||
## If true, Prometheus server Ingress will be created
|
||||
##
|
||||
@@ -99,6 +90,27 @@ server:
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## Prometheus server readiness and liveness probe initial delay and timeout
|
||||
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
|
||||
##
|
||||
tcpSocketProbeEnabled: true
|
||||
probeScheme: HTTP
|
||||
readinessProbeInitialDelay: 30
|
||||
readinessProbePeriodSeconds: 5
|
||||
readinessProbeTimeout: 4
|
||||
readinessProbeFailureThreshold: 3
|
||||
readinessProbeSuccessThreshold: 1
|
||||
livenessProbeInitialDelay: 30
|
||||
livenessProbePeriodSeconds: 15
|
||||
livenessProbeTimeout: 10
|
||||
livenessProbeFailureThreshold: 3
|
||||
livenessProbeSuccessThreshold: 1
|
||||
startupProbe:
|
||||
enabled: true
|
||||
periodSeconds: 5
|
||||
failureThreshold: 30
|
||||
timeoutSeconds: 10
|
||||
|
||||
## Prometheus server resource requests and limits
|
||||
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user