This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
deployment.yaml
78 lines (78 loc) · 1.58 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
apiVersion: v1
kind: ServiceAccount
metadata:
name: micro
namespace: micro
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: micro-registry
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- patch
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: micro-registry
namespace: micro
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: micro-registry
subjects:
- kind: ServiceAccount
name: micro
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: micro-dashboard
namespace: micro
labels:
app: micro-dashboard
spec:
replicas: 1
selector:
matchLabels:
app: micro-dashboard
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: micro-dashboard
spec:
containers:
- image: xpunch/go-micro-dashboard:latest
imagePullPolicy: IfNotPresent
name: dashboard
ports:
- containerPort: 80
protocol: TCP
env:
- name: MICRO_REGISTRY
value: "kubernetes"
- name: MICRO_CLIENT_RETRIES
value: "0"
# default config type env
# - SERVER_AUTH_USERNAME=user
# - SERVER_AUTH_PASSWORD=pass
resources:
limits:
memory: 512Mi
cpu: "0.25"
requests:
memory: 512Mi
cpu: "0.25"
serviceAccountName: micro