This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
|
||||||
- cd-serviceaccount.yaml
|
- cd-serviceaccount.yaml
|
||||||
|
- network-policies.yaml
|
||||||
- middlewares.yaml
|
- middlewares.yaml
|
||||||
- ingress-web.yaml
|
- ingress-web.yaml
|
||||||
- ingress-web-public.yaml
|
- ingress-web-public.yaml
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ spec:
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
piVersion: traefik.io/v1alpha1
|
apiVersion: traefik.io/v1alpha1
|
||||||
kind: Middleware
|
kind: Middleware
|
||||||
metadata:
|
metadata:
|
||||||
name: nextcloud-deny-paths
|
name: nextcloud-deny-paths
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: cloud-limbosolutions-com
|
|
||||||
labels:
|
|
||||||
name: cloud-limbosolutions-com
|
|
||||||
44
deploy/infra/network-policies.yaml
Normal file
44
deploy/infra/network-policies.yaml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
apiVersion: cilium.io/v2
|
||||||
|
kind: CiliumNetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: allow-same-namespace-ingress
|
||||||
|
spec:
|
||||||
|
endpointSelector: {} # All pods in this namespace
|
||||||
|
ingress:
|
||||||
|
- fromEndpoints:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: k8s:io.kubernetes.pod.namespace
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- cloud-limbosolutions-com
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: cilium.io/v2
|
||||||
|
kind: CiliumNetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: allow-traefik-ingress
|
||||||
|
spec:
|
||||||
|
endpointSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
# Allow Traefik (internal and public) to reach nextcloud web port
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
- fromEndpoints:
|
||||||
|
- matchLabels:
|
||||||
|
app.kubernetes.io/name: traefik
|
||||||
|
matchExpressions:
|
||||||
|
- key: k8s:io.kubernetes.pod.namespace
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- traefik
|
||||||
|
- traefik-public
|
||||||
|
toPorts:
|
||||||
|
- ports:
|
||||||
|
- port: "80"
|
||||||
|
|
||||||
|
protocol: TCP
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
echo "Executing infra deploy."
|
echo "Executing infra deploy."
|
||||||
|
kubectl create namespace cloud-limbosolutions-com || true
|
||||||
kubectl kustomize deploy/infra | kubectl -n cloud-limbosolutions-com apply -f -
|
kubectl kustomize deploy/infra | kubectl -n cloud-limbosolutions-com apply -f -
|
||||||
|
|||||||
Reference in New Issue
Block a user