ingress
This commit is contained in:
1 parent
0f018c002e
commit
74ec0c3815
4 files changed
+28
-16
No files matched your search
@@ -4,7 +4,7 @@
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: "tls-{{.prefix}}.{{ .domain }}"
|
||||
name: "tls-{{.prefix}}{{ .domain }}"
|
||||
namespace: {{ .namespace }}
|
||||
spec:
|
||||
refreshInterval: 1h
|
||||
@@ -12,7 +12,7 @@ spec:
|
||||
kind: ClusterSecretStore
|
||||
name: k8s-ns-certs
|
||||
target:
|
||||
name: tls-{{.prefix}}.{{ .domain }}
|
||||
name: tls-{{.prefix}}{{ .domain }}
|
||||
creationPolicy: Owner
|
||||
deletionPolicy: Delete
|
||||
data:
|
||||
@@ -29,15 +29,15 @@ spec:
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "tls-{{.prefix}}.{{ .domain }}"
|
||||
name: "tls-{{.prefix}}{{ .domain }}"
|
||||
namespace: {{ .namespace }}
|
||||
spec:
|
||||
secretName: "tls-{{.prefix}}.{{ .domain }}"
|
||||
secretName: "tls-{{.prefix}}{{ .domain }}"
|
||||
issuerRef:
|
||||
kind: ClusterIssuer
|
||||
name: "{{ .global.tls.issuer }}"
|
||||
commonName: "{{.prefix}}.{{ .domain }}"
|
||||
name: "{{ .global.dns.tls.issuer }}"
|
||||
commonName: "{{.prefix}}{{ .domain }}"
|
||||
dnsNames:
|
||||
- "{{.prefix}}.{{ .domain }}"
|
||||
- "{{.prefix}}{{ .domain }}"
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -1,12 +1,12 @@
|
||||
{{- define "homelab.ingress.domain" -}}
|
||||
{{- $rootPrefix := empty .leadPrefix | ternary "" (printf "%s." .leadPrefix) -}}
|
||||
{{- if .useSecondaryDomain -}}
|
||||
{{$rootPrefix}}{{.global.secondaryDomain}}
|
||||
{{$rootPrefix}}{{.global.dns.secondary.root}}.{{.global.dns.secondary.domain}}
|
||||
{{- else -}}
|
||||
{{- if .useDirectPrefix -}}
|
||||
{{$rootPrefix}}{{.global.domain}}
|
||||
{{$rootPrefix}}{{.global.dns.primary.domain}}
|
||||
{{- else -}}
|
||||
{{$rootPrefix}}{{.global.rootSubDomain}}.{{.global.domain}}
|
||||
{{$rootPrefix}}{{.global.dns.primary.root}}.{{.global.dns.primary.domain}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
# .domain = {{ .domain }}
|
||||
# .prefix = {{ .prefix }}
|
||||
{{ if .global.tls.enabled }}
|
||||
{{ if .global.dns.tls.enabled }}
|
||||
{{ include "homelab.ingress.domain.tls" . }}
|
||||
{{ end }}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: "{{.prefix}}.{{ $domain }}"
|
||||
name: "{{.prefix}}{{ $domain }}"
|
||||
namespace: {{ .namespace }}
|
||||
annotations:
|
||||
homelab-ingress/managing-app-namespace: "apps-ingresses"
|
||||
@@ -63,7 +63,7 @@ metadata:
|
||||
{{ end }}
|
||||
spec:
|
||||
rules:
|
||||
- host: "{{.prefix}}.{{ $domain }}"
|
||||
- host: "{{.prefix}}{{ $domain }}"
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
@@ -73,11 +73,11 @@ spec:
|
||||
number: {{.port | default 80}}
|
||||
path: {{ .path | default "/" }}
|
||||
pathType: Prefix
|
||||
{{ if .global.tls.enabled }}
|
||||
{{ if .global.dns.tls.enabled }}
|
||||
tls:
|
||||
- secretName: "tls-{{.prefix}}.{{ $domain }}"
|
||||
- secretName: "tls-{{.prefix}}{{ $domain }}"
|
||||
hosts:
|
||||
- "{{.prefix}}.{{ $domain }}"
|
||||
- "{{.prefix}}{{ $domain }}"
|
||||
{{ end }}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
reverseProxy:
|
||||
castle:
|
||||
ip: "10.0.12.1"
|
||||
port: "80"
|
||||
overrides:
|
||||
icon: http://10.0.12.1:80/static/icons/favicon.ico
|
||||
jellyfin:
|
||||
ip: 10.0.10.5
|
||||
port: 8096
|
||||
overrides:
|
||||
prefix: "jellyfin"
|
||||
group: "Video Hosting"
|
||||
Reference in new issue
Block a user