-
Notifications
You must be signed in to change notification settings - Fork 168
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
fix quickstart dns sans #2485
fix quickstart dns sans #2485
Conversation
pull_request: | ||
paths: | ||
- 'quickstart/**' | ||
branches: |
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.
stop waiting for quickstart files to change so this runs earlier in the ziti life cycle
@@ -1,5 +1,9 @@ | |||
#!/bin/bash | |||
|
|||
set -o errexit |
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.
raise uncaught exceptions
@@ -32,6 +36,9 @@ if [[ "${_ZITI_ROUTER_NAME}" != "" ]]; then | |||
fi | |||
|
|||
_CONFIG_PATH="${ZITI_HOME}/${ZITI_ROUTER_NAME}.yaml" | |||
# Set an error trap to move _CONFIG_PATH when it's unsafe to assume enrollment succeeded | |||
trap '[[ -f "${_CONFIG_PATH}" ]] && mv "${_CONFIG_PATH}" "${_CONFIG_PATH}.err"' ERR |
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.
make the script more resilient against bad state problems resulting from an incomplete run
@@ -55,8 +62,8 @@ if [ ! -f "${_CONFIG_PATH}" ]; then | |||
createPrivateRouterConfig "${ZITI_ROUTER_NAME}" | |||
fi | |||
|
|||
found=$("${ZITI_BIN_DIR-}/ziti" edge list edge-routers 'name = "'"${ZITI_ROUTER_NAME}"'"' | grep -c "${ZITI_ROUTER_NAME}") | |||
if [[ found -gt 0 ]]; then |
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.
[[ found -gt 0 ]]
is always false
@@ -784,17 +784,18 @@ function createPki { | |||
_pki_create_intermediate "${ZITI_GRANDPARENT_INTERMEDIATE}" "${ZITI_PKI_SIGNER_INTERMEDIATE_NAME}" 1 | |||
|
|||
echo " " | |||
pki_allow_list="localhost,${ZITI_NETWORK}" | |||
ctrl_pki_allow_list="localhost,${ZITI_NETWORK}" |
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.
keep ctrl and edge DNS SANs separate
No description provided.