From a0d9b5d073920f2f30fae41f6427977e494ef3b4 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 16 Feb 2024 10:11:07 -0500 Subject: [PATCH] chore: housekeeping Signed-off-by: Devin Buhl --- .github/workflows/upgrade-talos.yaml | 9 ++--- README.md | 35 +++++++------------ .../default/kromgo/app/resources/config.yaml | 16 +++++---- 3 files changed, 24 insertions(+), 36 deletions(-) diff --git a/.github/workflows/upgrade-talos.yaml b/.github/workflows/upgrade-talos.yaml index 615c7929506e9..e06c37b432bf4 100644 --- a/.github/workflows/upgrade-talos.yaml +++ b/.github/workflows/upgrade-talos.yaml @@ -56,20 +56,15 @@ jobs: KUBECONFIG: "${{ steps.kubeconfig.outputs.filePath }}" run: kubectl cnpg --context ${{ github.event.inputs.kubeClusterName }} -n database status ${{ github.event.inputs.pgClusterName }} - - if: ${{ github.event.inputs.pgMaintenanceMode == 'true' }} - name: Merge Talos Upgrade PR + - name: Upgrade Talos shell: bash env: GITHUB_TOKEN: "${{ steps.app-token.outputs.token }}" - run: gh pr merge ${{ github.event.inputs.talosPullRequestNumber }} --squash - - - name: Change CNPG Maintenance Mode - shell: bash - env: KUBECONFIG: "${{ steps.kubeconfig.outputs.filePath }}" run: | if [ "${{ github.event.inputs.pgMaintenanceMode }}" == "true" ]; then kubectl cnpg --context ${{ github.event.inputs.kubeClusterName }} maintenance set --reusePVC --all-namespaces + gh pr merge ${{ github.event.inputs.talosPullRequestNumber }} --squash else kubectl cnpg --context ${{ github.event.inputs.kubeClusterName }} maintenance unset --reusePVC --all-namespaces fi diff --git a/README.md b/README.md index d99a767c6106f..e0e0fd6c5e34b 100644 --- a/README.md +++ b/README.md @@ -54,17 +54,18 @@ My Kubernetes cluster is deploy with [Talos](https://www.talos.dev). This is a s ### Core Components -- [actions-runner-controller](https://github.com/actions/actions-runner-controller): self-hosted Github runners -- [cilium](https://github.com/cilium/cilium): internal Kubernetes networking plugin -- [cert-manager](https://cert-manager.io/docs/): creates SSL certificates for services in my cluster -- [external-dns](https://github.com/kubernetes-sigs/external-dns): automatically syncs DNS records from my cluster ingresses to a DNS provider -- [external-secrets](https://github.com/external-secrets/external-secrets/): managed Kubernetes secrets using [1Password Connect](https://github.com/1Password/connect). -- [ingress-nginx](https://github.com/kubernetes/ingress-nginx/): ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer -- [rook](https://github.com/rook/rook): distributed block storage for persistent storage -- [sops](https://toolkit.fluxcd.io/guides/mozilla-sops/): managed secrets for Kubernetes, Ansible, and Terraform which are committed to Git -- [spegel](https://github.com/XenitAB/spegel): stateless cluster local OCI registry mirror -- [tf-controller](https://github.com/weaveworks/tf-controller): additional Flux component used to run Terraform from within a Kubernetes cluster. -- [volsync](https://github.com/backube/volsync): backup and recovery of persistent volume claims +- [actions-runner-controller](https://github.com/actions/actions-runner-controller): Self-hosted Github runners. +- [cert-manager](https://github.com/cert-manager/cert-manager): Creates SSL certificates for services in my cluster. +- [cilium](https://github.com/cilium/cilium): Internal Kubernetes container networking interface. +- [cloudflared](https://github.com/cloudflare/cloudflared): Enables Cloudflare secure access to certain ingresses. +- [external-dns](https://github.com/kubernetes-sigs/external-dns): Automatically syncs ingress DNS records to a DNS provider. +- [external-secrets](https://github.com/external-secrets/external-secrets): Managed Kubernetes secrets using [1Password Connect](https://github.com/1Password/connect). +- [ingress-nginx](https://github.com/kubernetes/ingress-nginx): Kubernetes ingress controller using NGINX as a reverse proxy and load balancer. +- [rook](https://github.com/rook/rook): Distributed block storage for peristent storage. +- [sops](https://github.com/getsops/sops): Managed secrets for Kubernetes and Terraform which are commited to Git. +- [spegel](https://github.com/XenitAB/spegel): Stateless cluster local OCI registry mirror. +- [tf-controller](https://github.com/weaveworks/tf-controller): Additional Flux component used to run Terraform from within a Kubernetes cluster. +- [volsync](https://github.com/backube/volsync): Backup and recovery of persistent volume claims. ### GitOps @@ -195,15 +196,3 @@ Outside the `external-dns` instance mentioned above another instance is deployed ## 🤝 Gratitude and Thanks Thanks to all the people who donate their time to the [Home Operations](https://discord.gg/home-operations) Discord community. Be sure to check out [kubesearch.dev](https://kubesearch.dev/) for ideas on how to deploy applications or get ideas on what you may deploy. - ---- - -## 📜 Changelog - -See my _awful_ [commit history](https://github.com/onedr0p/home-ops/commits/main) - ---- - -## 🔏 License - -See [LICENSE](./LICENSE) diff --git a/kubernetes/main/apps/default/kromgo/app/resources/config.yaml b/kubernetes/main/apps/default/kromgo/app/resources/config.yaml index 9c76e1dc81e35..fdae197391900 100644 --- a/kubernetes/main/apps/default/kromgo/app/resources/config.yaml +++ b/kubernetes/main/apps/default/kromgo/app/resources/config.yaml @@ -2,13 +2,17 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/kashalls/kromgo/main/config.schema.json metrics: - name: cluster_node_count - query: count(count by (node) (kube_node_status_condition{kubernetes_node=~"k8s-[0-9]+", condition="Ready"})) + query: count(count by (node) (kube_node_status_condition{kubernetes_node=~"k8s-[0-9]", condition="Ready"})) + colors: + - { color: "green", min: 0, max: 9999 } - name: cluster_pod_count - query: sum(kube_pod_status_phase{kubernetes_node=~"k8s-[0-9]+", phase="Running"}) + query: sum(kube_pod_status_phase{kubernetes_node=~"k8s-[0-9]", phase="Running"}) + colors: + - { color: "green", min: 0, max: 9999 } - name: cluster_cpu_usage - query: round(avg(instance:node_cpu_utilisation:rate5m{kubernetes_node=~"k8s-[0-9]+"}) * 100, 0.1) + query: round(avg(instance:node_cpu_utilisation:rate5m{kubernetes_node=~"k8s-[0-9]"}) * 100, 0.1) suffix: "%" colors: - { color: "green", min: 0, max: 35 } @@ -16,7 +20,7 @@ metrics: - { color: "red", min: 76, max: 9999 } - name: cluster_memory_usage - query: round(sum(node_memory_MemTotal_bytes{kubernetes_node=~"k8s-[0-9]+"} - node_memory_MemAvailable_bytes{kubernetes_node=~"k8s-[0-9]+"}) / sum(node_memory_MemTotal_bytes{kubernetes_node=~"k8s-[0-9]+"}) * 100, 0.1) + query: round(sum(node_memory_MemTotal_bytes{kubernetes_node=~"k8s-[0-9]"} - node_memory_MemAvailable_bytes{kubernetes_node=~"k8s-[0-9]"}) / sum(node_memory_MemTotal_bytes{kubernetes_node=~"k8s-[0-9]"}) * 100, 0.1) suffix: "%" colors: - { color: green, min: 0, max: 35 } @@ -32,7 +36,7 @@ metrics: - { color: "red", min: 751, max: 9999 } - name: cluster_age_days - query: round((time() - min(kube_node_created{kubernetes_node=~"k8s-[0-9]+"}) ) / 86400) + query: round((time() - min(kube_node_created{kubernetes_node=~"k8s-[0-9]"}) ) / 86400) suffix: "d" colors: - { color: "green", min: 0, max: 180 } @@ -40,7 +44,7 @@ metrics: - { color: "red", min: 361, max: 9999 } - name: cluster_uptime_days - query: round(avg(node_time_seconds{kubernetes_node=~"k8s-[0-9]+"} - node_boot_time_seconds{kubernetes_node=~"k8s-[0-9]+"}) / 86400) + query: round(avg(node_time_seconds{kubernetes_node=~"k8s-[0-9]"} - node_boot_time_seconds{kubernetes_node=~"k8s-[0-9]"}) / 86400) suffix: "d" colors: - { color: "green", min: 0, max: 180 }