From 9edbb14614ac228bc422531ad4821724de96d34a Mon Sep 17 00:00:00 2001 From: Leo J <153937047+leiicamundi@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:35:28 +0100 Subject: [PATCH] fix readme --- README.md | 29 +++++++++++++++-------------- checks/kube/connectivity.sh | 2 +- checks/kube/deployment.sh | 2 ++ checks/zeebe/connectivity.sh | 17 +++++++++-------- checks/zeebe/token.sh | 10 +++++----- 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index f5a9284..cc2908d 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ It checks for the presence of services and ingresses that conform to the require ##### Usage: ```bash -Usage: ./checks/kube/connectivity.sh [-h] [-n NAMESPACE] [-d HELM_DEPLOYMENT_NAME] +Usage: ./checks/kube/connectivity.sh [-h] [-n NAMESPACE] Options: -h Display this help message -n NAMESPACE Specify the namespace to use @@ -136,17 +136,17 @@ This script retrieves an access token from an authorization server using client ##### Usage: ```bash -Usage: ./checks/zeebe/token.sh [-h] [-a AUTH_SERVER_URL] [-i CLIENT_ID] [-s CLIENT_SECRET] [-u TOKEN_AUDIENCE] +Usage: ./checks/zeebe/token.sh [-h] [-a ZEEBE_AUTHORIZATION_SERVER_URL] [-i ZEEBE_CLIENT_ID] [-s ZEEBE_CLIENT_SECRET] [-u ZEEBE_TOKEN_AUDIENCE] + [-k] [-r CACERT] [-j CLIENTCERT] Options: -h Display this help message - -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g.: https://local.distro.ultrawombat.com/auth/realms/camunda-platform/protocol/openid-connect/t -oken) + -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g., https://local.distro.ultrawombat.com/auth/realms/camunda-platform/protocol/openid-connect/token) -i ZEEBE_CLIENT_ID Specify the client ID -s ZEEBE_CLIENT_SECRET Specify the client secret -u ZEEBE_TOKEN_AUDIENCE Specify the token audience -k Skip TLS verification (insecure mode) - -r CACERT Specify the path to CA certificate file - -j CLIENTCERT Specify the path to client certificate file + -r CACERT Specify the path to the CA certificate file + -j CLIENTCERT Specify the path to the client certificate file ``` ##### Example: @@ -167,21 +167,22 @@ This script verifies connectivity to a Zeebe Gateway instance using HTTP/2 and g ##### Usage: ```bash -Usage: ./checks/zeebe/connectivity.sh [-h] [-H ZEEBE_HOST] +Usage: ./checks/zeebe/connectivity.sh [-h] [-H ZEEBE_HOST] [-p ZEEBE_VERSION] [-f PROTO_FILE] [-k] [-r CACERT] [-j CLIENTCERT] + [-a ZEEBE_AUTHORIZATION_SERVER_URL] [-i ZEEBE_CLIENT_ID] [-s ZEEBE_CLIENT_SECRET] + [-u ZEEBE_TOKEN_AUDIENCE] [-q API_PROTOCOL] Options: -h Display this help message -H ZEEBE_HOST Specify the Zeebe host with the port (e.g., zeebe.c8.camunda.example.com:443) - -p ZEEBE_VERSION Specify the Zeebe version (default is latest version: 8.x.x) - -f PROTO_FILE Specify the path to gateway.proto file or leave empty to download it (default behavior is to download the protofile) + -p ZEEBE_VERSION Specify the Zeebe version (default is the latest version: 8.6.5) + -f PROTO_FILE Specify the path to the gateway.proto file or leave empty to download it (default behavior is to download the proto file) -k Skip TLS verification (insecure mode) - -r CACERT Specify the path to CA certificate file - -j CLIENTCERT Specify the path to Client certificate file - -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g.: https://local.distro.example.com/auth/realms/camunda-platform/protocol/openid-connect/t -oken) + -r CACERT Specify the path to the CA certificate file + -j CLIENTCERT Specify the path to the client certificate file + -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g., https://local.distro.example.com/auth/realms/camunda-platform/protocol/openid-connect/token) -i ZEEBE_CLIENT_ID Specify the client ID -s ZEEBE_CLIENT_SECRET Specify the client secret -u ZEEBE_TOKEN_AUDIENCE Specify the token audience - -q API_PROTOCOL Specify the API protocol (e.g. http or grpc - default is grpc) + -q API_PROTOCOL Specify the API protocol (e.g., http or grpc - default is grpc) ``` ##### Example: diff --git a/checks/kube/connectivity.sh b/checks/kube/connectivity.sh index d916b34..d672c75 100755 --- a/checks/kube/connectivity.sh +++ b/checks/kube/connectivity.sh @@ -12,7 +12,7 @@ NAMESPACE="${NAMESPACE:-""}" SKIP_CHECK_INGRESS_CLASS=0 usage() { - echo "Usage: $0 [-h] [-n NAMESPACE] [-d HELM_DEPLOYMENT_NAME]" + echo "Usage: $0 [-h] [-n NAMESPACE]" echo "Options:" echo " -h Display this help message" echo " -n NAMESPACE Specify the namespace to use" diff --git a/checks/kube/deployment.sh b/checks/kube/deployment.sh index 18589e6..75928f8 100755 --- a/checks/kube/deployment.sh +++ b/checks/kube/deployment.sh @@ -11,8 +11,10 @@ LVL_1_SCRIPT_NAME="$DIR_NAME/$SCRIPT_NAME" NAMESPACE="${NAMESPACE:-""}" HELM_DEPLOYMENT_NAME="${HELM_DEPLOYMENT_NAME:-"camunda"}" SKIP_CHECK_HELM_DEPLOYMENT=0 + DEFAULT_REQUIRED_CONTAINERS="connector,optimize,zeebe,zeebe-gateway" REQUIRED_CONTAINERS=() +IFS=',' read -ra REQUIRED_CONTAINERS <<< "$DEFAULT_REQUIRED_CONTAINERS" usage() { echo "Usage: $0 [-h] [-n NAMESPACE] [-d HELM_DEPLOYMENT_NAME]" diff --git a/checks/zeebe/connectivity.sh b/checks/zeebe/connectivity.sh index 9bb5345..1900d7e 100755 --- a/checks/zeebe/connectivity.sh +++ b/checks/zeebe/connectivity.sh @@ -30,21 +30,22 @@ ZEEBE_VERSION="${ZEEBE_VERSION:-$ZEEBE_DEFAULT_VERSION}" # Function to display script usage usage() { - echo "Usage: $0 [-h] [-H ZEEBE_HOST]" + echo "Usage: $0 [-h] [-H ZEEBE_HOST] [-p ZEEBE_VERSION] [-f PROTO_FILE] [-k] [-r CACERT] [-j CLIENTCERT]" + echo " [-a ZEEBE_AUTHORIZATION_SERVER_URL] [-i ZEEBE_CLIENT_ID] [-s ZEEBE_CLIENT_SECRET]" + echo " [-u ZEEBE_TOKEN_AUDIENCE] [-q API_PROTOCOL]" echo "Options:" echo " -h Display this help message" echo " -H ZEEBE_HOST Specify the Zeebe host with the port (e.g., zeebe.c8.camunda.example.com:443)" - echo " -p ZEEBE_VERSION Specify the Zeebe version (default is latest version: $ZEEBE_VERSION)" - echo " -f PROTO_FILE Specify the path to gateway.proto file or leave empty to download it (default behavior is to download the protofile)" + echo " -p ZEEBE_VERSION Specify the Zeebe version (default is the latest version: $ZEEBE_VERSION)" + echo " -f PROTO_FILE Specify the path to the gateway.proto file or leave empty to download it (default behavior is to download the proto file)" echo " -k Skip TLS verification (insecure mode)" - echo " -r CACERT Specify the path to CA certificate file" - echo " -j CLIENTCERT Specify the path to Client certificate file" - echo " -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g.: https://local.distro.example.com/auth/realms/camunda-platform/protocol/openid-connect/t -oken)" + echo " -r CACERT Specify the path to the CA certificate file" + echo " -j CLIENTCERT Specify the path to the client certificate file" + echo " -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g., https://local.distro.example.com/auth/realms/camunda-platform/protocol/openid-connect/token)" echo " -i ZEEBE_CLIENT_ID Specify the client ID" echo " -s ZEEBE_CLIENT_SECRET Specify the client secret" echo " -u ZEEBE_TOKEN_AUDIENCE Specify the token audience" - echo " -q API_PROTOCOL Specify the API protocol (e.g. http or grpc - default is grpc)" + echo " -q API_PROTOCOL Specify the API protocol (e.g., http or grpc - default is grpc)" exit 1 } diff --git a/checks/zeebe/token.sh b/checks/zeebe/token.sh index f385694..ccd4f98 100755 --- a/checks/zeebe/token.sh +++ b/checks/zeebe/token.sh @@ -19,17 +19,17 @@ EXTRA_FLAGS_CURL="" # Function to display script usage usage() { - echo "Usage: $0 [-h] [-a AUTH_SERVER_URL] [-i CLIENT_ID] [-s CLIENT_SECRET] [-u TOKEN_AUDIENCE]" + echo "Usage: $0 [-h] [-a ZEEBE_AUTHORIZATION_SERVER_URL] [-i ZEEBE_CLIENT_ID] [-s ZEEBE_CLIENT_SECRET] [-u ZEEBE_TOKEN_AUDIENCE]" + echo " [-k] [-r CACERT] [-j CLIENTCERT]" echo "Options:" echo " -h Display this help message" - echo " -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g.: https://local.distro.ultrawombat.com/auth/realms/camunda-platform/protocol/openid-connect/t -oken)" + echo " -a ZEEBE_AUTHORIZATION_SERVER_URL Specify the authorization server URL (e.g., https://local.distro.ultrawombat.com/auth/realms/camunda-platform/protocol/openid-connect/token)" echo " -i ZEEBE_CLIENT_ID Specify the client ID" echo " -s ZEEBE_CLIENT_SECRET Specify the client secret" echo " -u ZEEBE_TOKEN_AUDIENCE Specify the token audience" echo " -k Skip TLS verification (insecure mode)" - echo " -r CACERT Specify the path to CA certificate file" - echo " -j CLIENTCERT Specify the path to client certificate file" + echo " -r CACERT Specify the path to the CA certificate file" + echo " -j CLIENTCERT Specify the path to the client certificate file" exit 1 }