Compare commits

...

23 Commits
v0.75 ... v1.02

Author SHA1 Message Date
bamanker
77a1f50115 完善了一些内容
Some checks failed
Build Push and Deploy Image / build (push) Failing after 3m59s
2025-12-25 17:43:30 +08:00
bamanker
1f7d5eb904 修改了deployment里的错别字 2025-12-25 17:42:28 +08:00
bamanker
9f4028e439 修改了deployment里的错别字
All checks were successful
Build Push and Deploy Image / build (push) Successful in 1m27s
2025-12-25 17:29:22 +08:00
bamanker
b7085d2765 修改了apply url的格式,以便访问原始文件代码
All checks were successful
Build Push and Deploy Image / build (push) Successful in 1m12s
2025-12-25 17:23:58 +08:00
bamanker
d2d3e9e3f5 修改deployment.yml文件格式,防止json转换错误1
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m29s
2025-12-25 17:01:00 +08:00
bamanker
95edbd85aa 修改deployment.yml文件格式,防止json转换错误
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m6s
2025-12-25 16:45:48 +08:00
bamanker
255baf2f3d 修改deployment.yml文件格式 2025-12-25 16:42:03 +08:00
bamanker
713a47c337 修改deployment.yml文件格式 2025-12-25 16:42:03 +08:00
bamanker
044ddf9ef1 远程k3s可以连接,测试apply指令-修改参数格式5
Some checks failed
Build Push and Deploy Image / build (push) Has been cancelled
2025-12-25 16:25:26 +08:00
bamanker
7d057843be Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	.gitea/workflows/build.yml
2025-12-25 16:20:58 +08:00
bamanker
d837507f10 远程k3s可以连接,测试apply指令-修改参数格式4
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m16s
2025-12-25 16:19:03 +08:00
bamanker
9dd0d38cf8 远程k3s可以连接,测试apply指令-修改参数格式3
Some checks failed
Build Push and Deploy Image / build (push) Failing after 24s
2025-12-25 15:37:56 +08:00
bamanker
647ee0937e 远程k3s可以连接,测试apply指令-修改参数格式2
Some checks failed
Build Push and Deploy Image / build (push) Failing after 2m12s
2025-12-25 15:15:59 +08:00
bamanker
2444817f63 远程k3s可以连接,测试apply指令-修改参数格式
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m2s
2025-12-25 15:08:03 +08:00
bamanker
6e0fe5d06b 远程k3s可以连接,测试apply指令-修改deploy文件路径1
Some checks failed
Build Push and Deploy Image / build (push) Failing after 24s
2025-12-25 15:03:25 +08:00
bamanker
38e753b473 远程k3s可以连接,测试apply指令-修改deploy文件路径
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m18s
2025-12-25 14:41:21 +08:00
bamanker
89f4565cd7 远程k3s可以连接,测试apply指令-5
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m23s
2025-12-25 14:36:51 +08:00
bamanker
2da2f058ca 远程k3s可以连接,测试apply指令-4
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m21s
2025-12-25 14:33:24 +08:00
bamanker
af34178bf5 远程k3s可以连接,测试apply指令-3
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m29s
2025-12-25 13:19:54 +08:00
bamanker
355372126f 远程k3s可以连接,测试apply指令-2
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m45s
2025-12-25 13:08:01 +08:00
bamanker
829c7b569b 远程k3s可以连接,测试apply指令-1
Some checks failed
Build Push and Deploy Image / build (push) Has been cancelled
2025-12-25 11:53:52 +08:00
bamanker
272b36d656 debug473
All checks were successful
Build Push and Deploy Image / build (push) Successful in 1m25s
2025-12-25 11:50:11 +08:00
bamanker
80341eb16c debug47
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m46s
2025-12-25 11:36:10 +08:00
2 changed files with 22 additions and 51 deletions

View File

@@ -1,54 +1,22 @@
---
## k8s默认是访问不了外部服务的需要代理,以mysql和redis为例代理myservice名称到192.168.0.100配置文件中对应的ip修改为myservice
#apiVersion: v1
#kind: Endpoints
#metadata:
# name: myservice
#subsets:
# - addresses:
# - ip: 192.168.0.100
# ports:
# - port: 6379
# protocol: TCP
# name: redis
# - port: 3306
# protocol: TCP
# name: mysql
#---
#apiVersion: v1
#kind: Service
#metadata:
# name: myservice
#spec:
# ports:
# - port: 6379
# targetPort: 6379
# protocol: TCP
# name: redis
# - port: 3306
# targetPort: 3306
# protocol: TCP
# name: mysql
#
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: myk3sTest
name: myk3s-test
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
app: myk3sTest
app: myk3s-test
template:
metadata:
labels:
app: myk3sTest
app: myk3s-test
spec:
containers:
- image: ${env.REGISTRY}/${env.IMAGE_NAME}:${steps.datetime.outputs.datetime}
name: myk3sTest
- image: registry.cn-chengdu.aliyuncs.com/bamanker/myk3stest
name: myk3s-test
imagePullPolicy: Always
readinessProbe:
httpGet:
@@ -60,13 +28,11 @@ spec:
- containerPort: 9090
imagePullSecrets:
- name: dockerhub-id
---
apiVersion: v1
kind: Service
metadata:
name: myk3sTest
name: myk3s-test
spec:
type: NodePort
externalTrafficPolicy: Local
@@ -76,4 +42,4 @@ spec:
port: 9090
nodePort: 30099
selector:
app: myk3sTest
app: myk3s-test

View File

@@ -14,7 +14,7 @@ env:
PATH: /opt/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REGISTRY: registry.cn-chengdu.aliyuncs.com
IMAGE_NAME: bamanker/myk3stest
CONTAINER_NAME: myk3stest
CONTAINER_NAME: myk3s-test
jobs:
# 构建 Job
@@ -41,7 +41,7 @@ jobs:
- name: Check java version
run: java -version
- name: Show now path
run: echo $(pwd)
run: echo $(pwd);ls
- name: Build with Maven
# 设置Maven执行权限使用maven绝对路径执行打包命令
run: /usr/local/maven/bin/mvn clean package -DskipTests -Pprod
@@ -78,12 +78,17 @@ jobs:
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
with:
config: ${{ secrets.KUBE_CONFIG }}
command: get pods
## args: apply -f http://${{ secrets.DEVOPS_GITEA_TOKEN }}@/bamanker/myk3sTest/src/branch/master/.deploy/deployment.yml
# - name: k8s Update Deployment
# uses: http://139.9.216.111:3000/bamanker/kubectl@master
# env:
# KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
# with:
# args: rollout restart deployment ${{ env.CONTAINER_NAME }}-${{ gitea.ref_name }}
command: apply -f http://139.9.216.111:3000/bamanker/myk3sTest/raw/branch/master/.deploy/deployment.yml
- name: k8s Check Pods Health
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
with:
config: ${{ secrets.KUBE_CONFIG }}
command: get pod -n default -l app=${{ env.CONTAINER_NAME }}
- name: k8s Update Deployment
uses: http://139.9.216.111:3000/bamanker/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: rollout restart deployment ${{ env.CONTAINER_NAME }}-${{ gitea.ref_name }}