Skip to content

Commit

Permalink
fix(reactive-resume): ingress & netpols
Browse files Browse the repository at this point in the history
  • Loading branch information
JJGadgets committed Feb 28, 2024
1 parent ff48555 commit 803790b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 29 deletions.
64 changes: 35 additions & 29 deletions kube/deploy/apps/reactive-resume/app/hr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
tailscale.com/expose: "true"
db.home.arpa/pg: "pg-home"
s3.home.arpa/store: "rgw-${CLUSTER_NAME}"
ingress.home.arpa/jjgadgets: "allow"
containers:
main:
image:
Expand Down Expand Up @@ -116,36 +117,41 @@ spec:
port: 3000
ingress:
main:
enabled: false
# primary: true
# className: "nginx-internal"
# annotations:
# nginx.ingress.kubernetes.io/use-regex: "true"
# nginx.ingress.kubernetes.io/rewrite-target: "/$2"
# hosts:
# - host: &host "${APP_DNS_REACTIVE_RESUME}"
# paths:
# - path: "/api(/|$)(.*)"
# pathType: ImplementationSpecific
# service:
# name: main
# port: http
# tls:
# - hosts: [*host]
enabled: true
primary: true
className: "nginx-internal"
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
nginx.ingress.kubernetes.io/whitelist-source-range: |
${IP_JJ_V4}
hosts:
- host: &host "${APP_DNS_REACTIVE_RESUME}"
paths:
- path: "/api(/|$)(.*)"
pathType: ImplementationSpecific
service:
name: main
port: http
tls:
- hosts: [*host]
backend:
enabled: false
# primary: false
# className: "nginx-internal"
# hosts:
# - host: *host
# paths:
# - path: /
# pathType: Prefix
# service:
# name: main
# port: frontend
# tls:
# - hosts: [*host]
enabled: true
primary: false
className: "nginx-internal"
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: |
${IP_JJ_V4}
hosts:
- host: *host
paths:
- path: /
pathType: Prefix
service:
name: main
port: frontend
tls:
- hosts: [*host]
persistence:
config:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ spec:
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cilium.io/ciliumclusterwidenetworkpolicy_v2.json
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: labelled-allow-ingress-jjgadgets
spec:
endpointSelector:
matchLabels:
ingress.home.arpa/jjgadgets: "allow"
ingress:
- fromCIDRSet:
- cidr: "${IP_JJ_V4}"
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cilium.io/ciliumclusterwidenetworkpolicy_v2.json
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
name: labelled-allow-ingress-wg-guest
spec:
Expand Down

0 comments on commit 803790b

Please sign in to comment.