chore(k8s): deploy staging apps to namespace kbs-stage
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 29s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 29s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -73,10 +73,10 @@ jobs:
|
||||
|
||||
# Apply manifests and restart
|
||||
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 &&
|
||||
kubectl rollout restart deployment/frontoffice &&
|
||||
kubectl rollout status deployment/frontoffice --timeout=180s &&
|
||||
kubectl -n kbs-stage rollout restart deployment/frontoffice &&
|
||||
kubectl -n kbs-stage rollout status deployment/frontoffice --timeout=180s &&
|
||||
rm -f /tmp/frontoffice-deployment.yaml
|
||||
"
|
||||
echo "✅ Deployed!"
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontoffice
|
||||
namespace: default
|
||||
namespace: kbs-stage
|
||||
labels:
|
||||
app: frontoffice
|
||||
environment: staging
|
||||
@@ -21,7 +21,7 @@ spec:
|
||||
containers:
|
||||
- name: frontoffice
|
||||
image: 185.252.31.44:30080/admin/frontoffice:latest
|
||||
imagePullPolicy: Always
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
@@ -43,7 +43,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontoffice-svc
|
||||
namespace: default
|
||||
namespace: kbs-stage
|
||||
labels:
|
||||
app: frontoffice
|
||||
spec:
|
||||
@@ -54,3 +54,31 @@ spec:
|
||||
targetPort: 80
|
||||
name: http
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user