Commit 8f54c9d7 by Frank Mai Committed by orangedeng

Remove the front Nginx of Alertmanager

parent c80dba3d
......@@ -75,7 +75,3 @@ spec:
tolerations:
{{ toYaml .Values.tolerations | indent 4 }}
{{- 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:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
release: {{ .Release.Name }}
component: nginx
ports:
- name: http
port: 80
targetPort: http
targetPort: web
......@@ -66,7 +66,3 @@ storageSpec: {}
# requests:
# storage: 50Gi
# selector: {}
sidecarsSpec: []
# - name: sidecar
# image: registry/name:tag
......@@ -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
......
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