about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authormakefunstuff <[email protected]>2024-06-28 12:30:53 +0200
committermakefunstuff <[email protected]>2024-06-28 12:30:53 +0200
commit44cccb5f6b75c532aa6b097e2989d7581e78869e (patch)
treead2d4b607ce63210707d3ddc26a9c88301544bb4 /tools
parent303262c75bd8d3ad2e166760f0518a0d8aa0591c (diff)
downloadk3s-lab-44cccb5f6b75c532aa6b097e2989d7581e78869e.tar.gz
proper refactoring
Diffstat (limited to '')
-rw-r--r--tools/argocd/Chart.yaml0
-rw-r--r--tools/argocd/templates/deployment.yaml31
-rw-r--r--tools/argocd/templates/ingress.yaml28
-rw-r--r--tools/argocd/templates/service.yaml12
-rw-r--r--tools/argocd/values.yaml9
-rw-r--r--tools/cert-manager/Chart.yaml9
-rw-r--r--tools/cert-manager/templates/cluserissuer.yaml (renamed from kubernetes/letsencrypt.yaml)4
7 files changed, 92 insertions, 1 deletions
diff --git a/tools/argocd/Chart.yaml b/tools/argocd/Chart.yaml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/argocd/Chart.yaml
diff --git a/tools/argocd/templates/deployment.yaml b/tools/argocd/templates/deployment.yaml
new file mode 100644
index 0000000..b2fa31e
--- /dev/null
+++ b/tools/argocd/templates/deployment.yaml
@@ -0,0 +1,31 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: argocd
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: argocd-server
+  namespace: argocd
+spec:
+  replicas: { { .Values.replicas "1" } }
+  selector:
+    matchLabels:
+      app: argocd-server
+  template:
+    metadata:
+      labels:
+        app: argocd-server
+    spec:
+      containers:
+        - name: argocd-server
+          image: argoproj/argocd:latest
+          ports:
+            - containerPort: 8080
+          env:
+            - name: ARGOCD_SERVER_ADMIN_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: argocd-server
+                  key: admin.password
diff --git a/tools/argocd/templates/ingress.yaml b/tools/argocd/templates/ingress.yaml
new file mode 100644
index 0000000..5793540
--- /dev/null
+++ b/tools/argocd/templates/ingress.yaml
@@ -0,0 +1,28 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: argocd-ingress
+  namespace: { { .Values.namespace } }
+  annotations:
+    kubernetes.io/ingress.class:
+      { { .Values.ingress.annotations."kubernetes.io/ingress.class" } }
+    cert-manager.io/cluster-issuer: letsencrypt-prod
+    traefik.ingress.kubernetes.io/redirect-entry-point: https
+    traefik.ingress.kubernetes.io/ssl-redirect: "true"
+    traefik.ingress.kubernetes.io/tls-acme: "true"
+spec:
+  rules:
+    - host: { { .Values.ingress.hostname } }
+      http:
+        paths:
+          - path: /
+            pathType: Prefix
+            backend:
+              service:
+                name: argocd-server
+                port:
+                  number: 80
+  tls:
+    - hosts:
+        - { { .Values.ingress.hostname } }
+      secretName: { { .Values.ingress.tls.secretName } }
diff --git a/tools/argocd/templates/service.yaml b/tools/argocd/templates/service.yaml
new file mode 100644
index 0000000..9a6afdf
--- /dev/null
+++ b/tools/argocd/templates/service.yaml
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: argocd-server
+  namespace: argocd
+spec:
+  type: ClusterIP
+  ports:
+    - port: 80
+      targetPort: 8080
+  selector:
+    app: argocd-server
diff --git a/tools/argocd/values.yaml b/tools/argocd/values.yaml
new file mode 100644
index 0000000..01c169c
--- /dev/null
+++ b/tools/argocd/values.yaml
@@ -0,0 +1,9 @@
+namespace: argocd
+ingress:
+  enabled: true
+  hostname: argocd.topkek.cloud
+  annotations:
+    kubernetes.io/ingress.class: "traefik"
+  tls:
+    enabled: true
+    secretName: argocd-tls
diff --git a/tools/cert-manager/Chart.yaml b/tools/cert-manager/Chart.yaml
new file mode 100644
index 0000000..9dd7d68
--- /dev/null
+++ b/tools/cert-manager/Chart.yaml
@@ -0,0 +1,9 @@
+apiVersion: v2
+name: cert-manager
+description: A Helm chart for Cert-Manager
+version: 0.1.0
+appVersion: v1.8.0
+dependencies:
+  - name: cert-manager
+    version: v1.8.0
+    repository: https://charts.jetstack.io
diff --git a/kubernetes/letsencrypt.yaml b/tools/cert-manager/templates/cluserissuer.yaml
index 8e018db..f3ecf79 100644
--- a/kubernetes/letsencrypt.yaml
+++ b/tools/cert-manager/templates/cluserissuer.yaml
@@ -5,7 +5,9 @@ metadata:
 spec:
   acme:
     server: https://acme-v02.api.letsencrypt.org/directory
-    email: [email protected]
+    emailSecretRef:
+      name: letsencrypt-email-secret
+      key: email
     privateKeySecretRef:
       name: letsencrypt-prod
     solvers: