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
|
||||
MAINTAINER bamanker
|
||||
ARG NATIVE_FILE
|
||||
ENV NATIVE_FILE=${NATIVE_FILE}
|
||||
COPY target/${NATIVE_FILE} /home/${NATIVE_FILE}/app
|
||||
COPY target/dailylove /home/dailylove/app
|
||||
EXPOSE 13145
|
||||
WORKDIR /home/${NATIVE_FILE}/out
|
||||
ENTRYPOINT /home/${NATIVE_FILE}/app -XX:StartFlightRecording='filename=recording.jfr,dumponexit=true,duration=10s'
|
||||
WORKDIR /home/dailylove/out
|
||||
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>
|
||||
<groupId>com.bamanker</groupId>
|
||||
<artifactId>dailylove</artifactId>
|
||||
<version>v2.1-local</version>
|
||||
<version>v2.3-local</version>
|
||||
<name>dailyLove</name>
|
||||
<description>dailylove</description>
|
||||
<description>dailylove-forK8S</description>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
@@ -22,7 +22,8 @@
|
||||
<fastjson.version>2.0.25</fastjson.version>
|
||||
<openfeign.version>4.0.4</openfeign.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>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -117,8 +118,8 @@
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<username>bamanker</username>
|
||||
<password>Fz8803101</password>
|
||||
<!-- <username>bamanker</username>-->
|
||||
<!-- <password>Fz8803101</password>-->
|
||||
<repository>${docker.private.repository}/${project.artifactId}</repository>
|
||||
<tag>${project.version}</tag>
|
||||
<buildArgs>
|
||||
|
||||
Reference in New Issue
Block a user