1. Jenkins

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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
############### pvc ###################
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins-data-home
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/k8s/jenkins"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jenkins-data-home-claim
namespace: star
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
############### deployment ###################
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jenkins
namespace: star
spec:
replicas: 1
selector:
matchLabels:
app: jenkins
template:
metadata:
labels:
app: jenkins
spec:
terminationGracePeriodSeconds: 10
containers:
- name: jenkins
image: jenkins/jenkins:latest
imagePullPolicy: IfNotPresent
env:
- name: JAVA_OPTS
value: -Duser.timezone=Asia/Shanghai
ports:
- containerPort: 8080
name: web
protocol: TCP
- containerPort: 50000
name: agent
protocol: TCP
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 200m
memory: 200Mi
livenessProbe:
httpGet:
path: /login
port: 8080
initialDelaySeconds: 60
timeoutSeconds: 5
failureThreshold: 12
readinessProbe:
httpGet:
path: /login
port: 8080
initialDelaySeconds: 60
timeoutSeconds: 5
failureThreshold: 12
volumeMounts:
- name: jenkinshome
mountPath: /var/jenkins_home
securityContext:
runAsUser: 0
volumes:
- name: jenkinshome
persistentVolumeClaim:
claimName: jenkins-data-home-claim
############### service ###################
---
apiVersion: v1
kind: Service
metadata:
name: jenkins
namespace: star
labels:
app: jenkins
spec:
selector:
app: jenkins
type: ClusterIP
ports:
- name: web
port: 8080
targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: jenkins-agent
namespace: star
labels:
app: jenkins
spec:
selector:
app: jenkins
type: ClusterIP
ports:
- name: agent
port: 50000
targetPort: 50000

2. Chat-GPT

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
############### deployment ###################
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gpt
namespace: <namespace>
spec:
replicas: 1
selector:
matchLabels:
app: gpt
template:
metadata:
labels:
app: gpt
spec:
nodeSelector:
flag: <node-tag>
terminationGracePeriodSeconds: 10
containers:
- name: gpt
image: yidadaa/chatgpt-next-web
imagePullPolicy: Always
env:
- name: OPENAI_API_KEY
value: <api-key>
- name: CODE
value: <password1,password2,password3>
ports:
- containerPort: 3000
name: web
protocol: TCP
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
securityContext:
runAsUser: 0
############### service ###################
---
apiVersion: v1
kind: Service
metadata:
name: gpt
namespace: star
labels:
app: gpt
spec:
selector:
app: gpt
type: ClusterIP
ports:
- name: web
port: 3000
targetPort: 3000