diff --git a/dmz/internalproxy/templates/redlib.yaml b/dmz/internalproxy/templates/redlib.yaml index eee1201..43b54fb 100644 --- a/dmz/internalproxy/templates/redlib.yaml +++ b/dmz/internalproxy/templates/redlib.yaml @@ -1,74 +1,74 @@ -apiVersion: v1 -kind: Service -metadata: - name: redlib -spec: - ports: - - name: app - port: 8082 - protocol: TCP - targetPort: 8082 - clusterIP: None - type: ClusterIP - ---- - -apiVersion: v1 -kind: Endpoints -metadata: - name: redlib -subsets: -- addresses: - - ip: 192.168.21.200 - ports: - - name: app - port: 8082 - protocol: TCP - ---- - -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute -metadata: - name: redlib-ingress -spec: - entryPoints: - - websecure - routes: - - match: Host(`redlib.durp.info`) && PathPrefix(`/`) - middlewares: - - name: authentik-proxy-provider - namespace: traefik - kind: Rule - services: - - name: redlib - port: 8082 - tls: - secretName: redlib-tls - ---- - -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: redlib-tls -spec: - secretName: redlib-tls - issuerRef: - name: letsencrypt-production - kind: ClusterIssuer - commonName: "redlib.durp.info" - dnsNames: - - "redlib.durp.info" - ---- - -kind: Service -apiVersion: v1 -metadata: - name: redlib-external-dns - annotations: - external-dns.alpha.kubernetes.io/hostname: redlib.durp.info -spec: - type: ExternalName - externalName: durp.info +#apiVersion: v1 +#kind: Service +#metadata: +# name: redlib +#spec: +# ports: +# - name: app +# port: 8082 +# protocol: TCP +# targetPort: 8082 +# clusterIP: None +# type: ClusterIP +# +#--- +# +#apiVersion: v1 +#kind: Endpoints +#metadata: +# name: redlib +#subsets: +#- addresses: +# - ip: 192.168.21.200 +# ports: +# - name: app +# port: 8082 +# protocol: TCP +# +#--- +# +#apiVersion: traefik.io/v1alpha1 +#kind: IngressRoute +#metadata: +# name: redlib-ingress +#spec: +# entryPoints: +# - websecure +# routes: +# - match: Host(`redlib.durp.info`) && PathPrefix(`/`) +# middlewares: +# - name: authentik-proxy-provider +# namespace: traefik +# kind: Rule +# services: +# - name: redlib +# port: 8082 +# tls: +# secretName: redlib-tls +# +#--- +# +#apiVersion: cert-manager.io/v1 +#kind: Certificate +#metadata: +# name: redlib-tls +#spec: +# secretName: redlib-tls +# issuerRef: +# name: letsencrypt-production +# kind: ClusterIssuer +# commonName: "redlib.durp.info" +# dnsNames: +# - "redlib.durp.info" +# +#--- +# +#kind: Service +#apiVersion: v1 +#metadata: +# name: redlib-external-dns +# annotations: +# external-dns.alpha.kubernetes.io/hostname: redlib.durp.info +#spec: +# type: ExternalName +# externalName: durp.info diff --git a/dmz/redlib/Chart.yaml b/dmz/redlib/Chart.yaml new file mode 100644 index 0000000..ef0a939 --- /dev/null +++ b/dmz/redlib/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +name: redlib +description: A Helm chart for Kubernetes +type: application + +version: 0.1.0 +appVersion: "1.16.0" diff --git a/dmz/redlib/templates/deployment.yaml b/dmz/redlib/templates/deployment.yaml new file mode 100644 index 0000000..0e20610 --- /dev/null +++ b/dmz/redlib/templates/deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: redlib + name: redlib + labels: + app: redlib +spec: + selector: + matchLabels: + app: redlib + replicas: 3 + template: + metadata: + labels: + app: redlib + spec: + containers: + - name: redlib + image: registry.durp.info/redlib/redlib:latest + imagePullPolicy: Always + livenessProbe: + httpGet: + path: / + port: 8080 + readinessProbe: + httpGet: + path: / + port: 8080 + env: + ports: + - name: http + containerPort: 8080 diff --git a/dmz/redlib/templates/ingress.yaml b/dmz/redlib/templates/ingress.yaml new file mode 100644 index 0000000..6b4cbb6 --- /dev/null +++ b/dmz/redlib/templates/ingress.yaml @@ -0,0 +1,42 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: redlib-ingress +spec: + entryPoints: + - websecure + routes: + - match: Host(`links.durp.info`) && PathPrefix(`/`) + kind: Rule + services: + - name: redlib + port: 8080 + tls: + secretName: redlib-tls + +--- + +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: redlib-tls +spec: + secretName: redlib-tls + issuerRef: + name: letsencrypt-production + kind: ClusterIssuer + commonName: "redlib.durp.info" + dnsNames: + - "redlib.durp.info" + +--- + +kind: Service +apiVersion: v1 +metadata: + name: redlib-external-dns + annotations: + external-dns.alpha.kubernetes.io/hostname: redlib.durp.info +spec: + type: ExternalName + externalName: durp.info diff --git a/dmz/redlib/templates/service.yaml b/dmz/redlib/templates/service.yaml new file mode 100644 index 0000000..36c50c5 --- /dev/null +++ b/dmz/redlib/templates/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: redlib +spec: + ports: + - name: http + port: 8080 + targetPort: 8080 + protocol: TCP + selector: + app: redlib diff --git a/dmz/redlib/values.yaml b/dmz/redlib/values.yaml new file mode 100644 index 0000000..e69de29 diff --git a/infra/argocd/templates/redlib.yaml b/infra/argocd/templates/redlib.yaml new file mode 100644 index 0000000..901c316 --- /dev/null +++ b/infra/argocd/templates/redlib.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: redlib + namespace: argocd +spec: + project: default + source: + repoURL: https://gitlab.com/developerdurp/homelab.git + targetRevision: main + path: dmz/redlib + directory: + recurse: true + destination: + name: dmz + namespace: redlib + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true