This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
forked from jnightlee/webdav-teambition
-
Notifications
You must be signed in to change notification settings - Fork 137
/
k8s_app.yaml
89 lines (89 loc) · 1.94 KB
/
k8s_app.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
# ns
apiVersion: v1
kind: Namespace
metadata:
name: webdav-aliyun
# account
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: webdav-aliyun-sa-clusteradmin
namespace: webdav-aliyun
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: webdav-aliyun-crb-clusteradmin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: webdav-aliyun-sa-clusteradmin
namespace: webdav-aliyun
---
# svc
apiVersion: v1
kind: Service
metadata:
name: webdav-aliyun
namespace: webdav-aliyun
spec:
type: NodePort
selector:
app: webdav-aliyun
ports:
- name: http
protocol: TCP
port: 18080
targetPort: 8080
nodePort: 18080
---
# deploy
apiVersion: apps/v1
kind: Deployment
metadata:
name: webdav-aliyun
namespace: webdav-aliyun
spec:
selector:
matchLabels:
app: webdav-aliyun
template:
metadata:
labels:
app: webdav-aliyun
spec:
serviceAccountName: webdav-aliyun-sa-clusteradmin
containers:
- name: webdav-aliyun
image: eritpchy/aliyundrive-webdav
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: "Asia/Shanghai"
- name: ALIYUNDRIVE_REFRESH_TOKEN
value: "xxx"
- name: ALIYUNDRIVE_AUTH_USER_NAME
value: "admin"
- name: ALIYUNDRIVE_AUTH_PASSWORD
value: "admin"
- name: JAVA_OPTS
value: "-Xmx1g"
ports:
- containerPort: 8080
protocol: TCP
volumeMounts:
- name: localtime
mountPath: /etc/localtime
- name: aliyun-driver
mountPath: /conf
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: aliyun-driver
hostPath:
path: ./docker/conf