-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef038b8
commit a0a3033
Showing
27 changed files
with
747 additions
and
1,263 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
# yaml-language-server: $schema=https://taskfile.dev/schema.json | ||
version: "3" | ||
|
||
tasks: | ||
ks:list: | ||
desc: List all Flux kustomizations | ||
cmds: | ||
- flux get kustomizations | ||
|
||
ks:suspend: | ||
desc: Suspend a Flux kustomization | ||
cmds: | ||
- | | ||
if [ -z "{{.CLI_ARGS}}" ]; then | ||
echo "Usage: task flux:ks:suspend -- <kustomization-name>" | ||
echo "Available kustomizations:" | ||
flux get kustomizations --no-header | awk '{print $1}' | ||
exit 1 | ||
fi | ||
flux suspend kustomization {{.CLI_ARGS}} | ||
silent: true | ||
|
||
ks:resume: | ||
desc: Resume a Flux kustomization | ||
cmds: | ||
- | | ||
if [ -z "{{.CLI_ARGS}}" ]; then | ||
echo "Usage: task flux:ks:resume -- <kustomization-name>" | ||
echo "Available kustomizations:" | ||
flux get kustomizations --no-header | awk '{print $1}' | ||
exit 1 | ||
fi | ||
flux resume kustomization {{.CLI_ARGS}} | ||
silent: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
# yaml-language-server: $schema=https://taskfile.dev/schema.json | ||
version: "3" | ||
|
||
tasks: | ||
cleanup-pods: | ||
desc: Clean up pods with a Failed/Pending/Succeeded phase | ||
preconditions: | ||
- which kubectl | ||
requires: | ||
cmds: | ||
- for: | ||
matrix: | ||
PHASE: | ||
- Failed | ||
- Pending | ||
- Succeeded | ||
cmd: kubectl delete pods --field-selector status.phase={{.ITEM.PHASE}} -A --ignore-not-found=true | ||
|
||
sync-externalsecrets: | ||
desc: Force sync all ExternalSecret resources | ||
preconditions: | ||
- which kubectl | ||
vars: | ||
SECRETS: | ||
sh: kubectl get externalsecret --all-namespaces --no-headers --output=jsonpath='{range .items[*]}{.metadata.namespace},{.metadata.name}{"\n"}{end}' | ||
cmds: | ||
- for: | ||
var: SECRETS | ||
split: "\n" | ||
cmd: kubectl --namespace {{splitList "," .ITEM | first}} annotate externalsecret {{splitList "," .ITEM | last}} force-sync="{{now | unixEpoch}}" --overwrite | ||
|
||
sync-externalsecret: | ||
desc: Force sync specific ExternalSecret resource | ||
preconditions: | ||
- which kubectl | ||
cmds: | ||
- | | ||
if [ -z "{{.CLI_ARGS}}" ]; then | ||
echo "Usage: task sync-externalsecret -- <namespace/secret-name>" | ||
echo "Available externalsecrets:" | ||
kubectl get externalsecret --all-namespaces | ||
exit 1 | ||
fi | ||
NAMESPACE=$(echo {{.CLI_ARGS}} | cut -d'/' -f1) | ||
SECRET=$(echo {{.CLI_ARGS}} | cut -d'/' -f2) | ||
kubectl -n $NAMESPACE annotate externalsecret $SECRET force-sync="$(date +%s)" --overwrite | ||
silent: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.