Skip to content

Commit

Permalink
correct env var references, allow override of CR name
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Oct 25, 2024
1 parent 281ab67 commit c30c60d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,13 @@ undeploy_sample_app_agent_proxy: ## Undeploy sample app with Cryostat Agent conf
.PHONY: sample_app_agent_proxy
sample_app_agent_proxy: undeploy_sample_app_agent_proxy ## Deploy sample app with Cryostat Agent configured for TLS client auth on nginx proxy.
@if [ -z "${SECRET_HASH}" ]; then \
if [ -z "${SAMPLE_APP_NAMESPACE}" ]; then \
if [ -z "$${SAMPLE_APP_NAMESPACE}" ]; then \
SAMPLE_APP_NAMESPACE=`$(CLUSTER_CLIENT) config view --minify -o 'jsonpath={.contexts[0].context.namespace}'`; \
fi ;\
SECRET_HASH=`echo -n ${DEPLOY_NAMESPACE}/cryostat-sample/${namespace} | sha256sum | cut -d' ' -f 1`; \
if [ -z "$${CRYOSTAT_CR_NAME}" ]; then \
CRYOSTAT_CR_NAME="cryostat-sample"; \
fi ;\
SECRET_HASH=`echo -n ${DEPLOY_NAMESPACE}/$${CRYOSTAT_CR_NAME}/$${SAMPLE_APP_NAMESPACE} | sha256sum | cut -d' ' -f 1`; \
fi; \
sed "s/REPLACEHASH/$${SECRET_HASH}/" < config/samples/sample-app-agent-tls-proxy.yaml | oc apply -f -

Expand Down

0 comments on commit c30c60d

Please sign in to comment.