Skip to content

Commit

Permalink
feat(networking): deploy nginx tailscale
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Kreitzer <[email protected]>
  • Loading branch information
buroa committed Jun 17, 2024
1 parent f2497ff commit 83b6bcd
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
19 changes: 19 additions & 0 deletions kubernetes/apps/networking/nginx/ks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,22 @@ spec:
interval: 30m
retryInterval: 1m
timeout: 5m
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cluster-apps-nginx-tailscale
namespace: flux-system
spec:
targetNamespace: networking
dependsOn:
- name: cluster-apps-nginx-certificates
path: ./kubernetes/apps/networking/nginx/tailscale
prune: true
sourceRef:
kind: GitRepository
name: k8s-gitops
wait: true
interval: 30m
retryInterval: 1m
timeout: 5m
86 changes: 86 additions & 0 deletions kubernetes/apps/networking/nginx/tailscale/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app nginx-tailscale
spec:
interval: 30m
timeout: 15m
chart:
spec:
chart: ingress-nginx
version: 4.10.1
sourceRef:
kind: HelmRepository
name: ingress-nginx-charts
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
fullnameOverride: *app
controller:
replicaCount: 2
allowSnippetAnnotations: true
admissionWebhooks:
objectSelector:
matchExpressions:
- key: ingress-class
operator: In
values:
- nginx-tailscale
config:
client-body-buffer-size: 100M
client-body-timeout: 2m
client-header-timeout: 2m
enable-brotli: true
enable-ocsp: true
enable-real-ip: true
hsts-max-age: 31449600
keep-alive-requests: 10000
keep-alive: 2m
proxy-body-size: 0
proxy-buffer-size: 16k
proxy-read-timeout: 7d
proxy-send-timeout: 7d
ssl-protocols: TLSv1.3 TLSv1.2
use-forwarded-headers: true
extraArgs:
default-ssl-certificate: networking/wildcard-tls
ingressClass: nginx-tailscale
ingressClassResource:
name: nginx-tailscale
default: false
controllerValue: k8s.io/nginx-tailscale
metrics:
enabled: true
serviceMonitor:
enabled: true
namespace: networking
namespaceSelector:
any: true
resources:
requests:
cpu: 100m
limits:
memory: 512Mi
service:
annotations:
external-dns.alpha.kubernetes.io/hostname: tailscale.${PUBLIC_DOMAIN}
loadBalancerClass: tailscale
externalTrafficPolicy: Local
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/instance: *app
app.kubernetes.io/component: controller
defaultBackend:
enabled: false
5 changes: 5 additions & 0 deletions kubernetes/apps/networking/nginx/tailscale/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml

0 comments on commit 83b6bcd

Please sign in to comment.