Compare commits

...
Author SHA1 Message Date
kasun 7acf83e68d chore: keep the permission prompt for merging PRs 2026-11-21 15:56:49 +01:00
kasun 088cb5add1 chore: allow Claude Code to commit, push and open PRs without a prompt
CLAUDE.md already requires an explicit request before committing or opening a PR, so the extra permission prompt only repeated that approval.
2026-11-21 15:54:45 +01:00
kasun b04ab52fd2 Merge pull request 'Bug: Prevent Longhorn disks filling up after node outages' (#39) from bug/longhorn-storage-exhaustion into main
Deploy k8s Infra / Pulumi Preview (push) Skipped
Deploy k8s Infra / Pulumi Deploy (push) Successful in 1m4s
Reviewed-on: #39
2026-11-21 15:52:36 +01:00
kasun ff2b565677 bug(k8s-infra): prevent Longhorn disks filling up after node outages
Deploy k8s Infra / Pulumi Deploy (pull_request) Skipped
Deploy k8s Infra / Pulumi Preview (pull_request) Successful in 51s
Orphaned replica data and a large snapshot left no room for a second Prometheus replica, so the volume faulted when its only replica failed. Clean up orphans and system snapshots, trim volumes daily, and lower the free-space reserve to 10% because longhorn-extra is a dedicated disk. Align the UI default with the StorageClass at 3 replicas so volumes keep two copies during a node reboot.
2026-11-21 15:49:07 +01:00
claude-bot Bot 4b22f4ad11 Feature: Expose the Longhorn UI at longhorn.<domain> behind basic auth
Deploy k8s Infra / Pulumi Preview (push) Skipped
Deploy k8s Infra / Pulumi Deploy (push) Successful in 48s
2026-11-21 02:41:43 +01:00
3 changed files with 53 additions and 6 deletions

No files matched your search

+2 -2
View File
@@ -7,8 +7,8 @@
# #
# Scope: used for PRs only (list, open, check CI status, merge after your OK). # Scope: used for PRs only (list, open, check CI status, merge after your OK).
# Technically it can call any endpoint; CLAUDE.md limits its use to PRs. # Technically it can call any endpoint; CLAUDE.md limits its use to PRs.
# In .claude/settings.json, GET runs without a prompt; POST, PATCH, PUT and # In .claude/settings.json, GET and POST (e.g. opening a PR) run without a
# DELETE (anything that changes something) always ask first. # prompt. Merging a PR (POST .../merge), PATCH, PUT and DELETE always ask first.
# #
# Usage: gitea.sh METHOD PATH [BODY] # Usage: gitea.sh METHOD PATH [BODY]
# METHOD GET | POST | PATCH | PUT | DELETE # METHOD GET | POST | PATCH | PUT | DELETE
+4 -3
View File
@@ -23,6 +23,9 @@
"Bash(git add *)", "Bash(git add *)",
"Bash(git switch *)", "Bash(git switch *)",
"Bash(.claude/scripts/gitea.sh GET *)", "Bash(.claude/scripts/gitea.sh GET *)",
"Bash(.claude/scripts/gitea.sh POST *)",
"Bash(git commit *)",
"Bash(git push *)",
"WebFetch(domain:www.pulumi.com)", "WebFetch(domain:www.pulumi.com)",
"WebFetch(domain:github.com)", "WebFetch(domain:github.com)",
"WebFetch(domain:raw.githubusercontent.com)", "WebFetch(domain:raw.githubusercontent.com)",
@@ -51,9 +54,7 @@
"Bash(ssh *)", "Bash(ssh *)",
"Bash(scp *)", "Bash(scp *)",
"Bash(curl *)", "Bash(curl *)",
"Bash(git commit *)", "Bash(.claude/scripts/gitea.sh POST */merge*)",
"Bash(git push *)",
"Bash(.claude/scripts/gitea.sh POST *)",
"Bash(.claude/scripts/gitea.sh PATCH *)", "Bash(.claude/scripts/gitea.sh PATCH *)",
"Bash(.claude/scripts/gitea.sh PUT *)", "Bash(.claude/scripts/gitea.sh PUT *)",
"Bash(.claude/scripts/gitea.sh DELETE *)" "Bash(.claude/scripts/gitea.sh DELETE *)"
+47 -1
View File
@@ -138,15 +138,61 @@ const longhorn = new k8s.helm.v3.Release(
version: "1.12.0", version: "1.12.0",
values: { values: {
defaultSettings: { defaultSettings: {
defaultReplicaCount: 2, defaultReplicaCount: 3,
nodeDownPodDeletionPolicy: "delete-both-statefulset-and-deployment-pod", nodeDownPodDeletionPolicy: "delete-both-statefulset-and-deployment-pod",
createDefaultDiskLabeledNodes: true, createDefaultDiskLabeledNodes: true,
orphanResourceAutoDeletion: "replica-data;instance",
// Longhorn's recommendation for dedicated disks (longhorn-extra).
// Docs: https://longhorn.io/docs/1.12.0/best-practices/
storageMinimalAvailablePercentage: 10,
}, },
}, },
}, },
opts(), opts(),
); );
// Purges system snapshots, which can otherwise grow to a full volume's size
// on every replica. Docs:
// https://longhorn.io/docs/1.12.0/snapshots-and-backups/scheduling-backups-and-snapshots/
new k8s.apiextensions.CustomResource(
"longhorn-snapshot-cleanup",
{
apiVersion: "longhorn.io/v1beta2",
kind: "RecurringJob",
metadata: { name: "snapshot-cleanup", namespace: "longhorn-system" },
spec: {
name: "snapshot-cleanup",
task: "snapshot-cleanup",
cron: "30 3 * * *",
groups: ["default"],
retain: 0,
concurrency: 1,
},
},
opts({ dependsOn: [longhorn] }),
);
// Returns blocks deleted inside a volume (e.g. expired Prometheus data) to the
// disk. Runs after snapshot-cleanup, since trim can't reclaim valid snapshots.
// Docs: https://longhorn.io/docs/1.12.0/nodes-and-volumes/volumes/trim-filesystem/
new k8s.apiextensions.CustomResource(
"longhorn-filesystem-trim",
{
apiVersion: "longhorn.io/v1beta2",
kind: "RecurringJob",
metadata: { name: "filesystem-trim", namespace: "longhorn-system" },
spec: {
name: "filesystem-trim",
task: "filesystem-trim",
cron: "30 4 * * *",
groups: ["default"],
retain: 0,
concurrency: 1,
},
},
opts({ dependsOn: [longhorn] }),
);
// Patches Longhorn instances to use the mountend Longhorn storage on the worker nodes. // Patches Longhorn instances to use the mountend Longhorn storage on the worker nodes.
["k3s-worker-1", "k3s-worker-2", "k3s-worker-3"].forEach( ["k3s-worker-1", "k3s-worker-2", "k3s-worker-3"].forEach(
(nodeName) => (nodeName) =>