chore(k8s): deploy staging apps to namespace kbs-stage
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 29s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
masoodafar-web
2026-09-24 21:26:19 +03:30
parent 955736d345
commit c2c07c6b89
2 changed files with 34 additions and 6 deletions
+3 -3
View File
@@ -73,10 +73,10 @@ jobs:
# Apply manifests and restart # Apply manifests and restart
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} " sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
kubectl apply -f /tmp/frontoffice-deployment.yaml && kubectl apply -n kbs-stage -f /tmp/frontoffice-deployment.yaml &&
crictl rmi ${REGISTRY}/${IMAGE_NAME}:latest 2>/dev/null || true && crictl rmi ${REGISTRY}/${IMAGE_NAME}:latest 2>/dev/null || true &&
kubectl rollout restart deployment/frontoffice && kubectl -n kbs-stage rollout restart deployment/frontoffice &&
kubectl rollout status deployment/frontoffice --timeout=180s && kubectl -n kbs-stage rollout status deployment/frontoffice --timeout=180s &&
rm -f /tmp/frontoffice-deployment.yaml rm -f /tmp/frontoffice-deployment.yaml
" "
echo "✅ Deployed!" echo "✅ Deployed!"
+31 -3
View File
@@ -4,7 +4,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: frontoffice name: frontoffice
namespace: default namespace: kbs-stage
labels: labels:
app: frontoffice app: frontoffice
environment: staging environment: staging
@@ -21,7 +21,7 @@ spec:
containers: containers:
- name: frontoffice - name: frontoffice
image: 185.252.31.44:30080/admin/frontoffice:latest image: 185.252.31.44:30080/admin/frontoffice:latest
imagePullPolicy: Always imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 - containerPort: 80
name: http name: http
@@ -43,7 +43,7 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: frontoffice-svc name: frontoffice-svc
namespace: default namespace: kbs-stage
labels: labels:
app: frontoffice app: frontoffice
spec: spec:
@@ -54,3 +54,31 @@ spec:
targetPort: 80 targetPort: 80
name: http name: http
type: ClusterIP type: ClusterIP
---
# FrontOffice Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: frontoffice-ingress
namespace: kbs-stage
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- frontoffice.se.kbs1.ir
secretName: frontoffice-tls
rules:
- host: frontoffice.se.kbs1.ir
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: frontoffice-svc
port:
number: 80