mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-17 16:38:18 +00:00
feature(k8s) add
This commit is contained in:
parent
807a1bc26d
commit
72d111347e
2 changed files with 73 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ bin/release.js
|
||||||
client
|
client
|
||||||
|
|
||||||
webpack.config.js
|
webpack.config.js
|
||||||
|
k8s.yml
|
||||||
|
|
||||||
*.ai
|
*.ai
|
||||||
*.cdr
|
*.cdr
|
||||||
|
|
|
||||||
72
k8s.yml
Normal file
72
k8s.yml
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
# persistant storage will used to keep data between restarts
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: cloudcmd-storage
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: "100Mi"
|
||||||
|
|
||||||
|
---
|
||||||
|
# deployment is a manager for running container
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: cloudcmd-pv
|
||||||
|
labels:
|
||||||
|
app: cloudcmd-pv
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: cloudcmd
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: cloudcmd
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: cloudcmd
|
||||||
|
image: coderaiser/cloudcmd:latest
|
||||||
|
env:
|
||||||
|
- name: PORT
|
||||||
|
value: "8080"
|
||||||
|
resources:
|
||||||
|
limits: { memory: "150Mi", cpu: "100m" }
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
volumeMounts:
|
||||||
|
- name: cloudcmd-pv
|
||||||
|
mountPath: /storage
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
volumes:
|
||||||
|
# storage object that we created earlier
|
||||||
|
- name: cloudcmd-pv
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: cloudcmd-storage
|
||||||
|
|
||||||
|
---
|
||||||
|
# service is create internal DNS record for deployment
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: cloudcmd
|
||||||
|
annotations:
|
||||||
|
dev.okteto.com/auto-ingress: "true"
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: "cloudcmd"
|
||||||
|
port: 8080
|
||||||
|
selector:
|
||||||
|
app: cloudcmd-pv
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue