Unverified Commit ca7b0eb7 by Craig Jellick Committed by GitHub

Merge pull request #16 from thxCode/issue_18166

Refactor & fix some issue for Monitoring
parents c80dba3d 16e0cadb
...@@ -75,7 +75,3 @@ spec: ...@@ -75,7 +75,3 @@ spec:
tolerations: tolerations:
{{ toYaml .Values.tolerations | indent 4 }} {{ toYaml .Values.tolerations | indent 4 }}
{{- end }} {{- end }}
{{- if .Values.sidecarsSpec }}
containers:
{{ toYaml .Values.sidecarsSpec | indent 4 }}
{{- end }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "app.nginx.fullname" . }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: nginx
data:
nginx.conf: |-
user nginx;
worker_processes auto;
error_log /dev/null warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
log_format main '[$time_local - $status] $remote_addr - $remote_user $request ($http_referer)';
proxy_connect_timeout 10;
proxy_read_timeout 180;
proxy_send_timeout 5;
proxy_buffer_size 16k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_temp_path /tmp/temp_dir;
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=my_zone:100m inactive=1d max_size=10g;
server {
listen 80;
access_log off;
gzip on;
gzip_min_length 1k;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
proxy_set_header Host $host;
location / {
proxy_cache my_zone;
proxy_cache_valid 200 302 1d;
proxy_cache_valid 301 30d;
proxy_cache_valid any 5m;
proxy_cache_bypass $http_cache_control;
add_header X-Proxy-Cache $upstream_cache_status;
add_header Cache-Control "public";
proxy_pass http://alertmanager-operated:9093/;
if ($request_filename ~ .*\.(?:js|css|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$) {
expires 90d;
}
}
}
}
apiVersion: {{ template "deployment_api_version" . }}
kind: Deployment
metadata:
name: {{ template "app.nginx.fullname" . }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: nginx
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
release: {{ .Release.Name }}
component: nginx
template:
metadata:
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
release: {{ .Release.Name }}
component: nginx
spec:
{{- if .Values.enabledRBAC }}
serviceAccountName: {{ default (include "app.fullname" .) .Values.serviceAccountName }}
{{- end }}
containers:
- name: alertmanager-proxy
image: {{ template "system_default_registry" . }}{{ .Values.image.proxy.repository }}:{{ .Values.image.proxy.tag }}
args:
- nginx
- -g
- daemon off;
- -c
- /nginx/nginx.conf
volumeMounts:
- mountPath: /nginx/
name: alertmanager-nginx
{{- if and .Values.resources .Values.resources.proxy }}
resources:
{{ toYaml .Values.resources.proxy | indent 10 }}
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
nodeSelector:
beta.kubernetes.io/os: linux
{{- range .Values.nodeSelectors }}
{{- $pair := regexSplit "=" . 2 }}
{{- if eq 2 (len $pair) }}
{{ (index $pair 0) }}: {{ (index $pair 1) }}
{{- else }}
{{ (index $pair 0) }}: ""
{{- end }}
{{- end }}
volumes:
- name: alertmanager-nginx
configMap:
defaultMode: 438
items:
- key: nginx.conf
mode: 438
path: nginx.conf
name: {{ template "app.nginx.fullname" . }}
...@@ -14,8 +14,7 @@ spec: ...@@ -14,8 +14,7 @@ spec:
app: {{ template "app.name" . }} app: {{ template "app.name" . }}
chart: {{ template "app.version" . }} chart: {{ template "app.version" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
component: nginx
ports: ports:
- name: http - name: http
port: 80 port: 80
targetPort: http targetPort: web
...@@ -66,7 +66,3 @@ storageSpec: {} ...@@ -66,7 +66,3 @@ storageSpec: {}
# requests: # requests:
# storage: 50Gi # storage: 50Gi
# selector: {} # selector: {}
sidecarsSpec: []
# - name: sidecar
# image: registry/name:tag
...@@ -29,7 +29,7 @@ spec: ...@@ -29,7 +29,7 @@ spec:
{{ toYaml .Values.resources.inits | indent 10 }} {{ toYaml .Values.resources.inits | indent 10 }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
- name: grafana-static-hooks - name: grafana-nginx
mountPath: /run.sh mountPath: /run.sh
subPath: copy-datasource-plugin-json.sh subPath: copy-datasource-plugin-json.sh
- name: grafana-static-contents - name: grafana-static-contents
...@@ -37,14 +37,14 @@ spec: ...@@ -37,14 +37,14 @@ spec:
- name: grafana-init-plugin-json-modify - name: grafana-init-plugin-json-modify
image: {{ template "system_default_registry" . }}{{ .Values.image.tool.repository }}:{{ .Values.image.tool.tag }} image: {{ template "system_default_registry" . }}{{ .Values.image.tool.repository }}:{{ .Values.image.tool.tag }}
command: command:
- /usr/bin/modify-datasource-plugin-json.sh - /run.sh
{{- if and .Values.resources .Values.resources.inits }} {{- if and .Values.resources .Values.resources.inits }}
resources: resources:
{{ toYaml .Values.resources.inits | indent 10 }} {{ toYaml .Values.resources.inits | indent 10 }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
- name: grafana-static-hooks - name: grafana-nginx
mountPath: /usr/bin/modify-datasource-plugin-json.sh mountPath: /run.sh
subPath: modify-datasource-plugin-json.sh subPath: modify-datasource-plugin-json.sh
- name: grafana-static-contents - name: grafana-static-contents
mountPath: /host mountPath: /host
...@@ -128,10 +128,6 @@ spec: ...@@ -128,10 +128,6 @@ spec:
securityContext: securityContext:
fsGroup: 472 fsGroup: 472
volumes: volumes:
- name: grafana-static-hooks
configMap:
name: {{ template "app.hooks.fullname" . }}
defaultMode: 0777
- name: grafana-static-contents - name: grafana-static-contents
emptyDir: {} emptyDir: {}
- name: grafana-storage - name: grafana-storage
...@@ -143,12 +139,17 @@ spec: ...@@ -143,12 +139,17 @@ spec:
{{- end }} {{- end }}
- name: grafana-nginx - name: grafana-nginx
configMap: configMap:
defaultMode: 438 name: {{ template "app.nginx.fullname" . }}
items: items:
- key: nginx.conf - key: nginx.conf
mode: 438 mode: 438
path: nginx.conf path: nginx.conf
name: {{ template "app.nginx.fullname" . }} - key: copy-datasource-plugin-json.sh
mode: 0777
path: copy-datasource-plugin-json.sh
- key: modify-datasource-plugin-json.sh
mode: 0777
path: modify-datasource-plugin-json.sh
- name: grafana-dashboards - name: grafana-dashboards
configMap: configMap:
name: {{ template "app.dashboards.fullname" . }} name: {{ template "app.dashboards.fullname" . }}
......
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "app.hooks.fullname" . }}
data:
copy-datasource-plugin-json.sh: |-
#!/bin/bash
srcpath="/usr/share/grafana/public/app/plugins/datasource/prometheus/plugin.json"
dstpath="/host/grafana/raw-plugin.json"
if [[ -f $srcpath ]] && [[ -d /host ]]; then
mkdir -p /host/grafana
cp -f $srcpath $dstpath
exit 0
fi
exit 1
modify-datasource-plugin-json.sh: |-
#!/bin/sh
srcpath="/host/grafana/raw-plugin.json"
dstpath="/host/grafana/plugin.json"
if [ -f $srcpath ] && [ -d /host ]; then
mkdir -p /host/grafana
token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
cat $srcpath | K8S_BEARERTOKEN="Bearer $token" jq 'to_entries | . + [{"key":"routes","value":[{"path":"api/v1","url":"{{ .Values.prometheusDatasourceURL }}/api/v1","headers":[{"name":"Authorization","content":env.K8S_BEARERTOKEN}]}]}] | from_entries' > $dstpath
exit 0
fi
exit 1
...@@ -9,10 +9,43 @@ metadata: ...@@ -9,10 +9,43 @@ metadata:
release: {{ .Release.Name }} release: {{ .Release.Name }}
component: nginx component: nginx
data: data:
copy-datasource-plugin-json.sh: |-
#!/bin/bash
srcpath="/usr/share/grafana/public/app/plugins/datasource/prometheus/plugin.json"
dstpath="/host/grafana/raw-plugin.json"
if [[ -f $srcpath ]] && [[ -d /host ]]; then
mkdir -p /host/grafana
cp -f $srcpath $dstpath
exit 0
fi
exit 1
modify-datasource-plugin-json.sh: |-
#!/bin/sh
srcpath="/host/grafana/raw-plugin.json"
dstpath="/host/grafana/plugin.json"
if [ -f $srcpath ] && [ -d /host ]; then
mkdir -p /host/grafana
token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
cat $srcpath | K8S_BEARERTOKEN="Bearer $token" jq 'to_entries | . + [{"key":"routes","value":[{"path":"api/v1","url":"{{ .Values.prometheusDatasourceURL }}/api/v1","headers":[{"name":"Authorization","content":env.K8S_BEARERTOKEN}]}]}] | from_entries' > $dstpath
exit 0
fi
exit 1
nginx.conf: |- nginx.conf: |-
user nginx; user nginx;
worker_processes auto; worker_processes auto;
error_log /dev/null warn; error_log /dev/stdout warn;
pid /var/run/nginx.pid; pid /var/run/nginx.pid;
events { events {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{{- $_ := set $yamls (.Values.additionalScrapeConfigs | toYaml) "" -}} {{- $_ := set $yamls (.Values.additionalScrapeConfigs | toYaml) "" -}}
{{- end -}} {{- end -}}
{{- if $yamls -}} {{- if $yamls -}}
{{- keys $yamls | join "\n" | b64enc | quote -}} {{- keys $yamls | join "\n" | quote -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
{{- $_ := set $yamls (.Values.additionalAlertManagerConfigs | toYaml) "" -}} {{- $_ := set $yamls (.Values.additionalAlertManagerConfigs | toYaml) "" -}}
{{- end -}} {{- end -}}
{{- if $yamls -}} {{- if $yamls -}}
{{- keys $yamls | join "\n" | b64enc | quote -}} {{- keys $yamls | join "\n" | quote -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
......
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "app.hooks.fullname" . }}
data:
replace-config-by-auth.sh: |-
#!/bin/sh
srcpath="/template/nginx.conf"
dstpath="/host/nginx.conf"
if [ -f $srcpath ] && [ -d /host ]; then
token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
sed "s/REPLACE_PARAM_AUTHORIZATION/Bearer ${token}/g" $srcpath > $dstpath
exit 0
fi
exit 1
...@@ -7,12 +7,27 @@ metadata: ...@@ -7,12 +7,27 @@ metadata:
chart: {{ template "app.version" . }} chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
component: nginx
data: data:
nginx.conf: |- run-sh.tmpl: |-
#!/bin/sh
set -e
srcpath="/nginx/nginx-conf.tmpl"
dstpath="/var/run/nginx.conf"
if ![ -f $srcpath ]; then
exit 1
fi
token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
sed "s/REPLACE_PARAM_AUTHORIZATION/Bearer ${token}/g" $srcpath | sed "s/REPLACE_PARAM_IP/${POD_IP}/g" > $dstpath
nginx -g "daemon off;" -c /var/run/nginx.conf
nginx-conf.tmpl: |-
user nginx; user nginx;
worker_processes auto; worker_processes auto;
error_log /dev/null warn; error_log /dev/stdout warn;
pid /var/run/nginx.pid; pid /var/run/nginx.pid;
events { events {
...@@ -57,7 +72,7 @@ data: ...@@ -57,7 +72,7 @@ data:
add_header X-Proxy-Cache $upstream_cache_status; add_header X-Proxy-Cache $upstream_cache_status;
add_header Cache-Control "public"; add_header Cache-Control "public";
proxy_pass http://prometheus-operated:9090/; proxy_pass http://REPLACE_PARAM_IP:9090/;
sub_filter_types text/html; sub_filter_types text/html;
sub_filter_once off; sub_filter_once off;
...@@ -68,4 +83,4 @@ data: ...@@ -68,4 +83,4 @@ data:
} }
} }
} }
} }
\ No newline at end of file
apiVersion: {{ template "deployment_api_version" . }}
kind: Deployment
metadata:
name: {{ template "app.nginx.fullname" . }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: nginx
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
release: {{ .Release.Name }}
component: nginx
template:
metadata:
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
release: {{ .Release.Name }}
component: nginx
spec:
initContainers:
- name: nginx-init-auth-add
image: {{ template "system_default_registry" . }}{{ .Values.image.proxy.repository }}:{{ .Values.image.proxy.tag }}
command:
- /usr/bin/replace-config-by-auth.sh
volumeMounts:
- name: prometheus-static-hooks
mountPath: /usr/bin/replace-config-by-auth.sh
subPath: replace-config-by-auth.sh
- name: prometheus-static-contents
mountPath: /host
- name: prometheus-nginx-template
mountPath: /template
{{- if and .Values.resources .Values.resources.inits }}
resources:
{{ toYaml .Values.resources.inits | indent 10 }}
{{- end }}
containers:
- name: prometheus-proxy
image: {{ template "system_default_registry" . }}{{ .Values.image.proxy.repository }}:{{ .Values.image.proxy.tag }}
args:
- nginx
- -g
- daemon off;
- -c
- /nginx/nginx.conf
volumeMounts:
- mountPath: /nginx
name: prometheus-static-contents
{{- if and .Values.resources .Values.resources.proxy }}
resources:
{{ toYaml .Values.resources.proxy | indent 10 }}
{{- end }}
ports:
- name: http
containerPort: 80
{{- if .Values.enabledRBAC }}
serviceAccountName: {{ default (default (include "app.fullname" .) .Values.serviceAccountName) .Values.serviceAccountNameOverride }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
nodeSelector:
beta.kubernetes.io/os: linux
{{- range .Values.nodeSelectors }}
{{- $pair := regexSplit "=" . 2 }}
{{- if eq 2 (len $pair) }}
{{ (index $pair 0) }}: {{ (index $pair 1) }}
{{- else }}
{{ (index $pair 0) }}: ""
{{- end }}
{{- end }}
volumes:
- name: prometheus-static-hooks
configMap:
name: {{ template "app.hooks.fullname" . }}
defaultMode: 0777
- name: prometheus-static-contents
emptyDir: {}
- name: prometheus-nginx-template
configMap:
name: {{ template "app.nginx.fullname" . }}
defaultMode: 438
items:
- key: nginx.conf
mode: 438
path: nginx.conf
...@@ -12,9 +12,33 @@ spec: ...@@ -12,9 +12,33 @@ spec:
securityContext: securityContext:
{{ toYaml .Values.securityContext | indent 4 }} {{ toYaml .Values.securityContext | indent 4 }}
{{- end }} {{- end }}
{{- if eq .Values.level "cluster" }}
listenLocal: true
containers: containers:
- name: prometheus-proxy
command:
- /bin/sh
- -c
- cp /nginx/run-sh.tmpl /var/run/nginx-start.sh; chmod +x /var/run/nginx-start.sh; /var/run/nginx-start.sh
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
image: {{ template "system_default_registry" . }}{{ .Values.image.proxy.repository }}:{{ .Values.image.proxy.tag }}
ports:
- containerPort: 80
name: http
protocol: TCP
{{- if and .Values.resources .Values.resources.proxy }}
resources:
{{ toYaml .Values.resources.proxy | indent 6 }}
{{- end }}
securityContext:
runAsNonRoot: false
runAsUser: 0
volumeMounts:
- mountPath: /nginx
name: configmap-{{ template "app.nginx.fullname" . }}
{{- if eq .Values.level "cluster" }}
- name: prometheus-agent - name: prometheus-agent
command: command:
- prometheus-auth - prometheus-auth
...@@ -31,39 +55,29 @@ spec: ...@@ -31,39 +55,29 @@ spec:
- containerPort: 9090 - containerPort: 9090
name: web name: web
protocol: TCP protocol: TCP
- containerPort: 9190
name: profile
protocol: TCP
livenessProbe: livenessProbe:
failureThreshold: 6 failureThreshold: 6
httpGet: httpGet:
path: /-/healthy path: /-/healthy
port: web port: web
scheme: HTTP scheme: HTTP
periodSeconds: 5 periodSeconds: 10
successThreshold: 1 successThreshold: 1
timeoutSeconds: 3 timeoutSeconds: 10
readinessProbe: readinessProbe:
failureThreshold: 120 failureThreshold: 10
httpGet: httpGet:
path: /-/ready path: /-/ready
port: web port: web
scheme: HTTP scheme: HTTP
periodSeconds: 5 periodSeconds: 10
successThreshold: 1 successThreshold: 1
timeoutSeconds: 3 timeoutSeconds: 10
{{- if and .Values.resources .Values.resources.auth }} {{- if and .Values.resources .Values.resources.auth }}
resources: resources:
{{ toYaml .Values.resources.auth | indent 6 }} {{ toYaml .Values.resources.auth | indent 6 }}
{{- end }} {{- end }}
{{- if .Values.sidecarsSpec }} listenLocal: true
{{ toYaml .Values.sidecarsSpec | indent 2 }}
{{- end }}
{{- else }}
{{- if .Values.sidecarsSpec }}
containers:
{{ toYaml .Values.sidecarsSpec | indent 2 }}
{{- end }}
{{- end }} {{- end }}
podMetadata: podMetadata:
labels: labels:
...@@ -104,9 +118,11 @@ spec: ...@@ -104,9 +118,11 @@ spec:
{{ toYaml .Values.resources.core | indent 4 }} {{ toYaml .Values.resources.core | indent 4 }}
{{- end }} {{- end }}
retention: "{{ .Values.retention }}" retention: "{{ .Values.retention }}"
configMaps:
- {{ template "app.nginx.fullname" . }}
{{- if .Values.secrets }} {{- if .Values.secrets }}
secrets: secrets:
{{ toYaml .Values.secrets | indent 4 }} {{ toYaml .Values.secrets | indent 2 }}
{{- end }} {{- end }}
{{- if .Values.enabledRBAC }} {{- if .Values.enabledRBAC }}
serviceAccountName: {{ default (default (include "app.fullname" .) .Values.serviceAccountName) .Values.serviceAccountNameOverride }} serviceAccountName: {{ default (default (include "app.fullname" .) .Values.serviceAccountName) .Values.serviceAccountNameOverride }}
......
...@@ -8,7 +8,7 @@ metadata: ...@@ -8,7 +8,7 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
name: {{ template "app.fullname" . }}-additional-scrape-configs name: {{ template "app.fullname" . }}-additional-scrape-configs
data: stringData:
additional-scrape-configs.yaml: {{ template "additional-scrape-configs.yaml" . }} additional-scrape-configs.yaml: {{ template "additional-scrape-configs.yaml" . }}
{{- end }} {{- end }}
...@@ -23,6 +23,6 @@ metadata: ...@@ -23,6 +23,6 @@ metadata:
heritage: {{ .Release.Service }} heritage: {{ .Release.Service }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
name: {{ template "app.fullname" . }}-additional-alertmanager-configs name: {{ template "app.fullname" . }}-additional-alertmanager-configs
data: stringData:
additional-alertmanager-configs.yaml: {{ template "additional-alertmanager-configs.yaml" . }} additional-alertmanager-configs.yaml: {{ template "additional-alertmanager-configs.yaml" . }}
{{- end }} {{- end }}
\ No newline at end of file
...@@ -10,11 +10,11 @@ metadata: ...@@ -10,11 +10,11 @@ metadata:
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"
spec: spec:
type: ClusterIP type: ClusterIP
sessionAffinity: ClientIP
selector: selector:
app: {{ template "app.name" . }} app: {{ template "app.name" . }}
chart: {{ template "app.version" . }} chart: {{ template "app.version" . }}
release: {{ .Release.Name }} release: {{ .Release.Name }}
component: nginx
ports: ports:
- name: http - name: http
port: 80 port: 80
......
...@@ -68,7 +68,3 @@ additionalAlertManagerConfigs: [] ...@@ -68,7 +68,3 @@ additionalAlertManagerConfigs: []
# - static_configs: # - static_configs:
# - targets: # - targets:
# - "localhost:9093" # - "localhost:9093"
sidecarsSpec: []
# - name: sidecar
# image: registry/name:tag
{{- if .Values.enabled }} {{- if .Values.enabled }}
{{- $kubeletSvcName := "expose-kubelets-metrics" -}}
apiVersion: v1
kind: Service
metadata:
name: {{ $kubeletSvcName }}
labels:
k8s-app: kubelet
{{ .Values.apiGroup }}: "true"
spec:
type: ClusterIP
clusterIP: None
ports:
- name: https-metrics
port: 10250
targetPort: 10250
---
apiVersion: {{ template "deployment_api_version" . }} apiVersion: {{ template "deployment_api_version" . }}
kind: Deployment kind: Deployment
metadata: metadata:
...@@ -26,7 +43,7 @@ spec: ...@@ -26,7 +43,7 @@ spec:
- name: prometheus-operator - name: prometheus-operator
image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
args: args:
- --kubelet-service={{ .Release.Namespace }}/expose-kubelets-metrics - --kubelet-service={{ .Release.Namespace }}/{{ $kubeletSvcName }}
- --log-format={{ .Values.logFormat }} - --log-format={{ .Values.logFormat }}
- --log-level={{ .Values.logLevel }} - --log-level={{ .Values.logLevel }}
- --prometheus-config-reloader={{ template "system_default_registry" . }}{{ .Values.image.prometheusConfigReloader.repository }}:{{ .Values.image.prometheusConfigReloader.tag }} - --prometheus-config-reloader={{ template "system_default_registry" . }}{{ .Values.image.prometheusConfigReloader.repository }}:{{ .Values.image.prometheusConfigReloader.tag }}
......
...@@ -195,9 +195,6 @@ alertmanager: ...@@ -195,9 +195,6 @@ alertmanager:
image: image:
repository: rancher/prom-alertmanager repository: rancher/prom-alertmanager
tag: v0.15.2 tag: v0.15.2
proxy:
repository: rancher/nginx
tag: 1.15.8-alpine
nodeSelectors: [] nodeSelectors: []
resources: resources:
core: core:
...@@ -207,13 +204,6 @@ alertmanager: ...@@ -207,13 +204,6 @@ alertmanager:
requests: requests:
memory: 100Mi memory: 100Mi
cpu: 100m cpu: 100m
proxy:
limits:
memory: 100Mi
cpu: 100m
requests:
memory: 50Mi
cpu: 50m
config: config:
global: global:
resolve_timeout: 5m resolve_timeout: 5m
...@@ -293,14 +283,10 @@ prometheus: ...@@ -293,14 +283,10 @@ prometheus:
level: cluster level: cluster
auth: auth:
args: args:
- --proxy-url - --proxy-url=http://localhost:9090
- http://localhost:9090 - --listen-address=$(POD_IP):9090
- --listen-address - --filter-reader-labels=prometheus
- $(POD_IP):9090 - --filter-reader-labels=prometheus_replica
- --filter-reader-labels
- prometheus
- --filter-reader-labels
- prometheus_replica
env: env:
- name: POD_IP - name: POD_IP
valueFrom: valueFrom:
...@@ -318,13 +304,6 @@ prometheus: ...@@ -318,13 +304,6 @@ prometheus:
tag: 1.15.8-alpine tag: 1.15.8-alpine
nodeSelectors: [] nodeSelectors: []
resources: resources:
inits:
limits:
memory: 50Mi
cpu: 50m
requests:
memory: 50Mi
cpu: 50m
core: core:
limits: limits:
memory: 500Mi memory: 500Mi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment