diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index a1ce826..d0153ee 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -179,9 +179,9 @@ jobs: $KUBECTL -n ecommerce set image deployment/backend-$INACTIVE_TRACK \ backend=$REGISTRY/backend:$TAG - $KUBECTL -n ecommerce rollout status deployment/backend-$INACTIVE_TRACK --timeout=120s + $KUBECTL -n ecommerce rollout status deployment/backend-$INACTIVE_TRACK --timeout=10m $KUBECTL -n ecommerce patch svc backend \ -p '{"spec":{"selector":{"app":"backend","track":"'"$INACTIVE_TRACK"'"}}}' - $KUBECTL -n ecommerce rollout status deployment/frontend --timeout=120s \ No newline at end of file + $KUBECTL -n ecommerce rollout status deployment/frontend --timeout=10m \ No newline at end of file diff --git a/k8s/ecommerce/05-mysql-statefulset.yml b/k8s/ecommerce/05-mysql-statefulset.yml index c72d2cc..b909c1b 100644 --- a/k8s/ecommerce/05-mysql-statefulset.yml +++ b/k8s/ecommerce/05-mysql-statefulset.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: mysql - image: mysql:8.0 + image: registry.cn-hangzhou.aliyuncs.com/library/mysql:8.0 ports: - name: mysql containerPort: 3306 diff --git a/k8s/ecommerce/11-backend-blue-deployment.yml b/k8s/ecommerce/11-backend-blue-deployment.yml index 9f828b7..c2733a5 100644 --- a/k8s/ecommerce/11-backend-blue-deployment.yml +++ b/k8s/ecommerce/11-backend-blue-deployment.yml @@ -41,6 +41,13 @@ spec: secretKeyRef: name: mysql-secret key: MYSQL_PASSWORD + startupProbe: + httpGet: + path: /actuator/health + port: 8080 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 60 readinessProbe: httpGet: path: /actuator/health diff --git a/k8s/ecommerce/12-backend-green-deployment.yml b/k8s/ecommerce/12-backend-green-deployment.yml index 780a6a1..771dc0a 100644 --- a/k8s/ecommerce/12-backend-green-deployment.yml +++ b/k8s/ecommerce/12-backend-green-deployment.yml @@ -41,6 +41,13 @@ spec: secretKeyRef: name: mysql-secret key: MYSQL_PASSWORD + startupProbe: + httpGet: + path: /actuator/health + port: 8080 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 60 readinessProbe: httpGet: path: /actuator/health