Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions apps/filehosting/jellyfin/cnp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: namespace-baseline
namespace: "{{ .customer.name }}-jellyfin-{{ .customer.stage }}"
spec:
endpointSelector: {}
ingress:
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-jellyfin-{{ .customer.stage }}"
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: ingress-nginx
- fromEntities:
- host
- remote-node
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-jellyfin-{{ .customer.stage }}"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s:k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEntities:
- world
1 change: 1 addition & 0 deletions apps/filehosting/jellyfin/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- app.yaml
- cnp.yaml
33 changes: 33 additions & 0 deletions apps/filehosting/nextcloud/cnp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: namespace-baseline
namespace: "{{ .customer.name }}-nextcloud-{{ .customer.stage }}"
spec:
endpointSelector: {}
ingress:
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-nextcloud-{{ .customer.stage }}"
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: ingress-nginx
- fromEntities:
- host
- remote-node
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-nextcloud-{{ .customer.stage }}"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s:k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEntities:
- world
3 changes: 2 additions & 1 deletion apps/filehosting/nextcloud/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- app.yaml
- app.yaml
- cnp.yaml
42 changes: 42 additions & 0 deletions apps/gameservers/seven-days-to-die/cnp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: namespace-baseline
namespace: "{{ .customer.name }}-sdtd-{{ .customer.stage }}"
spec:
endpointSelector: {}
ingress:
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-sdtd-{{ .customer.stage }}"
- fromEntities:
- host
- remote-node
- fromEntities:
- world
toPorts:
- ports:
- port: "26900"
protocol: TCP
- port: "26900"
protocol: UDP
- port: "26901"
protocol: UDP
- port: "26902"
protocol: UDP
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-sdtd-{{ .customer.stage }}"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s:k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEntities:
- world
3 changes: 2 additions & 1 deletion apps/gameservers/seven-days-to-die/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- app.yaml
- app.yaml
- cnp.yaml
53 changes: 53 additions & 0 deletions apps/gameservers/tools/web-rcon/cnp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: namespace-baseline
namespace: "{{ .customer.name }}-web-rcon-{{ .customer.stage }}"
spec:
endpointSelector: {}
ingress:
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-web-rcon-{{ .customer.stage }}"
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: teleport-kube-agent
toPorts:
- ports:
- port: "443"
protocol: TCP
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: ingress-nginx
- fromEntities:
- host
- remote-node
toPorts:
- ports:
- port: "443"
protocol: TCP
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-web-rcon-{{ .customer.stage }}"
- toEndpoints:
- matchExpressions:
- key: k8s:io.kubernetes.pod.namespace
operator: In
values:
- "{{ .customer.name }}-minecraft"
- "{{ .customer.name }}-minecraft-{{ .customer.stage }}"
- "{{ .customer.name }}-paper-minecraft-{{ .customer.stage }}"
- "{{ .customer.name }}-sdtd-{{ .customer.stage }}"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s:k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEntities:
- kube-apiserver
3 changes: 2 additions & 1 deletion apps/gameservers/tools/web-rcon/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- app.yaml
- cnp.yaml
patches:
- target:
kind: Application
name: web-rcon
path: ../../../../common/patches/argocd-app-settings.yaml
path: ../../../../common/patches/argocd-app-settings.yaml
34 changes: 34 additions & 0 deletions apps/productivity/jupyterhub/cnp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: namespace-baseline
namespace: "{{ .customer.name }}-jupyterhub-{{ .customer.stage }}"
spec:
endpointSelector: {}
ingress:
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-jupyterhub-{{ .customer.stage }}"
- fromEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: ingress-nginx
- fromEntities:
- host
- remote-node
egress:
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: "{{ .customer.name }}-jupyterhub-{{ .customer.stage }}"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: kube-system
k8s:k8s-app: kube-dns
toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "53"
protocol: TCP
- toEntities:
- kube-apiserver
- world
1 change: 1 addition & 0 deletions apps/productivity/jupyterhub/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- app.yaml
- cnp.yaml