-
Notifications
You must be signed in to change notification settings - Fork 3
/
deployment.yaml
108 lines (108 loc) · 2.64 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
apiVersion: v1
kind: Namespace
metadata:
name: local-path-exporter
---
apiVersion: v1
automountServiceAccountToken: true
kind: ServiceAccount
metadata:
name: lp-metrics-exporter
namespace: local-path-exporter
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: lp-metrics-exporter
rules:
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- create
- apiGroups:
- ""
resources:
- persistentvolumeclaims
- persistentvolumeclaims/status
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: lp-metrics-exporter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: lp-metrics-exporter
subjects:
- kind: ServiceAccount
name: lp-metrics-exporter
namespace: local-path-exporter
---
apiVersion: v1
kind: Secret
metadata:
annotations:
kubernetes.io/service-account.name: lp-metrics-exporter
name: secret-sa-lp-metrics-exporter
namespace: local-path-exporter
type: kubernetes.io/service-account-token
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: lp-exporter
exporter: lp-exporter-deployment
name: lp-exporter
namespace: local-path-exporter
spec:
replicas: 1
selector:
matchLabels:
app: lp-exporter
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: lp-exporter
exporter: lp-exporter
spec:
serviceAccountName: lp-metrics-exporter
containers:
- image: ugurozturk99/lp-exporter-deployment:v0.0.31
name: python
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# If helm release name of pushgateway is different from "pushgateway" OR
# you are planning to deploy exporter to another namespace rather than the one
# that pushgateway deployed to then you have to specify pushgateway address
# as an environment variable
- name: PUSHGATEWAY_ADDRESS
value: "10.99.84.233:9091"
# If storage class name is different from "local-path" then you
# should specify it here
#- name: STORAGE_CLASS_NAME
# value: "local-path"
# Default Log Level is INFO
#- name: LOG_LEVEL
# value: "INFO"
# Default Job Log Level is DEBUG
#- name: JOB_LOG_LEVEL
# value: "DEBUG"
# Default Volume Provision Path is /opt/local-path-provisioner
#- name: VOLUMEPROVISIONPATH
# value: "/opt/local-path-provisioner"