Skip to content

Commit

Permalink
Merge pull request #1 from isovalent/pr/bmcustodio/helm-extra-args
Browse files Browse the repository at this point in the history
Support passing extra args to Helm.
  • Loading branch information
bmcustodio authored Nov 28, 2022
2 parents a57bd81 + 8dfcd40 commit db33cf4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ locals {
provisioner_environment = merge(var.extra_provisioner_environment_variables, local.provisioner_environment_variables) // The full set of environment variables passed to the provisioning script.
provisioner_environment_variables = { // The set of environment variables set by this module on the provisioning script.
CILIUM_HELM_CHART = var.cilium_helm_chart, // The Cilium Helm chart to deploy.
CILIUM_HELM_EXTRA_ARGS = var.cilium_helm_extra_args // Extra arguments to be passed to the 'helm upgrade --install' command that installs Cilium.
CILIUM_HELM_RELEASE_NAME = var.cilium_helm_release_name, // The name to use for the Cilium Helm release.
CILIUM_HELM_VALUES_FILE = var.cilium_helm_values_file_path, // The path to the Helm values file to use when installing Cilium.
CILIUM_HELM_VERSION = var.cilium_helm_version, // The version of the Cilium Helm chart to deploy.
Expand Down
2 changes: 1 addition & 1 deletion scripts/provisioner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ helm repo update
# Replace variables in the values file and pipe it to 'helm upgrade --install'.
envsubst < "${CILIUM_HELM_VALUES_FILE}" | \
helm upgrade --install "${CILIUM_HELM_RELEASE_NAME}" "${CILIUM_HELM_CHART}" \
--version "${CILIUM_HELM_VERSION}" -n "${CILIUM_NAMESPACE}" -f /dev/stdin
--version "${CILIUM_HELM_VERSION}" -n "${CILIUM_NAMESPACE}" -f /dev/stdin ${CILIUM_HELM_EXTRA_ARGS}

# Run any post-install script we may have been provided with.
if [[ "${POST_CILIUM_INSTALL_SCRIPT}" != "" ]];
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ variable "cilium_helm_chart" {
type = string
}

variable "cilium_helm_extra_args" {
default = ""
description = "Extra arguments to be passed to the 'helm upgrade --install' command that installs Cilium."
type = string
}

variable "cilium_helm_release_name" {
default = "cilium"
description = "The name of the Helm release to use for Cilium."
Expand Down

0 comments on commit db33cf4

Please sign in to comment.