Skip to content

Commit

Permalink
fixup! tmp secret hash
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Oct 16, 2024
1 parent 4c34e4a commit 332bd5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,9 @@ sample_app_agent_proxy: undeploy_sample_app_agent_proxy ## Deploy sample app wit
echo "'SAMPLE_APP_NAMESPACE' must be specified."; \
exit 1; \
fi ;\
SECRET_HASH=`echo -n ${DEPLOY_NAMESPACE}/cryostat-sample/${SAMPLE_APP_NAMESPACE} | sha256sum`; \
SECRET_HASH=`echo -n ${DEPLOY_NAMESPACE}/cryostat-sample/${SAMPLE_APP_NAMESPACE} | sha256sum | cut -d' ' -f 1`; \
fi; \
$(CLUSTER_CLIENT) patch -f config/samples/sample-app-agent-tls-proxy.yaml --local=true --type=merge \
-p "{\"spec\":{\"template\":{\"spec\":{\"\$setElementOrder/volumes\":[{\"name\":\"agent-tls\"}],\"volumes\":[{\"\$retainKeys\":[\"name\",\"secret\"],\"name\":\"agent-tls\",\"secret\":{\"secretName\":\"cryostat-agent-$${SECRET_HASH}\"}}]}}}}" \
-o yaml | oc apply -f -
sed "s/REPLACEHASH/$${SECRET_HASH}/" < config/samples/sample-app-agent-tls-proxy.yaml | oc apply -f -

.PHONY: undeploy_sample_app_agent
undeploy_sample_app_agent: ## Undeploy sample app with Cryostat Agent.
Expand Down
2 changes: 1 addition & 1 deletion config/samples/sample-app-agent-tls-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
volumes:
- name: agent-tls
secret:
secretName: cryostat-agent-abcd1234
secretName: cryostat-agent-REPLACEHASH
defaultMode: 420
---
apiVersion: v1
Expand Down

0 comments on commit 332bd5f

Please sign in to comment.