forked from roger/k3s-cluster
Compare commits
3 Commits
08bb4de278
...
fix-argocd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef17dc6c32 | ||
|
|
3542bcc8fb | ||
|
|
6b697c9665 |
15
argocd/argocd-rbac-cm.yaml
Normal file
15
argocd/argocd-rbac-cm.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: argocd-rbac-cm
|
||||
namespace: argocd
|
||||
labels:
|
||||
app.kubernetes.io/name: argocd-rbac-cm
|
||||
app.kubernetes.io/part-of: argocd
|
||||
data:
|
||||
policy.default: ""
|
||||
policy.csv: |
|
||||
p, role:platform-engineer, applications, get, */*, allow
|
||||
p, role:platform-engineer, applications, sync, */*, allow
|
||||
p, role:platform-engineer, projects, get, *, allow
|
||||
g, platform-engineer, role:platform-engineer
|
||||
@@ -22,9 +22,11 @@ spec:
|
||||
job: deadline-checker
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
containers:
|
||||
- name: deadline-checker
|
||||
image: myorg-assistant:latest
|
||||
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- python
|
||||
|
||||
@@ -22,9 +22,11 @@ spec:
|
||||
job: evening-summary
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
containers:
|
||||
- name: evening-summary
|
||||
image: myorg-assistant:latest
|
||||
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- python
|
||||
|
||||
@@ -22,9 +22,11 @@ spec:
|
||||
job: git-sync
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
containers:
|
||||
- name: git-sync
|
||||
image: myorg-assistant:latest
|
||||
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- python
|
||||
|
||||
@@ -22,9 +22,11 @@ spec:
|
||||
job: morning-briefing
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
containers:
|
||||
- name: morning-briefing
|
||||
image: myorg-assistant:latest
|
||||
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- python
|
||||
|
||||
@@ -22,9 +22,11 @@ spec:
|
||||
job: waiting-followup
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
containers:
|
||||
- name: waiting-followup
|
||||
image: myorg-assistant:latest
|
||||
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- python
|
||||
|
||||
@@ -65,22 +65,22 @@ spec:
|
||||
}
|
||||
|
||||
# ---- Watchdog checks (silent unless something is wrong) ----
|
||||
create "cluster-health-check" "every 15m" "discord" \
|
||||
create "cluster-health-check" "every 6h" "discord" \
|
||||
"Check cluster health using the HTTP APIs documented in your SOUL.md. Check: (1) any node that is NotReady, (2) any pod not in Running phase, (3) any recent error/panic/crashloop/backoff log lines in Loki across all namespaces in the last 20 minutes, (4) any ArgoCD app that is not Synced plus Healthy. If everything is healthy, reply with exactly [SILENT]. Otherwise give a concise per-resource summary of what is wrong."
|
||||
|
||||
create "pod-restart-loop" "every 10m" "discord" \
|
||||
create "pod-restart-loop" "every 1h" "discord" \
|
||||
"Find pods with high restart rates using the Prometheus API documented in your SOUL.md. If any pod has more than 3 restarts in the last 15 minutes, fetch its logs from Loki to diagnose the cause. If the cause is clearly fixable via a manifest change such as bumping a memory limit, fixing a config value, or bumping the restartedAt annotation, make the edit in /workspace/k3s-cluster, commit and push, then trigger an ArgoCD sync via the API. Report what you did in one line. If not clearly fixable, post the log excerpt and proposed fix, and wait for Roger. If no high-restart pods, reply [SILENT]."
|
||||
|
||||
create "pvc-pressure" "every 30m" "discord" \
|
||||
create "pvc-pressure" "every 1d" "discord" \
|
||||
"Check storage health using the Prometheus API documented in your SOUL.md. Alert if any PVC has less than 15 percent free space, or if any node filesystem is over 85 percent full. If all healthy, reply [SILENT]."
|
||||
|
||||
create "argocd-sync-health" "every 1h" "discord" \
|
||||
create "argocd-sync-health" "every 6h" "discord" \
|
||||
"Check ArgoCD app health using the API documented in your SOUL.md. If every app is Synced and Healthy, reply [SILENT]. Otherwise list the OutOfSync or Degraded apps with their status. If an app is OutOfSync and you believe a recent git push caused it, you may trigger a sync via the API. Do NOT hand-edit resources to fix them — fix the source repo."
|
||||
|
||||
create "cert-expiry" "0 9 * * *" "discord" \
|
||||
"Check certificate expiry using the Prometheus API documented in your SOUL.md. Alert on any certificate expiring in under 21 days, with its name and namespace. If none, reply [SILENT]."
|
||||
|
||||
create "node-resource-drift" "every 30m" "discord" \
|
||||
create "node-resource-drift" "every 1d" "discord" \
|
||||
"Check node resources using the Prometheus API documented in your SOUL.md. Alert if any node is NotReady, or if any node has CPU over 90 percent or memory over 90 percent. Otherwise reply [SILENT]."
|
||||
|
||||
# ---- Daily report (always delivered) ----
|
||||
|
||||
Reference in New Issue
Block a user