环境变量传递
Some checks failed
Build Push and Deploy Image / build (push) Failing after 4s

This commit is contained in:
bamanker
2025-12-25 23:57:33 +08:00
parent 77a1f50115
commit 6d9fba8ea8
2 changed files with 39 additions and 15 deletions

View File

@@ -2,27 +2,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: myk3s-test
labels:
app: $APP_NAME
version: $APP_TAG
name: $APP_NAME
namespace: default
spec:
replicas: 2
revisionHistoryLimit: 3
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: myk3s-test
app: $APP_NAME
strategy:
rollingUpdate:
maxSurge: 50%
maxUnavailable: 50%
type: RollingUpdate
template:
metadata:
labels:
app: myk3s-test
app: $APP_NAME
version: $APP_TAG
spec:
containers:
- image: registry.cn-chengdu.aliyuncs.com/bamanker/myk3stest
name: myk3s-test
- image: registry.cn-chengdu.aliyuncs.com/bamanker/myk3stest:$APP_TAG #$REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME
name: $APP_NAME
imagePullPolicy: Always
readinessProbe:
httpGet:
path: /actuator/health
port: 9090
initialDelaySeconds: 1
timeoutSeconds: 10
failureThreshold: 30
successThreshold: 5
ports:
- containerPort: 9090
@@ -32,14 +45,17 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: myk3s-test
labels:
app: $APP_NAME
name: $APP_NAME
namespace: default
spec:
type: NodePort
externalTrafficPolicy: Local
ports:
- name: http-8080
- name: http
protocol: TCP
port: 9090
nodePort: 30099
nodePort: 9090
selector:
app: myk3s-test
app: $APP_NAME