chore(k8s): deploy staging apps to namespace kbs-stage
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 21m11s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 21m11s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -93,11 +93,11 @@ jobs:
|
|||||||
|
|
||||||
# Apply config (Secret) first, then deployment
|
# Apply config (Secret) first, then deployment
|
||||||
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
|
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
|
||||||
kubectl apply -f /tmp/cms-config.yaml &&
|
kubectl apply -n kbs-stage -f /tmp/cms-config.yaml &&
|
||||||
kubectl apply -f /tmp/cms-deployment.yaml &&
|
kubectl apply -n kbs-stage -f /tmp/cms-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/cms &&
|
kubectl -n kbs-stage rollout restart deployment/cms &&
|
||||||
kubectl rollout status deployment/cms --timeout=180s &&
|
kubectl -n kbs-stage rollout status deployment/cms --timeout=180s &&
|
||||||
rm -f /tmp/cms-config.yaml /tmp/cms-deployment.yaml
|
rm -f /tmp/cms-config.yaml /tmp/cms-deployment.yaml
|
||||||
"
|
"
|
||||||
echo "✅ Deployed!"
|
echo "✅ Deployed!"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ apiVersion: v1
|
|||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: cms-appsettings
|
name: cms-appsettings
|
||||||
namespace: default
|
namespace: kbs-stage
|
||||||
labels:
|
labels:
|
||||||
app: cms
|
app: cms
|
||||||
environment: staging
|
environment: staging
|
||||||
@@ -53,7 +53,7 @@ stringData:
|
|||||||
"JwtAudience": "https://localhost",
|
"JwtAudience": "https://localhost",
|
||||||
"JwtExpiryInDays": 5,
|
"JwtExpiryInDays": 5,
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DefaultConnection": "Data Source=185.252.31.44,31433; Initial Catalog=Foursat;User ID=sa;Password=87zH26nbqT;Connection Timeout=300000;MultipleActiveResultSets=True;Encrypt=False",
|
"DefaultConnection": "Data Source=mssql-svc.platform.svc.cluster.local,1433; Initial Catalog=Foursat;User ID=sa;Password=87zH26nbqT;Connection Timeout=300000;MultipleActiveResultSets=True;Encrypt=False",
|
||||||
"providerName": "System.Data.SqlClient"
|
"providerName": "System.Data.SqlClient"
|
||||||
},
|
},
|
||||||
"Otp": {
|
"Otp": {
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: cms-uploads-pvc
|
name: cms-uploads-pvc
|
||||||
namespace: default
|
namespace: kbs-stage
|
||||||
labels:
|
labels:
|
||||||
app: cms
|
app: cms
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
|
storageClassName: migrated-local
|
||||||
|
volumeName: pv-cms-uploads-migrated
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 20Gi
|
storage: 20Gi
|
||||||
@@ -20,7 +22,7 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: cms
|
name: cms
|
||||||
namespace: default
|
namespace: kbs-stage
|
||||||
labels:
|
labels:
|
||||||
app: cms
|
app: cms
|
||||||
spec:
|
spec:
|
||||||
@@ -33,10 +35,12 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: cms
|
app: cms
|
||||||
spec:
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: gitea-registry-secret
|
||||||
containers:
|
containers:
|
||||||
- name: cms
|
- name: cms
|
||||||
image: 185.252.31.44:30080/admin/cms:latest
|
image: 185.252.31.44:30080/admin/cms:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
name: http
|
name: http
|
||||||
@@ -89,7 +93,7 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: cms-svc
|
name: cms-svc
|
||||||
namespace: default
|
namespace: kbs-stage
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: cms
|
app: cms
|
||||||
@@ -107,7 +111,7 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: cms-ingress
|
name: cms-ingress
|
||||||
namespace: default
|
namespace: kbs-stage
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: "nginx"
|
kubernetes.io/ingress.class: "nginx"
|
||||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
@@ -115,6 +119,7 @@ metadata:
|
|||||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
||||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
||||||
spec:
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- cms.se.kbs1.ir
|
- cms.se.kbs1.ir
|
||||||
|
|||||||
Reference in New Issue
Block a user