summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorjannfis <jann@mistrust.net>2020-08-18 09:22:36 +0200
committerGitHub <noreply@github.com>2020-08-18 09:22:36 +0200
commit0538ec33f502f5e8209b3c218084c66c6980a782 (patch)
tree2aae58d8574a3f424d79fd61fb2f62634130b1f5 /hack
parentae81a7ad9736dbefe6e4c247f2ca020582724760 (diff)
fix: Use Kustomize v2 for manifest generation to support kubectl apply -k (#62)
* fix: Use Kustomize v2 for manifest generation to support kubectl apply -k * Adapt GH workflow to check for manifest changes * Fix curl flag * Download curl to appropriate location * Use bash shell for manifest generation
Diffstat (limited to 'hack')
-rwxr-xr-xhack/generate-manifests.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/hack/generate-manifests.sh b/hack/generate-manifests.sh
index 3a9ed63..91bec84 100755
--- a/hack/generate-manifests.sh
+++ b/hack/generate-manifests.sh
@@ -1,10 +1,12 @@
-#!/bin/sh
+#!/usr/bin/env bash
set -eo pipefail
set -x
SRCROOT="$( CDPATH='' cd -- "$(dirname "$0")/.." && pwd -P )"
-KUSTOMIZE="kustomize"
+# Make sure that KUSTOMIZE points to a v2 - we need that to support the kubectl
+# integration.
+KUSTOMIZE=${KUSTOMIZE:-kustomize2}
TEMPFILE=$(mktemp /tmp/aic-manifests.XXXXXX)
IMAGE_NAMESPACE="${IMAGE_NAMESPACE:-argoprojlabs}"
@@ -23,7 +25,7 @@ if [ "$IMAGE_TAG" = "" ]; then
IMAGE_TAG=latest
fi
-cd ${SRCROOT}/manifests/base && kustomize edit set image argoprojlabs/argocd-image-updater=${IMAGE_NAMESPACE}/argocd-image-updater:${IMAGE_TAG}
+cd ${SRCROOT}/manifests/base && ${KUSTOMIZE} edit set image ${IMAGE_NAMESPACE}/argocd-image-updater:${IMAGE_TAG}
cd ${SRCROOT}/manifests/base && ${KUSTOMIZE} build . > ${TEMPFILE}
mv ${TEMPFILE} ${SRCROOT}/manifests/install.yaml