-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: parameterize the helm chart namespace value (#351)
Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
- Loading branch information
1 parent
8a2f6e1
commit 6d1c0a5
Showing
30 changed files
with
200 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
dependencies: | ||
- name: hedera-explorer | ||
repository: "" | ||
version: 0.2.0 | ||
- name: hedera-mirror | ||
repository: https://hashgraph.github.io/hedera-mirror-node/charts | ||
version: 0.86.0 | ||
- name: tenant | ||
repository: https://operator.min.io/ | ||
version: 5.0.6 | ||
digest: sha256:d1145f65bba0cb295b33e94b0fdc79d80bf06d22cf2606061d0c1462800d3ae7 | ||
generated: "2023-08-09T09:52:59.515466+10:00" | ||
version: 5.0.7 | ||
digest: sha256:cf355b295abceb5814ef57d3e146ec9d4e8db7365a700079d683bd5f766ad374 | ||
generated: "2023-09-16T13:47:19.087992+10:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | ||
readonly SCRIPT_DIR | ||
readonly DOCKERFILE_DIR="${SCRIPT_DIR}/../../docker" | ||
readonly LOCAL_DOCKER_REGISTRY="docker.fst.local" # same as in dev/ci/ci-values.yaml | ||
readonly LOCAL_DOCKER_IMAGE_TAG="local" | ||
CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | ||
source "${CUR_DIR}/env.sh" | ||
setup_kubectl_context | ||
|
||
readonly KUBECTL_BATS_IMAGE="${LOCAL_DOCKER_REGISTRY}/kubectl-bats:${LOCAL_DOCKER_IMAGE_TAG}" | ||
|
||
function build_kubectl_bats() { | ||
local cluster_name=$1 | ||
local cluster_name=$1 | ||
[[ -z "${cluster_name}" ]] && echo "ERROR: Cluster name is required" && return 1 | ||
[[ -z "${CLUSTER_NAME}" ]] && echo "ERROR: [build_kubectl_bats] Cluster name is required" && return 1 | ||
|
||
echo "" | ||
echo "Building kubectl-bats image" | ||
echo "-----------------------------------------------------------------------------------------------------" | ||
cd "${DOCKERFILE_DIR}/kubectl-bats" && docker build -t "${KUBECTL_BATS_IMAGE}" . | ||
kind load docker-image ${KUBECTL_BATS_IMAGE} -n "${cluster_name}" | ||
kind load docker-image "${KUBECTL_BATS_IMAGE}" -n "${CLUSTER_NAME}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env bash | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | ||
|
||
readonly SCRIPT_DIR | ||
readonly TMP_DIR="${SCRIPT_DIR}/../temp" | ||
readonly CHART_DIR="${SCRIPT_DIR}/../../charts/hedera-network" | ||
|
||
|
||
# telemetry related env variables | ||
readonly GATEWAY_API_DIR="${SCRIPT_DIR}/../gateway-api" | ||
readonly TELEMETRY_DIR="${SCRIPT_DIR}/../telemetry" | ||
readonly PROMETHEUS_DIR="${TELEMETRY_DIR}/prometheus" | ||
readonly PROMETHEUS_VERSION=v0.67.1 | ||
readonly PROMETHEUS_OPERATOR_YAML="${PROMETHEUS_DIR}/prometheus-operator.yaml" | ||
readonly PROMETHEUS_YAML="${PROMETHEUS_DIR}/prometheus.yaml" | ||
readonly PROMETHEUS_RBAC_YAML="${PROMETHEUS_DIR}/prometheus-rbac.yaml" | ||
readonly PROMETHEUS_EXAMPLE_APP_YAML="${PROMETHEUS_DIR}/example-app.yaml" | ||
|
||
# docker build related env variables | ||
readonly DOCKERFILE_DIR="${SCRIPT_DIR}/../../docker" | ||
readonly LOCAL_DOCKER_REGISTRY="docker.fst.local" # same as in dev/ci/ci-values.yaml | ||
readonly LOCAL_DOCKER_IMAGE_TAG="local" | ||
|
||
function setup_temp_dir() { | ||
if [ ! -f "${TMP_DIR}/.env" ]; then \ | ||
echo "Creating .env file from template.env" | ||
cp "${SCRIPT_DIR}/template.env" "${TMP_DIR}/.env" | ||
echo "File list in ${TMP_DIR}" | ||
ls -la "${TMP_DIR}" | ||
fi | ||
} | ||
|
||
function load_env_file() { | ||
if [ -f "${TMP_DIR}/.env" ]; then \ | ||
set -a | ||
# shellcheck source=./../temp/.env | ||
source "${TMP_DIR}/.env" | ||
set +a | ||
fi | ||
} | ||
|
||
function setup_kubectl_context() { | ||
load_env_file | ||
[[ -z "${CLUSTER_NAME}" ]] && echo "ERROR: Cluster name is required" && return 1 | ||
[[ -z "${NAMESPACE}" ]] && echo "ERROR: Namespace name is required" && return 1 | ||
|
||
kubectl get ns "${NAMESPACE}" &>/dev/null | ||
if [[ $? -ne 0 ]]; then | ||
kubectl create ns "${NAMESPACE}" | ||
fi | ||
|
||
echo "List of namespaces:" | ||
kubectl get ns | ||
|
||
echo "Setting kubectl context..." | ||
kubectl config use-context "kind-${CLUSTER_NAME}" | ||
kubectl config set-context --current --namespace="${NAMESPACE}" | ||
kubectl config get-contexts | ||
} | ||
|
||
function setup() { | ||
setup_temp_dir | ||
load_env_file | ||
} | ||
|
||
setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.