-
Notifications
You must be signed in to change notification settings - Fork 163
/
deployment.yaml
75 lines (75 loc) · 2.42 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
application: kube-metrics-adapter
name: kube-metrics-adapter
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
application: kube-metrics-adapter
template:
metadata:
{{ if eq .ConfigItems.kube_aws_iam_controller_kube_system_enable "false"}}
annotations:
iam.amazonaws.com/role: {{ .LocalID}}-kube-metrics-adapter
{{ end }}
labels:
application: kube-metrics-adapter
spec:
dnsConfig:
options:
- name: ndots
value: "1"
priorityClassName: system-cluster-critical
serviceAccountName: custom-metrics-apiserver
containers:
- name: kube-metrics-adapter
image: registry.opensource.zalan.do/teapot/kube-metrics-adapter:v0.0.4
{{ if eq .ConfigItems.kube_aws_iam_controller_kube_system_enable "true"}}
env:
# must be set for the AWS SDK/AWS CLI to find the credentials file.
- name: AWS_SHARED_CREDENTIALS_FILE # used by golang SDK
value: /meta/aws-iam/credentials.process
{{ end }}
args:
- --prometheus-server=http://prometheus.kube-system.svc.cluster.local
- --skipper-ingress-metrics
- --aws-external-metrics
- --aws-region=eu-central-1
- --aws-region=eu-west-1
- --skipper-backends-annotation=zalando.org/backend-weights
{{ if eq .Environment "production" }}
- --zmon-kariosdb-endpoint=https://data-service.zmon.zalan.do/kairosdb-proxy
{{ end }}
volumeMounts:
{{ if eq .ConfigItems.kube_aws_iam_controller_kube_system_enable "true"}}
- name: aws-iam-credentials
mountPath: /meta/aws-iam
readOnly: true
{{ end }}
{{ if eq .Environment "production" }}
- name: credentials
mountPath: /meta/credentials
readOnly: true
{{ end }}
resources:
limits:
cpu: 10m
memory: 100Mi
requests:
cpu: 10m
memory: 100Mi
volumes:
{{ if eq .ConfigItems.kube_aws_iam_controller_kube_system_enable "true"}}
- name: aws-iam-credentials
secret:
secretName: kube-metrics-adapter-aws-iam-credentials
{{ end }}
{{ if eq .Environment "production" }}
- name: credentials
secret:
secretName: "kube-metrics-adapter"
{{ end }}