Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ generate:
$(MAKE) gen-manifests
$(MAKE) fix-changed

gen-manifests: bin/helm bin/yq
gen-manifests: bin/helm
cd ./manifests && \
OPERATOR_VERSION=$(OPERATOR_VERSION) \
CALICO_VERSION=$(CALICO_VERSION) \
Expand Down Expand Up @@ -181,13 +181,13 @@ release-test:

# Currently our openstack builds either build *or* build and publish,
# hence why we have two separate jobs here that do almost the same thing.
build-openstack: bin/yq
$(eval VERSION=$(shell bin/yq '.version' charts/calico/values.yaml))
build-openstack:
$(eval VERSION=$(shell yq '.version' charts/calico/values.yaml))
$(info Building openstack packages for version $(VERSION))
$(MAKE) -C release/packaging release VERSION=$(VERSION)

publish-openstack: bin/yq
$(eval VERSION=$(shell bin/yq '.version' charts/calico/values.yaml))
publish-openstack:
$(eval VERSION=$(shell yq '.version' charts/calico/values.yaml))
$(info Publishing openstack packages for version $(VERSION))
$(MAKE) -C release/packaging release-publish VERSION=$(VERSION)

Expand All @@ -201,7 +201,7 @@ helm-index:
$(MAKE) semaphore-run-workflow

# Creates the tar file used for installing Calico on OpenShift.
bin/ocp.tgz: manifests/ocp/ bin/yq
bin/ocp.tgz: manifests/ocp/
tar czvf $@ --exclude='.gitattributes' -C manifests/ ocp

## Generates release notes for the given version.
Expand Down
7 changes: 0 additions & 7 deletions lib.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1194,13 +1194,6 @@ check-dirty:
@if [ "$$(git --no-pager diff --stat)" != "" ]; then \
echo "The following files are dirty"; git --no-pager diff; exit 1; fi

bin/yq:
mkdir -p bin
$(eval TMP := $(shell mktemp -d))
curl -sSf -L --retry 5 -o $(TMP)/yq4.tar.gz https://github.com/mikefarah/yq/releases/download/v4.34.2/yq_linux_$(BUILDARCH).tar.gz
tar -zxvf $(TMP)/yq4.tar.gz -C $(TMP)
mv $(TMP)/yq_linux_$(BUILDARCH) bin/yq

###############################################################################
# Common functions for launching a local Kubernetes control plane.
###############################################################################
Expand Down
11 changes: 5 additions & 6 deletions manifests/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@

# Helm binary to use. Default to the one installed by the Makefile.
HELM=${HELM:-../bin/helm}
YQ=${YQ:-../bin/yq}

# Get versions to install.
defaultCalicoVersion=$($YQ .version <../charts/calico/values.yaml)
defaultCalicoVersion=$(yq .version <../charts/calico/values.yaml)
CALICO_VERSION=${CALICO_VERSION:-$defaultCalicoVersion}

defaultRegistry=$($YQ .node.registry <../charts/calico/values.yaml)
defaultRegistry=$(yq .node.registry <../charts/calico/values.yaml)
REGISTRY=${REGISTRY:-$defaultRegistry}

defaultOperatorVersion=$($YQ .tigeraOperator.version <../charts/tigera-operator/values.yaml)
defaultOperatorVersion=$(yq .tigeraOperator.version <../charts/tigera-operator/values.yaml)
OPERATOR_VERSION=${OPERATOR_VERSION:-$defaultOperatorVersion}

defaultOperatorRegistry=$($YQ .tigeraOperator.registry <../charts/tigera-operator/values.yaml)
defaultOperatorRegistry=$(yq .tigeraOperator.registry <../charts/tigera-operator/values.yaml)
OPERATOR_REGISTRY=${OPERATOR_REGISTRY:-$defaultOperatorRegistry}

defaultOperatorImage=$($YQ .tigeraOperator.image <../charts/tigera-operator/values.yaml)
defaultOperatorImage=$(yq .tigeraOperator.image <../charts/tigera-operator/values.yaml)
OPERATOR_IMAGE=${OPERATOR_IMAGE:-$defaultOperatorImage}

NON_HELM_MANIFEST_IMAGES="apiserver windows ctl csi node-driver-registrar dikastes flannel-migration-controller"
Expand Down
3 changes: 1 addition & 2 deletions process/testing/winfv-felix/capz/create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ echo ' WIN_NODE_COUNT='${WIN_NODE_COUNT}
: ${KIND:=./bin/kind}
: ${KUBECTL:=./bin/kubectl}
: ${CLUSTERCTL:=./bin/clusterctl}
: ${YQ:=./bin/yq}
: ${KCAPZ:="${KUBECTL} --kubeconfig=./kubeconfig"}

# Base64 encode the variables
Expand Down Expand Up @@ -141,7 +140,7 @@ ${CLUSTERCTL} generate cluster ${CLUSTER_NAME_CAPZ} \

# Cluster templates authenticate with Workload Identity by default. Modify the AzureClusterIdentity for ServicePrincipal authentication.
# See https://capz.sigs.k8s.io/topics/identities for more details.
${YQ} -i "with(. | select(.kind == \"AzureClusterIdentity\"); .spec.type |= \"ServicePrincipal\" | .spec.clientSecret.name |= \"${AZURE_CLUSTER_IDENTITY_SECRET_NAME}\" | .spec.clientSecret.namespace |= \"${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE}\")" win-capz.yaml
yq -i "with(. | select(.kind == \"AzureClusterIdentity\"); .spec.type |= \"ServicePrincipal\" | .spec.clientSecret.name |= \"${AZURE_CLUSTER_IDENTITY_SECRET_NAME}\" | .spec.clientSecret.namespace |= \"${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE}\")" win-capz.yaml

retry_command 600 "${KUBECTL} apply -f win-capz.yaml"

Expand Down