Skip to content

Commit

Permalink
feat(pihole-ingress): add ingress for external pihole
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Nov 22, 2024
1 parent 9434446 commit 8d2b897
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 0 deletions.
29 changes: 29 additions & 0 deletions registry/clusters/prod/components/pihole-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: pihole-ingress-components
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "10"
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/mrsimonemms/infrastructure
path: registry/components/pihole-ingress
targetRevision: HEAD
destination:
server: https://kubernetes.default.svc
namespace: pihole-ingress
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
ignoreDifferences:
- kind: Service
namespace: pihole
jsonPointers:
- /spec/externalName
34 changes: 34 additions & 0 deletions registry/components/pihole-ingress/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pihole-ingress
namespace: pihole
annotations:
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/app-root: /admin
gethomepage.dev/description: Network-wide ad blocking
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Cluster Management
gethomepage.dev/icon: pi-hole
gethomepage.dev/name: Pi-hole
gethomepage.dev/external: "true"
# Pod selector required because names don't match
# gethomepage.dev/pod-selector: app.kubernetes.io/name=grafana
spec:
ingressClassName: nginx
rules:
- host: pihole.simonemms.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: pihole
port:
number: 80
tls:
- hosts:
- pihole.simonemms.com
secretName: pihole-tls
6 changes: 6 additions & 0 deletions registry/components/pihole-ingress/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ingress.yaml
- namespace.yaml
- service.yaml
6 changes: 6 additions & 0 deletions registry/components/pihole-ingress/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: pihole
annotations:
argocd.argoproj.io/sync-wave: "-1"
10 changes: 10 additions & 0 deletions registry/components/pihole-ingress/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: pihole
namespace: pihole
annotations:
tailscale.com/tailnet-fqdn: k3s-001.tail30e9d2.ts.net
spec:
externalName: pihole
type: ExternalName

0 comments on commit 8d2b897

Please sign in to comment.