Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system-charts
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rancher商店
system-charts
Commits
ca7b0eb7
Unverified
Commit
ca7b0eb7
authored
Feb 20, 2019
by
Craig Jellick
Committed by
GitHub
Feb 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16 from thxCode/issue_18166
Refactor & fix some issue for Monitoring
parents
c80dba3d
16e0cadb
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
131 additions
and
383 deletions
+131
-383
alertmanager.yaml
...ng/v0.0.2/charts/alertmanager/templates/alertmanager.yaml
+0
-4
nginx-configmap.yaml
...v0.0.2/charts/alertmanager/templates/nginx-configmap.yaml
+0
-65
nginx-deployment.yaml
...0.0.2/charts/alertmanager/templates/nginx-deployment.yaml
+0
-72
service.yaml
...itoring/v0.0.2/charts/alertmanager/templates/service.yaml
+1
-2
values.yaml
...rancher-monitoring/v0.0.2/charts/alertmanager/values.yaml
+0
-4
deployment.yaml
...onitoring/v0.0.2/charts/grafana/templates/deployment.yaml
+11
-10
hooks-configmap.yaml
...ring/v0.0.2/charts/grafana/templates/hooks-configmap.yaml
+0
-44
nginx-configmap.yaml
...ring/v0.0.2/charts/grafana/templates/nginx-configmap.yaml
+34
-1
_helpers.tpl
...onitoring/v0.0.2/charts/prometheus/templates/_helpers.tpl
+2
-2
hooks-configmap.yaml
...g/v0.0.2/charts/prometheus/templates/hooks-configmap.yaml
+0
-27
nginx-configmap.yaml
...g/v0.0.2/charts/prometheus/templates/nginx-configmap.yaml
+21
-5
nginx-deployment.yaml
.../v0.0.2/charts/prometheus/templates/nginx-deployment.yaml
+0
-94
prometheus.yaml
...toring/v0.0.2/charts/prometheus/templates/prometheus.yaml
+35
-19
secrets.yaml
...onitoring/v0.0.2/charts/prometheus/templates/secrets.yaml
+4
-3
service.yaml
...onitoring/v0.0.2/charts/prometheus/templates/service.yaml
+1
-1
values.yaml
...s/rancher-monitoring/v0.0.2/charts/prometheus/values.yaml
+0
-4
deployment.yaml
charts/rancher-monitoring/v0.0.2/templates/deployment.yaml
+18
-1
values.yaml
charts/rancher-monitoring/v0.0.2/values.yaml
+4
-25
No files found.
charts/rancher-monitoring/v0.0.2/charts/alertmanager/templates/alertmanager.yaml
View file @
ca7b0eb7
...
...
@@ -75,7 +75,3 @@ spec:
tolerations
:
{{
toYaml .Values.tolerations | indent 4
}}
{{
- end
}}
{{
- if .Values.sidecarsSpec
}}
containers
:
{{
toYaml .Values.sidecarsSpec | indent 4
}}
{{
- end
}}
charts/rancher-monitoring/v0.0.2/charts/alertmanager/templates/nginx-configmap.yaml
deleted
100644 → 0
View file @
c80dba3d
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;
}
}
}
}
charts/rancher-monitoring/v0.0.2/charts/alertmanager/templates/nginx-deployment.yaml
deleted
100644 → 0
View file @
c80dba3d
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" .
}}
charts/rancher-monitoring/v0.0.2/charts/alertmanager/templates/service.yaml
View file @
ca7b0eb7
...
...
@@ -14,8 +14,7 @@ spec:
app
:
{{
template "app.name" .
}}
chart
:
{{
template "app.version" .
}}
release
:
{{
.Release.Name
}}
component
:
nginx
ports
:
-
name
:
http
port
:
80
targetPort
:
http
targetPort
:
web
charts/rancher-monitoring/v0.0.2/charts/alertmanager/values.yaml
View file @
ca7b0eb7
...
...
@@ -66,7 +66,3 @@ storageSpec: {}
# requests:
# storage: 50Gi
# selector: {}
sidecarsSpec
:
[]
# - name: sidecar
# image: registry/name:tag
charts/rancher-monitoring/v0.0.2/charts/grafana/templates/deployment.yaml
View file @
ca7b0eb7
...
...
@@ -29,7 +29,7 @@ spec:
{{
toYaml .Values.resources.inits | indent 10
}}
{{
- end
}}
volumeMounts
:
-
name
:
grafana-
static-hooks
-
name
:
grafana-
nginx
mountPath
:
/run.sh
subPath
:
copy-datasource-plugin-json.sh
-
name
:
grafana-static-contents
...
...
@@ -37,14 +37,14 @@ spec:
-
name
:
grafana-init-plugin-json-modify
image
:
{{
template "system_default_registry" .
}}{{
.Values.image.tool.repository
}}
:{{ .Values.image.tool.tag }}
command
:
-
/
usr/bin/modify-datasource-plugin-jso
n.sh
-
/
ru
n.sh
{{
- if and .Values.resources .Values.resources.inits
}}
resources
:
{{
toYaml .Values.resources.inits | indent 10
}}
{{
- end
}}
volumeMounts
:
-
name
:
grafana-
static-hooks
mountPath
:
/
usr/bin/modify-datasource-plugin-jso
n.sh
-
name
:
grafana-
nginx
mountPath
:
/
ru
n.sh
subPath
:
modify-datasource-plugin-json.sh
-
name
:
grafana-static-contents
mountPath
:
/host
...
...
@@ -128,10 +128,6 @@ spec:
securityContext
:
fsGroup
:
472
volumes
:
-
name
:
grafana-static-hooks
configMap
:
name
:
{{
template "app.hooks.fullname" .
}}
defaultMode
:
0777
-
name
:
grafana-static-contents
emptyDir
:
{}
-
name
:
grafana-storage
...
...
@@ -143,12 +139,17 @@ spec:
{{
- end
}}
-
name
:
grafana-nginx
configMap
:
defaultMode
:
438
name
:
{{
template "app.nginx.fullname" .
}}
items
:
-
key
:
nginx.conf
mode
:
438
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
configMap
:
name
:
{{
template "app.dashboards.fullname" .
}}
...
...
charts/rancher-monitoring/v0.0.2/charts/grafana/templates/hooks-configmap.yaml
deleted
100644 → 0
View file @
c80dba3d
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
charts/rancher-monitoring/v0.0.2/charts/grafana/templates/nginx-configmap.yaml
View file @
ca7b0eb7
...
...
@@ -9,10 +9,43 @@ metadata:
release
:
{{
.Release.Name
}}
component
:
nginx
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: |-
user nginx;
worker_processes auto;
error_log /dev/
null
warn;
error_log /dev/
stdout
warn;
pid /var/run/nginx.pid;
events {
...
...
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/_helpers.tpl
View file @
ca7b0eb7
...
...
@@ -21,7 +21,7 @@
{{- $_ := set $yamls (.Values.additionalScrapeConfigs | toYaml) "" -}}
{{- end -}}
{{- if $yamls -}}
{{- keys $yamls | join "\n" |
b64enc |
quote -}}
{{- keys $yamls | join "\n" | quote -}}
{{- end -}}
{{- end -}}
...
...
@@ -47,7 +47,7 @@
{{- $_ := set $yamls (.Values.additionalAlertManagerConfigs | toYaml) "" -}}
{{- end -}}
{{- if $yamls -}}
{{- keys $yamls | join "\n" |
b64enc |
quote -}}
{{- keys $yamls | join "\n" | quote -}}
{{- end -}}
{{- end -}}
...
...
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/hooks-configmap.yaml
deleted
100644 → 0
View file @
c80dba3d
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
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/nginx-co
m
figmap.yaml
→
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/nginx-co
n
figmap.yaml
View file @
ca7b0eb7
...
...
@@ -7,12 +7,27 @@ metadata:
chart
:
{{
template "app.version" .
}}
heritage
:
{{
.Release.Service
}}
release
:
{{
.Release.Name
}}
component
:
nginx
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;
worker_processes auto;
error_log /dev/
null
warn;
error_log /dev/
stdout
warn;
pid /var/run/nginx.pid;
events {
...
...
@@ -57,7 +72,7 @@ data:
add_header X-Proxy-Cache $upstream_cache_status;
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_once off;
...
...
@@ -68,4 +83,4 @@ data:
}
}
}
}
}
\ No newline at end of file
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/nginx-deployment.yaml
deleted
100644 → 0
View file @
c80dba3d
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
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/prometheus.yaml
View file @
ca7b0eb7
...
...
@@ -12,9 +12,33 @@ spec:
securityContext
:
{{
toYaml .Values.securityContext | indent 4
}}
{{
- end
}}
{{
- if eq .Values.level "cluster"
}}
listenLocal
:
true
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
command
:
-
prometheus-auth
...
...
@@ -31,39 +55,29 @@ spec:
-
containerPort
:
9090
name
:
web
protocol
:
TCP
-
containerPort
:
9190
name
:
profile
protocol
:
TCP
livenessProbe
:
failureThreshold
:
6
httpGet
:
path
:
/-/healthy
port
:
web
scheme
:
HTTP
periodSeconds
:
5
periodSeconds
:
10
successThreshold
:
1
timeoutSeconds
:
3
timeoutSeconds
:
10
readinessProbe
:
failureThreshold
:
1
2
0
failureThreshold
:
10
httpGet
:
path
:
/-/ready
port
:
web
scheme
:
HTTP
periodSeconds
:
5
periodSeconds
:
10
successThreshold
:
1
timeoutSeconds
:
3
timeoutSeconds
:
10
{{
- if and .Values.resources .Values.resources.auth
}}
resources
:
{{
toYaml .Values.resources.auth | indent 6
}}
{{
- end
}}
{{
- if .Values.sidecarsSpec
}}
{{
toYaml .Values.sidecarsSpec | indent 2
}}
{{
- end
}}
{{
- else
}}
{{
- if .Values.sidecarsSpec
}}
containers
:
{{
toYaml .Values.sidecarsSpec | indent 2
}}
{{
- end
}}
listenLocal
:
true
{{
- end
}}
podMetadata
:
labels
:
...
...
@@ -104,9 +118,11 @@ spec:
{{
toYaml .Values.resources.core | indent 4
}}
{{
- end
}}
retention
:
"
{{
.Values.retention
}}"
configMaps
:
-
{{
template "app.nginx.fullname" .
}}
{{
- if .Values.secrets
}}
secrets
:
{{
toYaml .Values.secrets | indent
4
}}
{{
toYaml .Values.secrets | indent
2
}}
{{
- end
}}
{{
- if .Values.enabledRBAC
}}
serviceAccountName
:
{{
default (default (include "app.fullname" .) .Values.serviceAccountName) .Values.serviceAccountNameOverride
}}
...
...
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/secrets.yaml
View file @
ca7b0eb7
...
...
@@ -8,7 +8,7 @@ metadata:
heritage
:
{{
.Release.Service
}}
release
:
{{
.Release.Name
}}
name
:
{{
template "app.fullname" .
}}
-additional-scrape-configs
d
ata
:
stringD
ata
:
additional-scrape-configs.yaml
:
{{
template "additional-scrape-configs.yaml" .
}}
{{
- end
}}
...
...
@@ -23,6 +23,6 @@ metadata:
heritage
:
{{
.Release.Service
}}
release
:
{{
.Release.Name
}}
name
:
{{
template "app.fullname" .
}}
-additional-alertmanager-configs
d
ata
:
stringD
ata
:
additional-alertmanager-configs.yaml
:
{{
template "additional-alertmanager-configs.yaml" .
}}
{{
- end
}}
{{
- end
}}
\ No newline at end of file
charts/rancher-monitoring/v0.0.2/charts/prometheus/templates/service.yaml
View file @
ca7b0eb7
...
...
@@ -10,11 +10,11 @@ metadata:
kubernetes.io/cluster-service
:
"
true"
spec
:
type
:
ClusterIP
sessionAffinity
:
ClientIP
selector
:
app
:
{{
template "app.name" .
}}
chart
:
{{
template "app.version" .
}}
release
:
{{
.Release.Name
}}
component
:
nginx
ports
:
-
name
:
http
port
:
80
...
...
charts/rancher-monitoring/v0.0.2/charts/prometheus/values.yaml
View file @
ca7b0eb7
...
...
@@ -68,7 +68,3 @@ additionalAlertManagerConfigs: []
# - static_configs:
# - targets:
# - "localhost:9093"
sidecarsSpec
:
[]
# - name: sidecar
# image: registry/name:tag
charts/rancher-monitoring/v0.0.2/templates/deployment.yaml
View file @
ca7b0eb7
{{
- 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" .
}}
kind
:
Deployment
metadata
:
...
...
@@ -26,7 +43,7 @@ spec:
-
name
:
prometheus-operator
image
:
{{
template "system_default_registry" .
}}{{
.Values.image.repository
}}
:{{ .Values.image.tag }}
args
:
-
--kubelet-service={{ .Release.Namespace }}/
expose-kubelets-metrics
-
--kubelet-service={{ .Release.Namespace }}/
{{ $kubeletSvcName }}
-
--log-format={{ .Values.logFormat }}
-
--log-level={{ .Values.logLevel }}
-
--prometheus-config-reloader={{ template "system_default_registry" . }}{{ .Values.image.prometheusConfigReloader.repository }}:{{ .Values.image.prometheusConfigReloader.tag }}
...
...
charts/rancher-monitoring/v0.0.2/values.yaml
View file @
ca7b0eb7
...
...
@@ -195,9 +195,6 @@ alertmanager:
image
:
repository
:
rancher/prom-alertmanager
tag
:
v0.15.2
proxy
:
repository
:
rancher/nginx
tag
:
1.15.8-alpine
nodeSelectors
:
[]
resources
:
core
:
...
...
@@ -207,13 +204,6 @@ alertmanager:
requests
:
memory
:
100Mi
cpu
:
100m
proxy
:
limits
:
memory
:
100Mi
cpu
:
100m
requests
:
memory
:
50Mi
cpu
:
50m
config
:
global
:
resolve_timeout
:
5m
...
...
@@ -293,14 +283,10 @@ prometheus:
level
:
cluster
auth
:
args
:
-
--proxy-url
-
http://localhost:9090
-
--listen-address
-
$(POD_IP):9090
-
--filter-reader-labels
-
prometheus
-
--filter-reader-labels
-
prometheus_replica
-
--proxy-url=http://localhost:9090
-
--listen-address=$(POD_IP):9090
-
--filter-reader-labels=prometheus
-
--filter-reader-labels=prometheus_replica
env
:
-
name
:
POD_IP
valueFrom
:
...
...
@@ -318,13 +304,6 @@ prometheus:
tag
:
1.15.8-alpine
nodeSelectors
:
[]
resources
:
inits
:
limits
:
memory
:
50Mi
cpu
:
50m
requests
:
memory
:
50Mi
cpu
:
50m
core
:
limits
:
memory
:
500Mi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment