From 1bc1939bcad8ddd7bcaaabb33392aae74eb9cdc0 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Mon, 22 May 2023 07:31:06 +0700 Subject: [PATCH] refactor: updates for dev (always use rebase to update) --- Makefile | 1 + apps/matrix/values.yaml | 8 ++++---- apps/paperless/values.yaml | 2 +- external/modules/cloudflare/main.tf | 2 +- metal/Makefile | 6 +++++- platform/dex/values.yaml | 6 +++--- platform/gitea/files/config/go.mod | 2 +- platform/gitea/values.yaml | 2 +- platform/grafana/values.yaml | 10 +++++----- platform/renovate/values.yaml | 2 +- system/argocd/values-seed.yaml | 2 +- system/argocd/values.yaml | 4 ++-- 12 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 536672c4..ceb14e4b 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,7 @@ test: clean: docker compose --project-directory ./metal/roles/pxe_server/files down + k3d cluster delete homelab-dev docs: mkdocs serve diff --git a/apps/matrix/values.yaml b/apps/matrix/values.yaml index 61c65f15..9518298d 100644 --- a/apps/matrix/values.yaml +++ b/apps/matrix/values.yaml @@ -4,10 +4,10 @@ elementweb: className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod - external-dns.alpha.kubernetes.io/target: "homelab-tunnel.khuedoan.com" + external-dns.alpha.kubernetes.io/target: "homelab-tunnel.127-0-0-1.nip.io" external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" hosts: - - host: &frontend_host chat.khuedoan.com + - host: &frontend_host chat.127-0-0-1.nip.io paths: - path: / pathType: Prefix @@ -17,8 +17,8 @@ elementweb: - *frontend_host config: default: - base_url: https://matrix.khuedoan.com - server_name: khuedoan.com + base_url: https://matrix.127-0-0-1.nip.io + server_name: 127-0-0-1.nip.io dendrite: dendrite_config: diff --git a/apps/paperless/values.yaml b/apps/paperless/values.yaml index 61e12fe7..9d4076cb 100644 --- a/apps/paperless/values.yaml +++ b/apps/paperless/values.yaml @@ -29,7 +29,7 @@ app-template: annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - - host: &host paperless.khuedoan.com + - host: &host paperless.127-0-0-1.nip.io paths: - path: / pathType: Prefix diff --git a/external/modules/cloudflare/main.tf b/external/modules/cloudflare/main.tf index 62467168..1ac7e326 100644 --- a/external/modules/cloudflare/main.tf +++ b/external/modules/cloudflare/main.tf @@ -1,5 +1,5 @@ data "cloudflare_zone" "zone" { - name = "khuedoan.com" + name = "127-0-0-1.nip.io" } data "cloudflare_api_token_permission_groups" "all" {} diff --git a/metal/Makefile b/metal/Makefile index 43008306..4c4325b2 100644 --- a/metal/Makefile +++ b/metal/Makefile @@ -3,7 +3,7 @@ env ?= prod export KUBECONFIG = $(shell pwd)/kubeconfig.yaml -default: boot cluster +default: k3d ~/.ssh/id_ed25519: ssh-keygen -t ed25519 -P '' -f "$@" @@ -21,3 +21,7 @@ cluster: console: ansible-console \ --inventory inventories/${env}.yml + +k3d: + k3d cluster start homelab-dev || k3d cluster create --config k3d-dev.yaml + k3d kubeconfig get homelab-dev > kubeconfig.yaml diff --git a/platform/dex/values.yaml b/platform/dex/values.yaml index 248aef43..07bb0271 100644 --- a/platform/dex/values.yaml +++ b/platform/dex/values.yaml @@ -1,6 +1,6 @@ dex: config: - issuer: https://dex.khuedoan.com + issuer: https://dex.127-0-0-1.nip.io storage: type: kubernetes config: @@ -27,7 +27,7 @@ dex: - id: grafana-sso name: Grafana redirectURIs: - - 'https://grafana.khuedoan.com/login/generic_oauth' + - 'https://grafana.127-0-0-1.nip.io/login/generic_oauth' secretEnv: GRAFANA_SSO_CLIENT_SECRET - id: gitea name: Gitea @@ -43,7 +43,7 @@ dex: annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - - host: &host dex.khuedoan.com + - host: &host dex.127-0-0-1.nip.io paths: - path: / pathType: ImplementationSpecific diff --git a/platform/gitea/files/config/go.mod b/platform/gitea/files/config/go.mod index b46e1045..8a20da58 100644 --- a/platform/gitea/files/config/go.mod +++ b/platform/gitea/files/config/go.mod @@ -1,4 +1,4 @@ -module git.khuedoan.com/khuedoan/homelab/gitea/config +module git.127-0-0-1.nip.io/khuedoan/homelab/gitea/config go 1.19 diff --git a/platform/gitea/values.yaml b/platform/gitea/values.yaml index e40faab0..a4a578fe 100644 --- a/platform/gitea/values.yaml +++ b/platform/gitea/values.yaml @@ -5,7 +5,7 @@ gitea: annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - - host: &host git.khuedoan.com + - host: &host git.127-0-0-1.nip.io paths: - path: / pathType: Prefix diff --git a/platform/grafana/values.yaml b/platform/grafana/values.yaml index 474736e0..57b3470c 100644 --- a/platform/grafana/values.yaml +++ b/platform/grafana/values.yaml @@ -5,7 +5,7 @@ grafana: annotations: cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - - &host grafana.khuedoan.com + - &host grafana.127-0-0-1.nip.io tls: - secretName: grafana-general-tls hosts: @@ -20,7 +20,7 @@ grafana: envFromSecret: grafana-secrets grafana.ini: server: - root_url: https://grafana.khuedoan.com + root_url: https://grafana.127-0-0-1.nip.io auth.generic_oauth: enabled: true allow_sign_up: true @@ -28,6 +28,6 @@ grafana: client_id: grafana-sso client_secret: $__env{GRAFANA_SSO_CLIENT_SECRET} scopes: openid profile email groups - auth_url: https://dex.khuedoan.com/auth - token_url: https://dex.khuedoan.com/token - api_url: https://dex.khuedoan.com/userinfo + auth_url: https://dex.127-0-0-1.nip.io/auth + token_url: https://dex.127-0-0-1.nip.io/token + api_url: https://dex.127-0-0-1.nip.io/userinfo diff --git a/platform/renovate/values.yaml b/platform/renovate/values.yaml index 577f76fa..5640aed9 100644 --- a/platform/renovate/values.yaml +++ b/platform/renovate/values.yaml @@ -5,7 +5,7 @@ renovate: config: | { "platform": "gitea", - "endpoint": "https://git.khuedoan.com/api/v1", + "endpoint": "https://git.127-0-0-1.nip.io/api/v1", "gitAuthor": "Renovate Bot ", "autodiscover": true } diff --git a/system/argocd/values-seed.yaml b/system/argocd/values-seed.yaml index 4e8b3c90..7e26c90b 100644 --- a/system/argocd/values-seed.yaml +++ b/system/argocd/values-seed.yaml @@ -16,7 +16,7 @@ argocd-apps: generators: - git: repoURL: &repoURL https://github.com/khuedoan/homelab - revision: &revision master + revision: &revision dev directories: - path: system/* - path: platform/* diff --git a/system/argocd/values.yaml b/system/argocd/values.yaml index 1797ae3d..9576c61b 100644 --- a/system/argocd/values.yaml +++ b/system/argocd/values.yaml @@ -1,6 +1,6 @@ argo-cd: global: - domain: argocd.khuedoan.com + domain: argocd.127-0-0-1.nip.io configs: params: server.insecure: true @@ -36,7 +36,7 @@ argocd-apps: generators: - git: repoURL: &repoURL http://gitea-http.gitea:3000/ops/homelab - revision: &revision master + revision: &revision dev directories: - path: system/* - path: platform/*