Skip to content

Commit

Permalink
chore: this is how you null from dev
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Sep 28, 2024
1 parent d3c4f80 commit dd69e60
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .taskfiles/bootstrap/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ tasks:
requires:
vars: ['CLUSTER', 'NODES', 'DISK']
preconditions:
- talosctl config info >/dev/null 2>&1
- talosctl config info &>/dev/null
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig

etcd:
internal: true
cmd: until talosctl --nodes {{.TALOS_CONTROLLER}} bootstrap; do sleep 10; done
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- talosctl config info >/dev/null 2>&1
- talosctl config info &>/dev/null

apps:
internal: true
Expand All @@ -48,14 +48,14 @@ tasks:
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/bootstrap/helmfile.yaml
- talosctl config info >/dev/null 2>&1
- talosctl config info &>/dev/null

conf:
internal: true
cmd: talosctl kubeconfig --nodes {{.TALOS_CONTROLLER}} --force --force-context-name {{.CLUSTER}} {{.KUBERNETES_DIR}}/{{.CLUSTER}}
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- talosctl config info >/dev/null 2>&1
- talosctl config info &>/dev/null

flux:
internal: true
Expand Down
18 changes: 9 additions & 9 deletions .taskfiles/talos/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tasks:
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/bootstrap/talos/assets/{{.HOSTNAME}}.secret.sops.yaml
- talosctl --nodes {{.HOSTNAME}} get machineconfig >/dev/null 2>&1
- talosctl --nodes {{.HOSTNAME}} get machineconfig &>/dev/null

upgrade:
desc: Upgrade Talos on a node
Expand All @@ -47,8 +47,8 @@ tasks:
vars: ['CLUSTER', 'HOSTNAME']
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- talosctl config info >/dev/null 2>&1
- talosctl --nodes {{.HOSTNAME}} get machineconfig >/dev/null 2>&1
- talosctl config info &>/dev/null
- talosctl --nodes {{.HOSTNAME}} get machineconfig &>/dev/null

upgrade-k8s:
desc: Upgrade Kubernetes
Expand All @@ -60,8 +60,8 @@ tasks:
vars: ['CLUSTER']
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- talosctl config info >/dev/null 2>&1
- talosctl --nodes {{.TALOS_CONTROLLER}} get machineconfig >/dev/null 2>&1
- talosctl config info &>/dev/null
- talosctl --nodes {{.TALOS_CONTROLLER}} get machineconfig &>/dev/null

reset-node:
desc: Reset a Talos node and shut it down
Expand All @@ -71,8 +71,8 @@ tasks:
vars: ['CLUSTER', 'HOSTNAME']
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- talosctl config info >/dev/null 2>&1
- talosctl --nodes {{.HOSTNAME}} get machineconfig >/dev/null 2>&1
- talosctl config info &>/dev/null
- talosctl --nodes {{.HOSTNAME}} get machineconfig &>/dev/null

reset-cluster:
desc: Reset all the Talos nodes and shut 'em down
Expand All @@ -85,8 +85,8 @@ tasks:
vars: ['CLUSTER']
preconditions:
- test -f {{.KUBERNETES_DIR}}/{{.CLUSTER}}/talosconfig
- talosctl config info >/dev/null 2>&1
- talosctl --nodes {{.NODES}} get machineconfig >/dev/null 2>&1
- talosctl config info &>/dev/null
- talosctl --nodes {{.NODES}} get machineconfig &>/dev/null

bootstrap-matchbox:
desc: Bootstrap required Matchbox configuration to PXE Boot machine
Expand Down
4 changes: 2 additions & 2 deletions .taskfiles/volsync/resources/which-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ APP=$1
NAMESPACE="${2:-default}"

is_deployment() {
kubectl --namespace "${NAMESPACE}" get deployment "${APP}" >/dev/null 2>&1
kubectl --namespace "${NAMESPACE}" get deployment "${APP}" &>/dev/null
}

is_statefulset() {
kubectl --namespace "${NAMESPACE}" get statefulset "${APP}" >/dev/null 2>&1
kubectl --namespace "${NAMESPACE}" get statefulset "${APP}" &>/dev/null
}

if is_deployment; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ if [[ "${sonarr_eventtype:-}" == "Grab" ]]; then
--header "X-Api-Key: ${SONARR__AUTH__APIKEY}" \
--header "Content-Type: application/json" \
--data-binary '{"name": "RefreshSeries", "seriesId": '"${sonarr_series_id}"'}' \
--request POST "http://localhost:${SONARR__SERVER__PORT}/api/v3/command" &> /dev/null
--request POST "http://localhost:${SONARR__SERVER__PORT}/api/v3/command" &>/dev/null
fi
fi

0 comments on commit dd69e60

Please sign in to comment.