Skip to content

Commit

Permalink
Minor fixes in makefiles (#1000)
Browse files Browse the repository at this point in the history
* Rephrase warning message

When the API requested a non-existent secret, the error message
we got was too alarming and confusing.

This commit softens that message and provides additional context.

Signed-off-by: Volkan Ozcelik <[email protected]>

* Fix typo

Signed-off-by: Volkan Ozcelik <[email protected]>

* Fix minor error

Signed-off-by: Volkan Ozcelik <[email protected]>

* Increase timeouts from 60s to 120s

Signed-off-by: Volkan Ozcelik <[email protected]>

---------

Signed-off-by: Volkan Ozcelik <[email protected]>
  • Loading branch information
v0lkan authored Jun 15, 2024
1 parent 3125570 commit 35d14de
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 74 deletions.
3 changes: 2 additions & 1 deletion app/safe/internal/server/route/fetch/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func Fetch(

secret, err := collection.ReadSecret(cid, workloadId)
if err != nil {
log.WarnLn(&cid, "Fetch: Problem reading secret", err.Error())
log.WarnLn(&cid, "Fetch: Attemted to read secret from disk.")
log.TraceLn(&cid, "Likely expected error. No need to panic:", err.Error())
}

log.TraceLn(&cid, "Fetch: workloadId", workloadId)
Expand Down
66 changes: 0 additions & 66 deletions env-vars-export.txt

This file was deleted.

4 changes: 2 additions & 2 deletions hack/helm-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ check_namespace_deleted() {
if kubectl get deployment vsecm-sentinel -n "$VSECM_NS"; then
kubectl delete deployment vsecm-sentinel -n "$VSECM_NS" || \
{ echo "Failed to delete vsecm-sentinel deployment"; exit 1; }
kubectl wait --for=delete pod -l app=vsecm-sentinel -n "$VSECM_NS" --timeout=60s || \
kubectl wait --for=delete pod -l app=vsecm-sentinel -n "$VSECM_NS" --timeout=120s || \
{ echo "Timeout or error while waiting for vsecm-sentinel pods to delete"; exit 1; }
else
echo "vsecm-sentinel deployment does not exist. Skipping delete."
Expand All @@ -47,7 +47,7 @@ fi
if kubectl get deployment vsecm-safe -n "$VSECM_NS"; then
kubectl delete deployment vsecm-safe -n "$VSECM_NS" || \
{ echo "Failed to delete vsecm-safe deployment"; exit 1; }
kubectl wait --for=delete pod -l app=vsecm-safe -n "$VSECM_NS" --timeout=60s || \
kubectl wait --for=delete pod -l app=vsecm-safe -n "$VSECM_NS" --timeout=120s || \
{ echo "Timeout or error while waiting for vsecm-safe pods to delete"; exit 1; }
else
echo "vsecm-safe deployment does not exist. Skipping delete."
Expand Down
4 changes: 2 additions & 2 deletions hack/install-vsecm-to-eks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
helm install vsecm vsecm/vsecm

echo "verifying vsecm installation"
kubectl wait --timeout=60s --for=condition=Available deployment -n vsecm-system vsecm-sentinel
kubectl wait --timeout=120s --for=condition=Available deployment -n vsecm-system vsecm-sentinel
echo "vsecm-sentinel: deployment available"
kubectl wait --timeout=60s --for=condition=Available deployment -n vsecm-system vsecm-safe
kubectl wait --timeout=120s --for=condition=Available deployment -n vsecm-system vsecm-safe
echo "vsecm-safe: deployment available"
echo "vsecm installation successful"
6 changes: 3 additions & 3 deletions makefiles/VSecMDeploy.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ deploy-spire:
kubectl apply -f ${MANIFESTS_BASE_PATH}/crds; \
kubectl apply -f ${MANIFESTS_BASE_PATH}/spire.yaml; \
echo "verifying SPIRE installation"; \
kubectl wait --for=condition=ready pod spire-server-0 --timeout=60s -n $(VSECM_NAMESPACE_SPIRE_SERVER) \
kubectl wait --for=condition=ready pod spire-server-0 --timeout=120s -n $(VSECM_NAMESPACE_SPIRE_SERVER); \
echo "spire-server: deployment available"; \
echo "spire installation successful"; \
echo "sleeping for 15 seconds for webhooks to become responsive"; \
Expand Down Expand Up @@ -96,9 +96,9 @@ deploy-fips-eks: deploy-spire
.PHONY: post-deploy
post-deploy:
echo "verifying vsecm installation"
kubectl wait --timeout=60s --for=condition=Available deployment -n $(VSECM_NAMESPACE_SYSTEM) vsecm-sentinel
kubectl wait --timeout=120s --for=condition=Available deployment -n $(VSECM_NAMESPACE_SYSTEM) vsecm-sentinel
echo "vsecm-sentinel: deployment available"
kubectl wait --for=condition=ready pod vsecm-safe-0 --timeout=60s -n $(VSECM_NAMESPACE_SYSTEM)
kubectl wait --for=condition=ready pod vsecm-safe-0 --timeout=120s -n $(VSECM_NAMESPACE_SYSTEM)
echo "vsecm-safe: deployment available"
echo "vsecm installation successful"

Expand Down

0 comments on commit 35d14de

Please sign in to comment.