Compare commits
16 Commits
v2.1-local
...
v2.3-local
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40a3a12233 | ||
|
|
7a145c40bd | ||
|
|
89efefd7c1 | ||
|
|
c3e0a2cf6e | ||
|
|
b80bdb6370 | ||
|
|
9f35e58970 | ||
|
|
e0d0e9701b | ||
|
|
90c2dc3a05 | ||
|
|
d51ffb35c9 | ||
|
|
eaec895ff0 | ||
|
|
4d660bbff8 | ||
|
|
70f55ef987 | ||
|
|
773a759473 | ||
|
|
ed7ce1279a | ||
|
|
524f0f63ae | ||
|
|
a6699e26a7 |
@@ -1,8 +1,6 @@
|
|||||||
FROM ubuntu:jammy-20231004
|
FROM ubuntu:jammy-20231004
|
||||||
MAINTAINER bamanker
|
MAINTAINER bamanker
|
||||||
ARG NATIVE_FILE
|
COPY target/dailylove /home/dailylove/app
|
||||||
ENV NATIVE_FILE=${NATIVE_FILE}
|
|
||||||
COPY target/${NATIVE_FILE} /home/${NATIVE_FILE}/app
|
|
||||||
EXPOSE 13145
|
EXPOSE 13145
|
||||||
WORKDIR /home/${NATIVE_FILE}/out
|
WORKDIR /home/dailylove/out
|
||||||
ENTRYPOINT /home/${NATIVE_FILE}/app -XX:StartFlightRecording='filename=recording.jfr,dumponexit=true,duration=10s'
|
ENTRYPOINT /home/dailylove/app -XX:StartFlightRecording='filename=recording.jfr,dumponexit=true,duration=10s'
|
||||||
79
deploy.yaml
Normal file
79
deploy.yaml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: $APP_NAME
|
||||||
|
version: $TAG
|
||||||
|
name: $APP_NAME
|
||||||
|
namespace: dl-proj #一定要写名称空间
|
||||||
|
spec:
|
||||||
|
progressDeadlineSeconds: 600
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: $APP_NAME
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 50%
|
||||||
|
maxUnavailable: 50%
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: $APP_NAME
|
||||||
|
version: $TAG
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: aliyun-docker-hub #提前在项目下配置访问阿里云的账号密码
|
||||||
|
containers:
|
||||||
|
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:$TAG
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /test
|
||||||
|
port: 13145
|
||||||
|
timeoutSeconds: 10
|
||||||
|
failureThreshold: 30
|
||||||
|
periodSeconds: 5
|
||||||
|
imagePullPolicy: Always
|
||||||
|
name: app
|
||||||
|
ports:
|
||||||
|
- containerPort: 13145
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 99m
|
||||||
|
memory: 65Mi
|
||||||
|
terminationMessagePath: /dev/termination-log
|
||||||
|
terminationMessagePolicy: File
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "Asia/Shanghai"
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: $APP_NAME
|
||||||
|
name: $APP_NAME
|
||||||
|
namespace: dl-proj
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 13145
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 13145
|
||||||
|
selector:
|
||||||
|
app: $APP_NAME
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: $APP_NAME # ServiceAccount的名字
|
||||||
|
namespace: dl-proj # serviceaccount的namespace
|
||||||
|
labels:
|
||||||
|
app: $APP_NAME #ServiceAccount的标签
|
||||||
11
pom.xml
11
pom.xml
@@ -10,9 +10,9 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<groupId>com.bamanker</groupId>
|
<groupId>com.bamanker</groupId>
|
||||||
<artifactId>dailylove</artifactId>
|
<artifactId>dailylove</artifactId>
|
||||||
<version>v2.1-local</version>
|
<version>v2.3-local</version>
|
||||||
<name>dailyLove</name>
|
<name>dailyLove</name>
|
||||||
<description>dailylove</description>
|
<description>dailylove-forK8S</description>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
@@ -22,7 +22,8 @@
|
|||||||
<fastjson.version>2.0.25</fastjson.version>
|
<fastjson.version>2.0.25</fastjson.version>
|
||||||
<openfeign.version>4.0.4</openfeign.version>
|
<openfeign.version>4.0.4</openfeign.version>
|
||||||
<hutool.version>5.8.18</hutool.version>
|
<hutool.version>5.8.18</hutool.version>
|
||||||
<docker.private.repository>172.17.0.1:10888/my_work</docker.private.repository>
|
<docker.private.repository>registry.cn-chengdu.aliyuncs.com/bamanker</docker.private.repository>
|
||||||
|
<!-- <docker.private.repository>172.17.0.1:10888/my_work</docker.private.repository>-->
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -117,8 +118,8 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<username>bamanker</username>
|
<!-- <username>bamanker</username>-->
|
||||||
<password>Fz8803101</password>
|
<!-- <password>Fz8803101</password>-->
|
||||||
<repository>${docker.private.repository}/${project.artifactId}</repository>
|
<repository>${docker.private.repository}/${project.artifactId}</repository>
|
||||||
<tag>${project.version}</tag>
|
<tag>${project.version}</tag>
|
||||||
<buildArgs>
|
<buildArgs>
|
||||||
|
|||||||
Reference in New Issue
Block a user