-
Notifications
You must be signed in to change notification settings - Fork 5
Allow overriding image registry and Helm chart sources in NetBox deploy script #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ry instead of public repositories for binaries and helm charts
…PACE passed as an argument
…PACE passed as an argument
…is is set, otherwise, don't pass the flag and use the default one from the chart
…if this is set, otherwise, don't pass the flag and use the default one from the chart
# Conflicts: # kind/deploy-netbox.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the netbox-db.yaml the field 'dockerImage' can be added to the spec, to define which image to use for the netbox-db pod. Otherwise it will fail with ImagePullBackOff error.
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
|
||
# Allow override via environment variable, otherwise fallback to default | ||
NETBOX_HELM_CHART="${NETBOX_HELM_CHART:-https://github.com/netbox-community/netbox-chart/releases/download/netbox-5.0.0-beta.169/netbox-5.0.0-beta.169.tgz}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NETBOX_HELM_CHART="${NETBOX_HELM_CHART:-https://github.com/netbox-community/netbox-chart/releases/download/netbox-5.0.0-beta.169/netbox-5.0.0-beta.169.tgz}" | |
NETBOX_HELM_CHART="${NETBOX_HELM_REPO:-https://github.com/}netbox-community/netbox-chart/releases/download/netbox-5.0.0-beta.169/netbox-5.0.0-beta.169.tgz" |
like this the version does not need to be updated manually in the environment variable but it's managed by the script.
# Build optional set flag if registry is not defined | ||
REGISTRY_ARG="" | ||
if [ -n "$NETBOX_IMAGE_REGISTRY" ]; then | ||
REGISTRY_ARG="--set image.registry=$NETBOX_IMAGE_REGISTRY" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REGISTRY_ARG="--set image.registry=$NETBOX_IMAGE_REGISTRY" | |
REGISTRY_ARG="--set global.imageRegistry=$NETBOX_IMAGE_REGISTRY --set global.security.allowInsecureImages=true" |
This PR updates the
deploy-netbox.sh
script to make it agnostic of any specific image repository or Artifactory instance.By exporting the following variables, users can override default URLs and images to point to their repositories: