From 56a78aa73aa2884c54adeaee98e89ac6a17a72d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Thu, 6 Aug 2026 09:54:40 +0200 Subject: [PATCH] feat: migrate argocd from k8s manifests to argo-helm --- .gitignore | 1 + k8s/argo-apps/adguard.yaml | 2 +- k8s/argo-apps/argo.yaml | 4 +- k8s/argo-apps/authentik.yaml | 2 +- k8s/argo-apps/dcsi.yaml | 2 +- k8s/argo-apps/forgejo.yaml | 2 +- k8s/argo-apps/huesporro.yaml | 2 +- k8s/argo-apps/immich.yaml | 2 +- k8s/argo-apps/kured.yaml | 2 +- k8s/argo-apps/meili.yaml | 2 +- k8s/argo-apps/miniflux.yaml | 2 +- k8s/argo-apps/oxicloud.yaml | 2 +- k8s/argo-apps/portainer.yaml | 2 +- k8s/argo-apps/renovate.yaml | 2 +- k8s/argo-apps/rustical.yaml | 78 +++++++++++++++ k8s/argo-apps/sealed-secrets.yaml | 2 +- k8s/argo-apps/tailscale.yaml | 2 +- k8s/argo-apps/vault-sm.yaml | 2 +- k8s/argo-apps/vaultwarden.yaml | 2 +- k8s/charts/rustical/Chart.yaml | 8 ++ k8s/charts/rustical/README.md | 3 + k8s/charts/rustical/templates/_helpers.tpl | 49 ++++++++++ k8s/charts/rustical/templates/deployment.yaml | 97 +++++++++++++++++++ k8s/charts/rustical/templates/ingress.yaml | 39 ++++++++ k8s/charts/rustical/templates/pvc.yaml | 14 +++ k8s/charts/rustical/templates/secret.yaml | 13 +++ k8s/charts/rustical/templates/service.yaml | 15 +++ k8s/charts/rustical/values.yaml | 44 +++++++++ k8s/helm/argo-cd/values.yaml | 30 ++++++ k8s/services/argo/appgen.yaml | 2 +- k8s/services/argo/argocd-cmd-params-cm.yaml | 11 --- k8s/services/argo/ingress-route.yaml | 16 +-- k8s/services/argo/project-fuku.yaml | 2 +- k8s/services/argo/project-management.yaml | 4 +- k8s/services/argo/project-roboces.yaml | 2 +- k8s/services/argo/repos.yaml | 14 +-- k8s/services/argo/tls-store.yaml | 9 ++ tofu/adguard/main.tf | 20 ++-- 38 files changed, 438 insertions(+), 69 deletions(-) create mode 100644 k8s/argo-apps/rustical.yaml create mode 100644 k8s/charts/rustical/Chart.yaml create mode 100644 k8s/charts/rustical/README.md create mode 100644 k8s/charts/rustical/templates/_helpers.tpl create mode 100644 k8s/charts/rustical/templates/deployment.yaml create mode 100644 k8s/charts/rustical/templates/ingress.yaml create mode 100644 k8s/charts/rustical/templates/pvc.yaml create mode 100644 k8s/charts/rustical/templates/secret.yaml create mode 100644 k8s/charts/rustical/templates/service.yaml create mode 100644 k8s/charts/rustical/values.yaml create mode 100644 k8s/helm/argo-cd/values.yaml delete mode 100644 k8s/services/argo/argocd-cmd-params-cm.yaml create mode 100644 k8s/services/argo/tls-store.yaml diff --git a/.gitignore b/.gitignore index 6ac9b78..79cc54d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ terraform.rc secrets.yaml .env *~ +*.tgz STABILITY.md diff --git a/k8s/argo-apps/adguard.yaml b/k8s/argo-apps/adguard.yaml index c1fa3ec..c36b601 100644 --- a/k8s/argo-apps/adguard.yaml +++ b/k8s/argo-apps/adguard.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: adguard - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/argo.yaml b/k8s/argo-apps/argo.yaml index bece7ee..d36d089 100644 --- a/k8s/argo-apps/argo.yaml +++ b/k8s/argo-apps/argo.yaml @@ -3,11 +3,11 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: argo - namespace: argocd + namespace: argo-cd spec: destination: name: '' - namespace: argocd + namespace: argo-cd server: https://kubernetes.default.svc sources: - repoURL: https://git.roboces.dev/catalin/fukuops.git diff --git a/k8s/argo-apps/authentik.yaml b/k8s/argo-apps/authentik.yaml index 46f1a45..2b55824 100644 --- a/k8s/argo-apps/authentik.yaml +++ b/k8s/argo-apps/authentik.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: authentik - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/dcsi.yaml b/k8s/argo-apps/dcsi.yaml index 9433de9..b67c794 100644 --- a/k8s/argo-apps/dcsi.yaml +++ b/k8s/argo-apps/dcsi.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: democratic-csi - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/forgejo.yaml b/k8s/argo-apps/forgejo.yaml index a5bc4bf..1341051 100644 --- a/k8s/argo-apps/forgejo.yaml +++ b/k8s/argo-apps/forgejo.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: forgejo - namespace: argocd + namespace: argo-cd annotations: argocd.argoproj.io/sync-options: Force=true,Replace=true spec: diff --git a/k8s/argo-apps/huesporro.yaml b/k8s/argo-apps/huesporro.yaml index 7321640..892a5c5 100644 --- a/k8s/argo-apps/huesporro.yaml +++ b/k8s/argo-apps/huesporro.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: huesoporro - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/immich.yaml b/k8s/argo-apps/immich.yaml index 3937981..5909eaf 100644 --- a/k8s/argo-apps/immich.yaml +++ b/k8s/argo-apps/immich.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: immich - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/kured.yaml b/k8s/argo-apps/kured.yaml index 5ab7b1d..b626c30 100644 --- a/k8s/argo-apps/kured.yaml +++ b/k8s/argo-apps/kured.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: kured - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/meili.yaml b/k8s/argo-apps/meili.yaml index 12d2ed0..9952e88 100644 --- a/k8s/argo-apps/meili.yaml +++ b/k8s/argo-apps/meili.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: meili - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/miniflux.yaml b/k8s/argo-apps/miniflux.yaml index ceed65a..f94de08 100644 --- a/k8s/argo-apps/miniflux.yaml +++ b/k8s/argo-apps/miniflux.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: miniflux - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/oxicloud.yaml b/k8s/argo-apps/oxicloud.yaml index 9f0596b..0f67c31 100644 --- a/k8s/argo-apps/oxicloud.yaml +++ b/k8s/argo-apps/oxicloud.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: oxicloud - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/portainer.yaml b/k8s/argo-apps/portainer.yaml index d9f3ef2..9b7f54d 100644 --- a/k8s/argo-apps/portainer.yaml +++ b/k8s/argo-apps/portainer.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: portainer - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/renovate.yaml b/k8s/argo-apps/renovate.yaml index 58f145d..967ef52 100644 --- a/k8s/argo-apps/renovate.yaml +++ b/k8s/argo-apps/renovate.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: renovate - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/rustical.yaml b/k8s/argo-apps/rustical.yaml new file mode 100644 index 0000000..d03ba02 --- /dev/null +++ b/k8s/argo-apps/rustical.yaml @@ -0,0 +1,78 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: rustical + namespace: argo-cd +spec: + destination: + name: '' + namespace: apps-roboces + server: https://kubernetes.default.svc + sources: + - repoURL: git.roboces.dev/catalin/fukuops + chart: rustical + targetRevision: 0.1.2 + helm: + valuesObject: + replicaCount: 1 + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsUser: 10000 + runAsGroup: 10000 + capabilities: + drop: + - all + service: + type: LoadBalancer + port: 8001 + ingress: + enabled: true + className: "traefik" + hosts: + - host: cal.roboces.dev + paths: + - path: / + pathType: Prefix + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + livenessProbe: + tcpSocket: + port: 4000 + initialDelaySeconds: 10 + timeoutSeconds: 15 + successThreshold: 1 + failureThreshold: 3 + periodSeconds: 10 + readinessProbe: + tcpSocket: + port: 4000 + initialDelaySeconds: 5 + timeoutSeconds: 2 + successThreshold: 1 + failureThreshold: 3 + periodSeconds: 10 + persistence: + enabled: true + rustical: + oidc: + name: "Authentik" + issuer: "https://auth.fukurokuju.dev/application/o/rustical/" + claim_userid: "preffered_username" + scopes: '["openid", "profile", "groups"]' + allow_sign_up: "true" + frontend: + allow_password_login: "false" + secret: + existingSecretName: rustical + project: roboces + syncPolicy: + automated: + prune: true + selfHeal: true diff --git a/k8s/argo-apps/sealed-secrets.yaml b/k8s/argo-apps/sealed-secrets.yaml index c180041..513e318 100644 --- a/k8s/argo-apps/sealed-secrets.yaml +++ b/k8s/argo-apps/sealed-secrets.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: sealed-secrets - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/tailscale.yaml b/k8s/argo-apps/tailscale.yaml index 797a89e..a49a6bd 100644 --- a/k8s/argo-apps/tailscale.yaml +++ b/k8s/argo-apps/tailscale.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: tailscale - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/vault-sm.yaml b/k8s/argo-apps/vault-sm.yaml index 401e9d1..7e7ba2c 100644 --- a/k8s/argo-apps/vault-sm.yaml +++ b/k8s/argo-apps/vault-sm.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: vault-sm - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/argo-apps/vaultwarden.yaml b/k8s/argo-apps/vaultwarden.yaml index be9c37e..55230c4 100644 --- a/k8s/argo-apps/vaultwarden.yaml +++ b/k8s/argo-apps/vaultwarden.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: vaultwarden - namespace: argocd + namespace: argo-cd spec: destination: name: '' diff --git a/k8s/charts/rustical/Chart.yaml b/k8s/charts/rustical/Chart.yaml new file mode 100644 index 0000000..fcc5b1c --- /dev/null +++ b/k8s/charts/rustical/Chart.yaml @@ -0,0 +1,8 @@ +apiVersion: v2 +name: rustical +description: A Helm chart for Rustical +type: application +version: 0.1.2 +appVersion: 0.14.1 +annotations: + artifacthub.io/images: "- name: rustical\n image: ghcr.io/lennart-k/rustical:0.14.1\n" diff --git a/k8s/charts/rustical/README.md b/k8s/charts/rustical/README.md new file mode 100644 index 0000000..1b22d4f --- /dev/null +++ b/k8s/charts/rustical/README.md @@ -0,0 +1,3 @@ +# Rustical + +A Helm chart for [Rustical](https://github.com/lennart-k/rustical), an LDAP address book application. diff --git a/k8s/charts/rustical/templates/_helpers.tpl b/k8s/charts/rustical/templates/_helpers.tpl new file mode 100644 index 0000000..ea556e4 --- /dev/null +++ b/k8s/charts/rustical/templates/_helpers.tpl @@ -0,0 +1,49 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "rustical.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +*/}} +{{- define "rustical.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "rustical.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "rustical.labels" -}} +helm.sh/chart: {{ include "rustical.chart" . }} +{{ include "rustical.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "rustical.selectorLabels" -}} +app.kubernetes.io/name: {{ include "rustical.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/k8s/charts/rustical/templates/deployment.yaml b/k8s/charts/rustical/templates/deployment.yaml new file mode 100644 index 0000000..8cb8860 --- /dev/null +++ b/k8s/charts/rustical/templates/deployment.yaml @@ -0,0 +1,97 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "rustical.fullname" . }} + labels: + {{- include "rustical.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "rustical.selectorLabels" . | nindent 6 }} + strategy: + rollingUpdate: + maxSurge: 50% + maxUnavailable: 50% + type: RollingUpdate + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "rustical.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullpolicy }} + {{- if or .Values.secret.existingSecretName .Values.secret.enabled }} + envFrom: + - secretRef: + name: {{ .Values.secret.existingSecretName | default (include "rustical.fullname" .) }} + {{- end }} + env: + {{- range $key, $value := .Values.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- range $section, $items := .Values.rustical }} + {{- range $key, $value := $items }} + {{- if not (eq $value nil) }} + - name: {{ printf "RUSTICAL_%s__%s" (upper $section) (upper $key) }} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- end }} + ports: + - name: http + containerPort: 4000 + protocol: TCP + {{- if .Values.persistence.enabled }} + volumeMounts: + - name: data + mountPath: {{ .Values.persistence.mountPath }} + {{- end }} + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if .Values.persistence.enabled }} + volumes: + - name: data + {{- if .Values.persistence.existingClaim }} + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim }} + {{- else }} + persistentVolumeClaim: + claimName: {{ include "rustical.fullname" . }}-pvc + {{- end }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + restartPolicy: Always + automountServiceAccountToken: false diff --git a/k8s/charts/rustical/templates/ingress.yaml b/k8s/charts/rustical/templates/ingress.yaml new file mode 100644 index 0000000..2af349b --- /dev/null +++ b/k8s/charts/rustical/templates/ingress.yaml @@ -0,0 +1,39 @@ +{{- if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "rustical.fullname" . }} + labels: + {{- include "rustical.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ include "rustical.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/k8s/charts/rustical/templates/pvc.yaml b/k8s/charts/rustical/templates/pvc.yaml new file mode 100644 index 0000000..69ed239 --- /dev/null +++ b/k8s/charts/rustical/templates/pvc.yaml @@ -0,0 +1,14 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "rustical.fullname" . }}-pvc + labels: + {{- include "rustical.labels" . | nindent 4 }} +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- end }} diff --git a/k8s/charts/rustical/templates/secret.yaml b/k8s/charts/rustical/templates/secret.yaml new file mode 100644 index 0000000..c6d6f4f --- /dev/null +++ b/k8s/charts/rustical/templates/secret.yaml @@ -0,0 +1,13 @@ +{{- if and .Values.secret.enabled (not .Values.secret.existingSecretName) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "rustical.fullname" . }} + labels: + {{- include "rustical.labels" . | nindent 4 }} +type: Opaque +stringData: + {{- range $key, $value := .Values.secret.data }} + {{ $key }}: {{ $value | quote }} + {{- end }} +{{- end }} diff --git a/k8s/charts/rustical/templates/service.yaml b/k8s/charts/rustical/templates/service.yaml new file mode 100644 index 0000000..12b588c --- /dev/null +++ b/k8s/charts/rustical/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "rustical.fullname" . }} + labels: + {{- include "rustical.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + name: http + selector: + {{- include "rustical.selectorLabels" . | nindent 4 }} diff --git a/k8s/charts/rustical/values.yaml b/k8s/charts/rustical/values.yaml new file mode 100644 index 0000000..eaea922 --- /dev/null +++ b/k8s/charts/rustical/values.yaml @@ -0,0 +1,44 @@ +replicaCount: 1 + +image: + repository: ghcr.io/lennart-k/rustical + pullpolicy: IfNotPresent + tag: "" + +imagePullSecrets: [] +podAnnotations: {} +podSecurityContext: {} +securityContext: {} + +service: + type: ClusterIP + port: 4000 + targetPort: 4000 + +ingress: + enabled: false + +resources: {} + +livenessProbe: {} +readinessProbe: {} + +autoscaling: + enabled: false + +nodeSelector: {} +tolerations: [] +affinity: {} + +rustical: {} + +secret: + enabled: false + existingSecretName: "" + data: {} + +persistence: + enabled: true + existingClaim: "" + size: "1Gi" + mountPath: /var/lib/rustical/ diff --git a/k8s/helm/argo-cd/values.yaml b/k8s/helm/argo-cd/values.yaml new file mode 100644 index 0000000..ffba92a --- /dev/null +++ b/k8s/helm/argo-cd/values.yaml @@ -0,0 +1,30 @@ +--- +global: + domain: argo.fuku + +configs: + params: + server.insecure: true + +server: + service: + type: LoadBalancer + servicePortHttp: 8002 + servicePortHttps: 8003 + +redis: + image: + repository: docker.io/library/redis + tag: 8.2.3-alpine + +repoServer: + livenessProbe: + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 10 + readinessProbe: + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 10 diff --git a/k8s/services/argo/appgen.yaml b/k8s/services/argo/appgen.yaml index 51c9691..24e1e32 100644 --- a/k8s/services/argo/appgen.yaml +++ b/k8s/services/argo/appgen.yaml @@ -3,7 +3,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: fukuops-appgen - namespace: argocd + namespace: argo-cd finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/k8s/services/argo/argocd-cmd-params-cm.yaml b/k8s/services/argo/argocd-cmd-params-cm.yaml deleted file mode 100644 index 06568fb..0000000 --- a/k8s/services/argo/argocd-cmd-params-cm.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: argocd-cmd-params-cm - namespace: argocd - labels: - app.kubernetes.io/name: argocd-cmd-params-cm - app.kubernetes.io/part-of: argocd -data: - server.insecure: 'true' diff --git a/k8s/services/argo/ingress-route.yaml b/k8s/services/argo/ingress-route.yaml index b11954d..227ea5f 100644 --- a/k8s/services/argo/ingress-route.yaml +++ b/k8s/services/argo/ingress-route.yaml @@ -3,24 +3,16 @@ apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: argocd-server - namespace: argocd + namespace: argo-cd spec: entryPoints: - websecure - - web routes: - kind: Rule match: Host(`argo.fuku`) priority: 10 services: - - name: argocd-server - port: 80 - - kind: Rule - match: Host(`argo.fuku`) && Headers(`Content-Type`, `application/grpc`) - priority: 11 - services: - - name: argocd-server - port: 80 - scheme: h2c + - name: argo-cd-argocd-server + port: 8002 tls: - certResolver: default + secretName: argocd-server-tls diff --git a/k8s/services/argo/project-fuku.yaml b/k8s/services/argo/project-fuku.yaml index 3b6b9f8..adfc1a7 100644 --- a/k8s/services/argo/project-fuku.yaml +++ b/k8s/services/argo/project-fuku.yaml @@ -2,7 +2,7 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - namespace: argocd + namespace: argo-cd name: fuku spec: destinations: diff --git a/k8s/services/argo/project-management.yaml b/k8s/services/argo/project-management.yaml index 7bf1d47..b150487 100644 --- a/k8s/services/argo/project-management.yaml +++ b/k8s/services/argo/project-management.yaml @@ -2,11 +2,11 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - namespace: argocd + namespace: argo-cd name: management spec: destinations: - - namespace: argocd + - namespace: argo-cd server: https://kubernetes.default.svc - namespace: democratic-csi server: https://kubernetes.default.svc diff --git a/k8s/services/argo/project-roboces.yaml b/k8s/services/argo/project-roboces.yaml index 57f8cfc..e24b9c9 100644 --- a/k8s/services/argo/project-roboces.yaml +++ b/k8s/services/argo/project-roboces.yaml @@ -2,7 +2,7 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - namespace: argocd + namespace: argo-cd name: roboces spec: destinations: diff --git a/k8s/services/argo/repos.yaml b/k8s/services/argo/repos.yaml index 096649b..1c6004d 100644 --- a/k8s/services/argo/repos.yaml +++ b/k8s/services/argo/repos.yaml @@ -1,20 +1,10 @@ --- apiVersion: v1 kind: Secret -metadata: - name: fuku-services - namespace: argocd - labels: - argocd.argoproj.io/secret-type: repository -stringData: - url: https://gitlab.com/fukurokuju/k3s/services.git ---- -apiVersion: v1 -kind: Secret metadata: name: fukuops-repo - namespace: argocd + namespace: argo-cd labels: argocd.argoproj.io/secret-type: repository stringData: - url: https://git.roboces.dev/catalin/fukuops.git + url: "https://git.roboces.dev/catalin/fukuops.git" diff --git a/k8s/services/argo/tls-store.yaml b/k8s/services/argo/tls-store.yaml new file mode 100644 index 0000000..e635b5c --- /dev/null +++ b/k8s/services/argo/tls-store.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: traefik.io/v1alpha1 +kind: TLSStore +metadata: + name: default + namespace: argo-cd +spec: + certificates: + - secretName: argocd-server-tls diff --git a/tofu/adguard/main.tf b/tofu/adguard/main.tf index e370d4c..217f35b 100644 --- a/tofu/adguard/main.tf +++ b/tofu/adguard/main.tf @@ -42,20 +42,11 @@ resource "adguard_rewrite" "ireul" { answer = "192.168.1.6" } -resource "adguard_rewrite" "argo_1" { +resource "adguard_rewrite" "argo" { domain = "argo.fuku" - answer = "192.168.1.31" + answer = "192.168.1.12" } -resource "adguard_rewrite" "argo_2" { - domain = "argo.fuku" - answer = "192.168.1.32" -} - -resource "adguard_rewrite" "argo_3" { - domain = "argo.fuku" - answer = "192.168.1.33" -} resource "adguard_rewrite" "feeds" { domain = "feeds.roboces.dev" answer = "192.168.1.12" @@ -105,11 +96,18 @@ resource "adguard_rewrite" "pgadmin" { domain = "pgadmin.fuku" answer = "192.168.1.12" } + resource "adguard_rewrite" "d1" { domain = "d1.fuku" answer = "192.168.1.10" } + resource "adguard_rewrite" "d2" { domain = "d1.fuku" answer = "192.168.1.13" } + +resource "adguard_rewrite" "vault" { + domain = "vault.roboces.dev" + answer = "192.168.1.12" +}