WIFI-13821 rework gh CGW deploy action-4

Signed-off-by: Carsten Schafer <Carsten.Schafer@kinarasystems.com>
This commit is contained in:
Carsten Schafer
2024-09-19 08:46:28 -04:00
parent 42f8553c4e
commit 5e182920fe

View File

@@ -108,11 +108,9 @@ jobs:
ref: ${{ env.VERSION }}
- name: Fetch kubeconfig
env:
AWS_EKS_NAME: ${{ github.events.inputs.cluster }}
AWS_DEFAULT_REGION: ${{ github.events.inputs.region }}
run: |
aws eks update-kubeconfig --name "$AWS_EKS_NAME"
export AWS_DEFAULT_REGION=${{ github.events.inputs.region }}
aws eks update-kubeconfig --name ${{ github.events.inputs.cluster }}
- name: Install kubectl, helmfile and plugins
run: |
@@ -138,42 +136,32 @@ jobs:
- name: Deploy OpenLAN Cloud Gateway and services
if: ${{ github.event.inputs.upgrade }} == "false"
working-directory: wlan-cloud-ucentral-deploy/cgw
env:
IMG_TAG: ${{ github.events.inputs.cgw_image }}
CONFIG_NAME: ${{ github.events.inputs.config_name }}
NAMESPACE: ${{ github.events.inputs.namespace }}
run: |
helm ls -n $NAMESPACE
helm ls -n ${{ github.events.inputs.namespace }}
echo "If already installed then it may not be possible to upgrade service components"
helmfile --environment $CONFIG_NAME \
--state-values-set "cgw.tag=$IMG_TAG" \
helmfile --environment ${{ github.events.inputs.config_name }} \
--state-values-set "cgw.tag=${{ github.events.inputs.cgw_image }}" \
apply
- name: Deploy OpenLAN Cloud Gateway only
if: ${{ github.event.inputs.upgrade }} == "true"
working-directory: wlan-cloud-ucentral-deploy/cgw
env:
IMG_TAG: ${{ github.events.inputs.cgw_image }}
CONFIG_NAME: ${{ github.events.inputs.config_name }}
NAMESPACE: ${{ github.events.inputs.namespace }}
run: |
helm ls -n $NAMESPACE
helmfile --environment $CONFIG_NAME -l app=cgw \
--state-values-set "cgw.tag=$IMG_TAG" \
helm ls -n {{ github.events.inputs.namespace }}
helmfile --environment ${{ github.events.inputs.config_name }} -l app=cgw \
--state-values-set "cgw.tag=${{ github.events.inputs.cgw_image }}" \
apply
- name: Show resource state on deployment failure
if: failure()
env:
NAMESPACE: ${{ github.events.inputs.namespace }}
run: |
echo "Deploy/STS:"
kubectl get deploy,sts --namespace $NAMESPACE -o wide
kubectl get deploy,sts --namespace {{ github.events.inputs.namespace }} -o wide
echo "Pods:"
kubectl get pods --namespace $NAMESPACE -o wide
kubectl get pods --namespace {{ github.events.inputs.namespace }} -o wide
echo "Pod Descriptions:"
kubectl describe pods --namespace $NAMESPACE
kubectl describe pods --namespace {{ github.events.inputs.namespace }}
echo "Services:"
kubectl get services --namespace $NAMESPACE -o wide
kubectl get services --namespace {{ github.events.inputs.namespace }} -o wide
echo "Service Descriptions:"
kubectl describe services --namespace $NAMESPACE
kubectl describe services --namespace {{ github.events.inputs.namespace }}