Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions makefiles/kube.make
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@ kube_tools := $(SHIPKIT_BIN)/kube_tools
help.kube:
$(MAKE) help HELP_REGEX="^kube.+.*"

# ===== SUBHELP TARGETS ==========
# Trying to cut clutter in kube targets by categorizing them.
# Note that the help regex for these targets is not the same as the target!

## Show the available subhelp categories for help.kube
help.kube.subhelp:
$(MAKE) help HELP_REGEX="^subhelp.kube.+.*"

# kube.deploy targets apply full deployments or cronjobs to k8s
subhelp.kube.deploy:
$(MAKE) help HELP_REGEX="^kube.deploy.+.*"

# kube.kustomize targets apply kustomization directories to the cluster.
subhelp.kube.kustomize:
$(MAKE) help HELP_REGEX="^kube.kustomize.+.*"

# kube.set targets apply secrets and configmaps outside of a deployment.
subhelp.kube.set:
$(MAKE) help HELP_REGEX="^kube.set.+.*"

# ===== END SUBHELP TARGETS ==========

# removes everything with the app=$(APP_KEY) under $(APP_KUBE_NAMESPACE)
kube.clean: | _verify_APP_KUBE_NAMESPACE
$(kube_tools) ctl delete deployment,svc,configmap,ingress --selector="app=$(APP_KEY)" --namespace="$(APP_KUBE_NAMESPACE)"
Expand Down
4 changes: 2 additions & 2 deletions makefiles/vault.make
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ vault.decrypt: $(VAULT_DIR)
$(VAULT_DIR): | $(SOP_SH) vault.gpg.import-private-key vault.clone
cd $(VAULT_DIR)
for vfile in $(VAULT_FILES); do
outFile="$${vfile/.enc./.}" # remove .enc.
outFile="$${outFile/.encrypted./.}" # remove .encrypted.
# Remove any .enc or .encrypted limited by literal dot and word boundary at end
outFile="$$(sed -E s/\.\(encrypted\|enc\)\\b//g <<< $$vfile )"
$(logr) "$$vfile > $$outFile"
$(SOP_SH) -d $$vfile > $$outFile
done
Expand Down