12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- ---
- apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- name: [APP]
- namespace: [ENV]
- labels:
- app: [APP]
- spec:
- serviceName: [APP]
- replicas: [REPLICA]
- selector:
- matchLabels:
- app: [APP]
- template:
- metadata:
- labels:
- app: [APP]
- spec:
- terminationGracePeriodSeconds: 60
- initContainers:
- - name: init
- image: hub.evbj.easou.com/dev/busybox
- command: [ "chmod","777","-R","/data" ]
- imagePullPolicy: Always
- volumeMounts:
- - name: volume
- mountPath: /data
- #nodeSelector:
- # app.touchrs: touchrs
- containers:
- - name: [APP]
- image: hub.evbj.easou.com/[ENV]/[APP]:[TAG]
- imagePullPolicy: Always
- env:
- - name: JAVA_OPTS
- value: "-server [DEBUG_OPTS] -Xmx2g -Xms2g -Xss512k -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=[PROFILE]"
- ports:
- - containerPort: 8080
- name: port
- - containerPort: 8001
- name: "jvm-debug"
- volumeMounts:
- - name: volume
- mountPath: /data
- livenessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 30
- periodSeconds: 15
- readinessProbe:
- tcpSocket:
- port: 8080
- initialDelaySeconds: 30
- periodSeconds: 15
- volumeClaimTemplates:
- - metadata:
- name: volume
- spec:
- accessModes: [ "ReadWriteOnce" ]
- storageClassName: rbd
- resources:
- requests:
- storage: 100Gi
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: [APP]-svc
- namespace: [ENV]
- labels:
- app: [APP]-svc
- spec:
- type: NodePort
- ports:
- - port: 80
- targetPort: 8080
- name: "main"
- selector:
- app: [APP]
- ---
- apiVersion: extensions/v1beta1
- kind: Ingress
- metadata:
- name: [APP]-ingress
- namespace: [ENV]
- annotations:
- kubernetes.io/ingress.class: nginx
- spec:
- rules:
- - host: [APP]-[ENV].ieasou.cn
- http:
- paths:
- - path: /
- backend:
- serviceName: [APP]-svc
- servicePort: 80
|