add huoshan build
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 6m0s

This commit is contained in:
zyc 2026-03-19 11:19:28 +08:00
parent be656900c0
commit c1a0a477d8
5 changed files with 33 additions and 9 deletions

View File

@ -54,11 +54,10 @@ jobs:
chmod +x kubectl
mv kubectl /usr/local/bin/
- name: Deploy to K3s
uses: Azure/k8s-set-context@v3
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBE_CONFIG }}
- name: Deploy to Volcengine VKE
run: |
mkdir -p ~/.kube
echo "${{ secrets.KUBE_CONFIG_VKE }}" > ~/.kube/config
- name: Create or Update Secrets
run: |
@ -79,9 +78,15 @@ jobs:
sed -i "s|\${CI_REGISTRY_IMAGE}/video-backend:latest|${{ secrets.SWR_SERVER }}/${{ secrets.SWR_ORG }}/video-backend:latest|g" k8s/backend-deployment.yaml
sed -i "s|\${CI_REGISTRY_IMAGE}/video-web:latest|${{ secrets.SWR_SERVER }}/${{ secrets.SWR_ORG }}/video-web:latest|g" k8s/web-deployment.yaml
# Install cert-manager (skip if already installed)
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.17.1/cert-manager.yaml 2>/dev/null || true
# Wait for cert-manager to be ready
kubectl -n cert-manager wait --for=condition=Available deployment/cert-manager-webhook --timeout=120s 2>/dev/null || true
# Apply all manifests
set -o pipefail
{
kubectl apply -f k8s/cert-manager-issuer.yaml
kubectl apply -f k8s/backend-deployment.yaml
kubectl apply -f k8s/web-deployment.yaml
kubectl apply -f k8s/ingress.yaml

View File

@ -13,6 +13,8 @@ spec:
metadata:
labels:
app: video-backend
annotations:
vke.volcengine.com/burst-to-vci: "enforce"
spec:
containers:
- name: video-backend

View File

@ -0,0 +1,15 @@
# ClusterIssuer for Let's Encrypt automatic certificate generation & renewal
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: airlabsv001@gmail.com
privateKeySecretRef:
name: letsencrypt-prod-key
solvers:
- http01:
ingress:
class: alb

View File

@ -3,16 +3,16 @@ kind: Ingress
metadata:
name: video-huoshan-ingress
annotations:
kubernetes.io/ingress.class: "traefik"
kubernetes.io/ingress.class: "alb"
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-redirect: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- video-huoshan-api.airlabs.art
secretName: video-huoshan-api-tls
- hosts:
- video-huoshan-web.airlabs.art
secretName: video-huoshan-web-tls
secretName: video-huoshan-tls
rules:
- host: video-huoshan-api.airlabs.art
http:

View File

@ -13,6 +13,8 @@ spec:
metadata:
labels:
app: video-web
annotations:
vke.volcengine.com/burst-to-vci: "enforce"
spec:
containers:
- name: video-web