Skip to content
Merged
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
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
VERSION = $(shell ./control-plane/build-support/scripts/version.sh control-plane/version/version.go)
CONSUL_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-version.sh charts/consul/values.yaml)
CONSUL_ENTERPRISE_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-enterprise-version.sh charts/consul/values.yaml)
CONSUL_DATAPLANE_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-dataplane-version.sh charts/consul/values.yaml)

# ===========> Helm Targets
Expand Down Expand Up @@ -152,6 +153,9 @@ version:
consul-version:
@echo $(CONSUL_IMAGE_VERSION)

consul-enterprise-version:
@echo $(CONSUL_ENTERPRISE_IMAGE_VERSION)

consul-dataplane-version:
@echo $(CONSUL_DATAPLANE_IMAGE_VERSION)

Expand Down
4 changes: 2 additions & 2 deletions charts/consul/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: consul
version: 0.49.7-dev
appVersion: 1.13.7
appVersion: 1.13-dev
kubeVersion: ">=1.21.0-0"
description: Official HashiCorp Consul Chart
home: https://www.consul.io
Expand All @@ -13,7 +13,7 @@ annotations:
artifacthub.io/prerelease: true
artifacthub.io/images: |
- name: consul
image: hashicorp/consul:1.13.7
image: docker.mirror.hashicorp.services/hashicorppreview/consul:1.13-dev
- name: consul-k8s-control-plane
image: docker.mirror.hashicorp.services/hashicorppreview/consul-k8s-control-plane:0.49.7-dev
- name: envoy
Expand Down
2 changes: 1 addition & 1 deletion charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ global:
# image: "hashicorp/consul-enterprise:1.10.0-ent"
# ```
# @default: hashicorp/consul:<latest version>
image: "hashicorp/consul:1.13.8"
image: docker.mirror.hashicorp.services/hashicorppreview/consul:1.13-dev

# Array of objects containing image pull secret names that will be applied to each service account.
# This can be used to reference image pull secrets if using a custom consul or consul-k8s-control-plane Docker image.
Expand Down
11 changes: 3 additions & 8 deletions control-plane/build-support/functions/10-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -629,13 +629,8 @@ function update_version_helm {
sed_i ${SED_EXT} -e "s/(version:[[:space:]]*)[^\"]*/\1${full_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(appVersion:[[:space:]]*)[^\"]*/\1${full_consul_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(image:.*\/consul-k8s-control-plane:)[^\"]*/image: $4${full_version}/g" "${cfile}"
if ! test -z "$3"; then
sed_i ${SED_EXT} -e "s/(image:.*\/consul:)[^\"]*/image: $6:${full_consul_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(image:.*\/consul:)[^\"]*/image: $6:${full_consul_version}/g" "${vfile}"
else
sed_i ${SED_EXT} -e "s/(image:.*\/consul-enterprise:)[^\"]*/image: $6:${full_consul_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(image:.*\/consul-enterprise:)[^\"]*/image: $6:${full_consul_version}/g" "${vfile}"
fi
sed_i ${SED_EXT} -e "s/(image:.*\/consul:)[^\"]*/image: $6:${full_consul_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(image:.*\/consul:)[^\"]*/image: $6:${full_consul_version}/g" "${vfile}"

if test -z "$3"; then
sed_i ${SED_EXT} -e "s/(artifacthub.io\/prerelease:[[:space:]]*)[^\"]*/\1false/g" "${cfile}"
Expand Down Expand Up @@ -772,7 +767,7 @@ function prepare_dev {
# * - error

echo "prepare_dev: dir:$1 consul-k8s:$5 consul:$6 date:"$3" mode:dev"
set_version "$1" "$5" "$3" "dev" "docker.mirror.hashicorp.services\/hashicorppreview\/consul-k8s-control-plane:" "$6" "docker.mirror.hashicorp.services\/hashicorppreview\/consul-enterprise"
set_version "$1" "$5" "$3" "dev" "docker.mirror.hashicorp.services\/hashicorppreview\/consul-k8s-control-plane:" "$6" "docker.mirror.hashicorp.services\/hashicorppreview\/consul"

return 0
}
Expand Down
11 changes: 11 additions & 0 deletions control-plane/build-support/scripts/consul-enterprise-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
FILE=$1
VERSION=$(yq .global.image $FILE)

if [[ !"${VERSION}" == *"consul:"* ]]; then
VERSION=$(echo ${VERSION} | sed "s/consul:/consul-enterprise:/g")
fi

echo "${VERSION}"
4 changes: 4 additions & 0 deletions control-plane/build-support/scripts/consul-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
FILE=$1
VERSION=$(yq .global.image $FILE)

if [[ "${VERSION}" == *"consul-enterprise:"* ]]; then
VERSION=$(echo ${VERSION} | sed "s/consul-enterprise:/consul:/g")
fi

echo "${VERSION}"