diff --git a/deliverables/k8s/geluke.yaml b/deliverables/k8s/geluke.yaml new file mode 100644 index 000000000..91095de12 --- /dev/null +++ b/deliverables/k8s/geluke.yaml @@ -0,0 +1,95 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: geluke + namespace: fangjia +spec: + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + revisionHistoryLimit: 5 + selector: + matchLabels: + project: geluke + app: fangjia + template: + metadata: + labels: + project: geluke + app: fangjia + spec: + imagePullSecrets: + - name: nexus-registry-secret + nodeSelector: + app: fangjia + containers: + - name: geluke + image: 192.168.0.19:9012/geluke:latest + imagePullPolicy: Always + resources: + limits: + memory: "3Gi" + requests: + memory: "2Gi" + env: + - name: JAVA_OPTS + value: "-Xmx3072m -XX:MaxPermSize=256m + -Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml + -Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/geluke.properties" + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 10 + periodSeconds: 5 + ports: + - containerPort: 8080 + name: web + protocol: TCP + volumeMounts: + - name: host-time + mountPath: /etc/localtime + - name: goojiaconfig + mountPath: /home/goojia/goojiaconfig + + volumes: + - name: host-time + hostPath: + path: /etc/localtime + - name: goojiaconfig + cephfs: + monitors: + - 192.168.0.208:6789 + - 192.168.0.209:6789 + - 192.168.0.210:6789 + user: admin + path: /k8s/goojiaconfig + secretRef: + name: ceph-secret + readOnly: false + +--- +apiVersion: v1 +kind: Service +metadata: + name: geluke + namespace: fangjia + labels: + project: geluke + app: fangjia +spec: + type: NodePort + selector: + project: geluke + app: fangjia + ports: + - port: 8080 + targetPort: 8080 + nodePort: 30008 \ No newline at end of file