Skip to content

Commit

Permalink
fix: remove uses of the observability config access token
Browse files Browse the repository at this point in the history
  • Loading branch information
pb82 committed Mar 28, 2023
1 parent e33e62e commit 3e493cc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion kas-fleet-manager/deploy-kas-fleet-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ deploy_kasfleetmanager() {
-p OCM_SERVICE_CLIENT_ID="" \
-p OCM_SERVICE_CLIENT_SECRET="" \
-p OCM_SERVICE_TOKEN="${OCM_SERVICE_TOKEN}" \
-p OBSERVABILITY_CONFIG_ACCESS_TOKEN="${OBSERVABILITY_CONFIG_ACCESS_TOKEN}" \
-p MAS_SSO_CRT="${SSO_TRUSTED_CA}" \
-p KAFKA_TLS_CERT="${KAFKA_TLS_CERT}" \
-p KAFKA_TLS_KEY="${KAFKA_TLS_KEY}" \
Expand Down
5 changes: 0 additions & 5 deletions kas-fleet-manager/kas-fleet-manager-deploy.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# GitHub Personal Access token to be used by Observability Operator to fetch the
# Observability configuration from the Observability configuration git repository.
# The token should have read access to the configuration git repository.
OBSERVABILITY_CONFIG_ACCESS_TOKEN=<observability-config-access-token>

# Repository address and branch name to use for the Observability repository. Set these to test with custom Observability resources.
#OBSERVABILITY_CONFIG_REPO=https://api.github.com/repos/bf2fc6cc711aee1a0c2a/observability-resources-mk/contents
#OBSERVABILITY_CONFIG_TAG=main
Expand Down
14 changes: 0 additions & 14 deletions kas-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,11 @@ read_kas_installer_env_file() {
fi
}

check_observability_token() {
echo "Checking validity of OBSERVABILITY_CONFIG_ACCESS_TOKEN"
curl --silent \
--head \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer ${OBSERVABILITY_CONFIG_ACCESS_TOKEN}" \
${OBSERVABILITY_CONFIG_REPO} \
--fail > /dev/null \
|| ( echo "failed to get observability config repo contents with OBSERVABILITY_CONFIG_ACCESS_TOKEN, check expiry and permissions" && exit 1 )
echo "OBSERVABILITY_CONFIG_ACCESS_TOKEN valid"
}

generate_kas_fleet_manager_env_config() {
echo "Generating KAS Fleet Manager configuration env file '${KAS_FLEET_MANAGER_DEPLOY_ENV_FILE} ...'"
# Make sure KAS Fleet Manager env file is empty
> ${KAS_FLEET_MANAGER_DEPLOY_ENV_FILE}

echo "OBSERVABILITY_CONFIG_ACCESS_TOKEN=${OBSERVABILITY_CONFIG_ACCESS_TOKEN}" >> ${KAS_FLEET_MANAGER_DEPLOY_ENV_FILE}
echo "OBSERVABILITY_CONFIG_REPO=${OBSERVABILITY_CONFIG_REPO}" >> ${KAS_FLEET_MANAGER_DEPLOY_ENV_FILE}
echo "OBSERVABILITY_CONFIG_TAG=${OBSERVABILITY_CONFIG_TAG}" >> ${KAS_FLEET_MANAGER_DEPLOY_ENV_FILE}
echo "OBSERVABILITY_CR_MERGE_PATCH_CONTENT='${OBSERVABILITY_CR_MERGE_PATCH_CONTENT}'" >> ${KAS_FLEET_MANAGER_DEPLOY_ENV_FILE}
Expand Down Expand Up @@ -181,7 +168,6 @@ deploy_observatorium() {
# Main body of the script starts here

read_kas_installer_env_file
check_observability_token

# Deploy and configure MAS SSO
if [ "${SSO_PROVIDER_TYPE}" = "mas_sso" ] || [ -z "${MAS_SSO_BASE_URL:-}" ] ; then
Expand Down

0 comments on commit 3e493cc

Please sign in to comment.