ci(helm): Template using kube api version

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
rjshrjndrn 2023-01-27 15:27:47 +01:00 committed by Taha Yassine Kraiem
parent 603f8c30b1
commit c3531347fe

View file

@ -8,7 +8,7 @@ on:
default: 'false'
push:
branches:
- dev
- test_ci
paths:
- ee/api/**
- api/**
@ -112,7 +112,8 @@ jobs:
# Deploy command
kubectl config set-context --namespace=app --current
kubectl config get-contexts
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks | kubectl apply -f -
k_version=$(kubectl version --short 2>/dev/null | awk '/Server/{print $NF}')
helm template openreplay -n app openreplay -f vars.yaml -f /tmp/image_override.yaml --set ingress-nginx.enabled=false --set skipMigration=true --no-hooks --kube-version=$k_version | kubectl apply -f -
env:
DOCKER_REPO: ${{ secrets.EE_REGISTRY_URL }}
# We're not passing -ee flag, because helm will add that.