-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathself-release-example.yaml
89 lines (88 loc) · 1.99 KB
/
self-release-example.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
---
apiVersion: v1
kind: Service
metadata:
name: self-release
namespace: yunwei
spec:
ports:
- name: web
port: 80
targetPort: 8089
protocol: TCP
selector:
app: self-release
sessionAffinity: ClientIP
# Ingress
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: self-release
namespace: yunwei
# annotations:
#traefik.ingress.kubernetes.io/frontend-entry-points: http,https
# traefik.ingress.kubernetes.io/redirect-entry-point: https
spec:
rules:
- host: release.newops.haodai.net
http:
paths:
- path: /
backend:
serviceName: self-release
servicePort: web
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: self-release
namespace: yunwei
labels:
app: self-release
spec:
replicas: 1
selector:
matchLabels:
app: self-release
template:
metadata:
labels:
app: self-release
spec:
containers:
- name: self-release
image: harbor.haodai.net/ops/self-release:v1
imagePullPolicy: Always
# command: ["/bin/sh","-c","sleep 3600000"]
args:
- -gitlab-user
- CHANGETHIS
- -gitlab-pass
- CHANGETHIS
- -wechat-receiver-url
- http://wechat.haodai.net
- -harbor-user
- CHANGETHIS
- -harbor-pass
- CHANGETHIS
ports:
- containerPort: 8089
volumeMounts:
- mountPath: /app/projectlogs
name: data
- mountPath: /app/repos
name: repos
volumes:
- name: data
hostPath:
path: /data/k8s/self-release/projectlogs
type: DirectoryOrCreate
- name: repos
hostPath:
path: /data/k8s/self-release/repos
type: DirectoryOrCreate
nodeSelector:
#kubernetes.io/hostname: 172.31.90.208
func: monitor
# env: yunwei