piano-sheet: ns cube-piano-sheet → cube-piano
ns 跟 app 名解耦,workflow 加 NS env 不再 cube-$APP 拼。
This commit is contained in:
@@ -17,6 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
APP: piano-sheet
|
APP: piano-sheet
|
||||||
|
NS: cube-piano
|
||||||
IMAGE: registry.famzheng.me/mochi/piano-sheet
|
IMAGE: registry.famzheng.me/mochi/piano-sheet
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -51,5 +52,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Roll out to k3s
|
- name: Roll out to k3s
|
||||||
run: |
|
run: |
|
||||||
kubectl -n "cube-$APP" set image "deploy/$APP" "$APP=$IMAGE:${{ steps.tag.outputs.sha }}"
|
kubectl -n "$NS" set image "deploy/$APP" "$APP=$IMAGE:${{ steps.tag.outputs.sha }}"
|
||||||
kubectl -n "cube-$APP" rollout status "deploy/$APP" --timeout=120s
|
kubectl -n "$NS" rollout status "deploy/$APP" --timeout=120s
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: piano-sheet
|
name: piano-sheet
|
||||||
namespace: cube-piano-sheet
|
namespace: cube-piano
|
||||||
labels:
|
labels:
|
||||||
app: piano-sheet
|
app: piano-sheet
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: piano-sheet
|
name: piano-sheet
|
||||||
namespace: cube-piano-sheet
|
namespace: cube-piano
|
||||||
annotations:
|
annotations:
|
||||||
# 上传整组图片可能 ~600MB,调高 traefik 默认上限
|
# 上传整组图片可能 ~600MB,调高 traefik 默认上限
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: cube-piano-sheet-bodylimit@kubernetescrd
|
traefik.ingress.kubernetes.io/router.middlewares: cube-piano-bodylimit@kubernetescrd
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: traefik
|
ingressClassName: traefik
|
||||||
rules:
|
rules:
|
||||||
@@ -24,7 +24,7 @@ apiVersion: traefik.io/v1alpha1
|
|||||||
kind: Middleware
|
kind: Middleware
|
||||||
metadata:
|
metadata:
|
||||||
name: bodylimit
|
name: bodylimit
|
||||||
namespace: cube-piano-sheet
|
namespace: cube-piano
|
||||||
spec:
|
spec:
|
||||||
buffering:
|
buffering:
|
||||||
maxRequestBodyBytes: 700000000
|
maxRequestBodyBytes: 700000000
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: cube-piano-sheet
|
name: cube-piano
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: piano-sheet-data
|
name: piano-sheet-data
|
||||||
namespace: cube-piano-sheet
|
namespace: cube-piano
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: piano-sheet
|
name: piano-sheet
|
||||||
namespace: cube-piano-sheet
|
namespace: cube-piano
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: piano-sheet
|
app: piano-sheet
|
||||||
|
|||||||
Reference in New Issue
Block a user