diff --git a/locals.tf b/locals.tf index 6f189b9..9446966 100644 --- a/locals.tf +++ b/locals.tf @@ -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. diff --git a/scripts/provisioner.sh b/scripts/provisioner.sh index a582ccc..d367ae3 100755 --- a/scripts/provisioner.sh +++ b/scripts/provisioner.sh @@ -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}" != "" ]]; diff --git a/variables.tf b/variables.tf index 03d7ff6..d227ba1 100644 --- a/variables.tf +++ b/variables.tf @@ -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."