2022-04-11 10:15:20 +07:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
namespace: spring-web-dev
|
|
|
|
name: spring-web-service
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: spring-web-api
|
|
|
|
ports:
|
|
|
|
- port: 8080
|
|
|
|
targetPort: 8080
|
|
|
|
type: ClusterIP
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
namespace: spring-web-dev
|
|
|
|
name: spring-web-deployment
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: spring-web-api
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: spring-web-api
|
|
|
|
spec:
|
|
|
|
imagePullSecrets:
|
|
|
|
- name: registry-secret
|
|
|
|
containers:
|
|
|
|
- name: spring-web-api
|
|
|
|
image: registry.kh.cubetiqs.com/spring-web-api:demo
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
envFrom:
|
|
|
|
- secretRef:
|
|
|
|
name: spring-web-dev-secret
|
2022-04-11 13:00:05 +07:00
|
|
|
volumeMounts:
|
|
|
|
- name: spring-web-api-data
|
|
|
|
mountPath: /opt/cubetiq/data
|
|
|
|
subPath: spring-web-api-data
|
2022-04-11 10:15:20 +07:00
|
|
|
imagePullPolicy: Always
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 300m
|
|
|
|
memory: 300Mi
|
|
|
|
limits:
|
|
|
|
cpu: 800m
|
2022-04-11 13:00:05 +07:00
|
|
|
memory: 800Mi
|
|
|
|
volumes:
|
|
|
|
- name: spring-web-api-data
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: spring-web-dev-volume
|