You've already forked DataMate
init datamate
This commit is contained in:
120
deployment/kubernetes/backend/deploy.yaml
Normal file
120
deployment/kubernetes/backend/deploy.yaml
Normal file
@@ -0,0 +1,120 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
app: backend
|
||||
name: backend
|
||||
rules:
|
||||
- verbs:
|
||||
- create
|
||||
- list
|
||||
- get
|
||||
- delete
|
||||
apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- jobs
|
||||
- verbs:
|
||||
- list
|
||||
apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- verbs:
|
||||
- get
|
||||
- list
|
||||
apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/log
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app: backend
|
||||
name: backend
|
||||
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
app: backend
|
||||
name: backend
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: backend
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: backend
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: backend
|
||||
labels:
|
||||
app: backend
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: backend
|
||||
spec:
|
||||
serviceAccountName: backend
|
||||
containers:
|
||||
- name: backend
|
||||
image: backend
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: namespace
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: SPRING_CONFIG_LOCATION
|
||||
value: file:/opt/backend/application.yml
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: dataset-volume
|
||||
mountPath: /dataset
|
||||
- name: flow-volume
|
||||
mountPath: /flow
|
||||
- name: log-volume
|
||||
mountPath: /var/log/data-mate
|
||||
volumes:
|
||||
- name: dataset-volume
|
||||
hostPath:
|
||||
path: /opt/data-mate/data/dataset
|
||||
type: DirectoryOrCreate
|
||||
- name: flow-volume
|
||||
hostPath:
|
||||
path: /opt/data-mate/data/flow
|
||||
type: DirectoryOrCreate
|
||||
- name: log-volume
|
||||
hostPath:
|
||||
path: /opt/data-mate/data/log
|
||||
type: DirectoryOrCreate
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: backend
|
||||
labels:
|
||||
app: backend
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: backend
|
||||
Reference in New Issue
Block a user