diff --git a/api/Chart.yaml b/api/Chart.yaml new file mode 100644 index 0000000..469beeb --- /dev/null +++ b/api/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: api +description: A Helm chart for Kubernetes +type: application +version: 0.0.1 +appVersion: 0.0.1 diff --git a/api/templates/ingress.yaml b/api/templates/ingress.yaml new file mode 100644 index 0000000..8da587e --- /dev/null +++ b/api/templates/ingress.yaml @@ -0,0 +1,33 @@ +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: "{{ .Chart.Name }}-ingress" +spec: + entryPoints: + - websecure + routes: + - match: Host("api.durp.info") && Path(`/durpapi`) + middlewares: + - name: authentik-proxy-provider + namespace: traefik + kind: Rule + services: + - name: durpapi-service.durpapi.traefik.mesh + port: 80 + tls: + secretName: durpapi-tls + +--- + +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: durpapi-tls +spec: + secretName: durpapi-tls + issuerRef: + name: letsencrypt-production + kind: ClusterIssuer + commonName: api.durp.info + dnsNames: + - api.durp.info diff --git a/argocd/templates/api.yaml b/argocd/templates/api.yaml new file mode 100644 index 0000000..46808c2 --- /dev/null +++ b/argocd/templates/api.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: api + namespace: argocd +spec: + project: default + source: + repoURL: https://gitlab.com/developerdurp/homelab.git + targetRevision: main + path: api + destination: + namespace: api + name: in-cluster + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/durpapi/templates/ingress.yaml b/durpapi/templates/ingress.yaml index a8d4f4e..240f71f 100644 --- a/durpapi/templates/ingress.yaml +++ b/durpapi/templates/ingress.yaml @@ -1,33 +1,33 @@ -apiVersion: traefik.containo.us/v1alpha1 -kind: IngressRoute -metadata: - name: "{{ .Chart.Name }}-ingress" -spec: - entryPoints: - - websecure - routes: - - match: Host("api.durp.info") && Path(`/durpapi`) - middlewares: - - name: authentik-proxy-provider - namespace: traefik - kind: Rule - services: - - name: durpapi-service - port: 80 - tls: - secretName: durpapi-tls - ---- - -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: durpapi-tls -spec: - secretName: durpapi-tls - issuerRef: - name: letsencrypt-production - kind: ClusterIssuer - commonName: api.durp.info - dnsNames: - - api.durp.info +#apiVersion: traefik.containo.us/v1alpha1 +#kind: IngressRoute +#metadata: +# name: "{{ .Chart.Name }}-ingress" +#spec: +# entryPoints: +# - websecure +# routes: +# - match: Host("api.durp.info") && Path(`/durpapi`) +# middlewares: +# - name: authentik-proxy-provider +# namespace: traefik +# kind: Rule +# services: +# - name: durpapi-service +# port: 80 +# tls: +# secretName: durpapi-tls +# +#--- +# +#apiVersion: cert-manager.io/v1 +#kind: Certificate +#metadata: +# name: durpapi-tls +#spec: +# secretName: durpapi-tls +# issuerRef: +# name: letsencrypt-production +# kind: ClusterIssuer +# commonName: api.durp.info +# dnsNames: +# - api.durp.info