mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +02:00
Remove all policies that enforce node-level
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
apiVersion: cilium.io/v2
|
|
||||||
kind: CiliumClusterwideNetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: world
|
|
||||||
spec:
|
|
||||||
nodeSelector:
|
|
||||||
# apply to all nodes
|
|
||||||
matchLabels: {}
|
|
||||||
egress:
|
|
||||||
# node -> world
|
|
||||||
- toEntities:
|
|
||||||
- world
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
apiVersion: cilium.io/v2
|
|
||||||
kind: CiliumClusterwideNetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: api-server
|
|
||||||
spec:
|
|
||||||
nodeSelector:
|
|
||||||
# apply to manager nodes
|
|
||||||
matchLabels:
|
|
||||||
node.kubernetes.io/microk8s-controlplane: microk8s-controlplane
|
|
||||||
ingress:
|
|
||||||
# world -> api server
|
|
||||||
- toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '16443'
|
|
||||||
protocol: TCP
|
|
||||||
egress:
|
|
||||||
# api server -> kubelet
|
|
||||||
- toEntities:
|
|
||||||
- remote-node
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '10250'
|
|
||||||
protocol: TCP
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
apiVersion: cilium.io/v2
|
|
||||||
kind: CiliumClusterwideNetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: cilium-health
|
|
||||||
specs:
|
|
||||||
- endpointSelector:
|
|
||||||
# apply to health endpoints
|
|
||||||
matchLabels:
|
|
||||||
reserved:health: ''
|
|
||||||
ingress:
|
|
||||||
# cilium agent -> cilium agent
|
|
||||||
- fromEntities:
|
|
||||||
- host
|
|
||||||
- remote-node
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '4240'
|
|
||||||
protocol: TCP
|
|
||||||
- nodeSelector:
|
|
||||||
# apply to all nodes
|
|
||||||
matchLabels: {}
|
|
||||||
ingress:
|
|
||||||
# cilium agent -> cilium agent
|
|
||||||
- fromEntities:
|
|
||||||
- health
|
|
||||||
- remote-node
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '4240'
|
|
||||||
protocol: TCP
|
|
||||||
egress:
|
|
||||||
# cilium agent -> cilium agent
|
|
||||||
- toEntities:
|
|
||||||
- health
|
|
||||||
- remote-node
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '4240'
|
|
||||||
protocol: TCP
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
apiVersion: cilium.io/v2
|
|
||||||
kind: CiliumClusterwideNetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: host-access
|
|
||||||
spec:
|
|
||||||
nodeSelector:
|
|
||||||
matchLabels: { }
|
|
||||||
ingress:
|
|
||||||
- fromEntities:
|
|
||||||
- world
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '22'
|
|
||||||
protocol: TCP
|
|
||||||
- fromEntities:
|
|
||||||
- world
|
|
||||||
icmps:
|
|
||||||
- fields:
|
|
||||||
- type: 8
|
|
||||||
family: IPv4
|
|
||||||
- type: 8
|
|
||||||
family: IPv6
|
|
||||||
egress:
|
|
||||||
- toEntities:
|
|
||||||
- world
|
|
||||||
icmps:
|
|
||||||
- fields:
|
|
||||||
- type: 8
|
|
||||||
family: IPv4
|
|
||||||
- type: 8
|
|
||||||
family: IPv6
|
|
||||||
@@ -1,30 +1,10 @@
|
|||||||
|
{{- if .Values.cilium.enabled }}
|
||||||
apiVersion: cilium.io/v2
|
apiVersion: cilium.io/v2
|
||||||
kind: CiliumNetworkPolicy
|
kind: CiliumNetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: hubble-relay
|
name: hubble-relay
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
specs:
|
specs:
|
||||||
- nodeSelector:
|
|
||||||
# apply to all nodes
|
|
||||||
matchLabels: {}
|
|
||||||
ingress:
|
|
||||||
# hubble relay -> hubble agent
|
|
||||||
- fromEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: hubble-relay
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '4244'
|
|
||||||
protocol: TCP
|
|
||||||
egress:
|
|
||||||
# kubelet -> hubble relay probes
|
|
||||||
- toEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: hubble-relay
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '4245'
|
|
||||||
protocol: TCP
|
|
||||||
- endpointSelector:
|
- endpointSelector:
|
||||||
# apply to hubble relay pods
|
# apply to hubble relay pods
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -45,4 +25,5 @@ specs:
|
|||||||
toPorts:
|
toPorts:
|
||||||
- ports:
|
- ports:
|
||||||
- port: '4244'
|
- port: '4244'
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
@@ -1,35 +1,10 @@
|
|||||||
|
{{- if .Values.cilium.enabled }}
|
||||||
apiVersion: cilium.io/v2
|
apiVersion: cilium.io/v2
|
||||||
kind: CiliumNetworkPolicy
|
kind: CiliumNetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: hubble-ui
|
name: hubble-ui
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
specs:
|
specs:
|
||||||
- nodeSelector:
|
|
||||||
# apply to master nodes
|
|
||||||
matchLabels:
|
|
||||||
node.kubernetes.io/microk8s-controlplane: microk8s-controlplane
|
|
||||||
ingress:
|
|
||||||
# hubble ui -> api server
|
|
||||||
- fromEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: hubble-ui
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '16443'
|
|
||||||
protocol: TCP
|
|
||||||
- endpointSelector:
|
|
||||||
# apply to core dns endpoints
|
|
||||||
matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: coredns
|
|
||||||
ingress:
|
|
||||||
# hubble ui -> core dns
|
|
||||||
- fromEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: hubble-ui
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '53'
|
|
||||||
protocol: UDP
|
|
||||||
- endpointSelector:
|
- endpointSelector:
|
||||||
# apply to hubble relay endpoints
|
# apply to hubble relay endpoints
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -70,4 +45,5 @@ specs:
|
|||||||
toPorts:
|
toPorts:
|
||||||
- ports:
|
- ports:
|
||||||
- port: '53'
|
- port: '53'
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
|
{{- end }}
|
||||||
@@ -1,40 +1,14 @@
|
|||||||
|
{{- if .Values.cilium.enabled }}
|
||||||
apiVersion: cilium.io/v2
|
apiVersion: cilium.io/v2
|
||||||
kind: CiliumNetworkPolicy
|
kind: CiliumNetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: kube-dns
|
name: kube-dns
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
specs:
|
specs:
|
||||||
- nodeSelector:
|
|
||||||
# apply to master nodes
|
|
||||||
matchLabels:
|
|
||||||
node.kubernetes.io/microk8s-controlplane: microk8s-controlplane
|
|
||||||
ingress:
|
|
||||||
# core dns -> api server
|
|
||||||
- fromEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
k8s:io.cilium.k8s.policy.serviceaccount: coredns
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '16443'
|
|
||||||
protocol: TCP
|
|
||||||
- nodeSelector:
|
|
||||||
# apply to all nodes
|
|
||||||
matchLabels: {}
|
|
||||||
egress:
|
|
||||||
# kubelet -> core dns probes
|
|
||||||
- toEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
k8s:io.cilium.k8s.policy.serviceaccount: coredns
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '8080'
|
|
||||||
protocol: TCP
|
|
||||||
- port: '8181'
|
|
||||||
protocol: TCP
|
|
||||||
- endpointSelector:
|
- endpointSelector:
|
||||||
# apply to core dns pods
|
# apply to core dns pods
|
||||||
matchLabels:
|
matchLabels:
|
||||||
k8s:io.cilium.k8s.policy.serviceaccount: coredns
|
io.cilium.k8s.policy.serviceaccount: "coredns"
|
||||||
ingress:
|
ingress:
|
||||||
# kubelet -> core dns probes
|
# kubelet -> core dns probes
|
||||||
- fromEntities:
|
- fromEntities:
|
||||||
@@ -48,8 +22,8 @@ specs:
|
|||||||
# prometheus -> dns metrics
|
# prometheus -> dns metrics
|
||||||
- fromEndpoints:
|
- fromEndpoints:
|
||||||
- matchLabels:
|
- matchLabels:
|
||||||
k8s:io.cilium.k8s.policy.serviceaccount: prometheus-kube-prometheus-prometheus
|
io.cilium.k8s.policy.serviceaccount: "prometheus-kube-prometheus-prometheus"
|
||||||
k8s:io.kubernetes.pod.namespace: observability
|
io.kubernetes.pod.namespace: "observability"
|
||||||
toPorts:
|
toPorts:
|
||||||
- ports:
|
- ports:
|
||||||
- port: '9153'
|
- port: '9153'
|
||||||
@@ -62,4 +36,5 @@ specs:
|
|||||||
- port: '53'
|
- port: '53'
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- port: '53'
|
- port: '53'
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
|
{{- end }}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
apiVersion: cilium.io/v2
|
|
||||||
kind: CiliumClusterwideNetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: kubelet
|
|
||||||
spec:
|
|
||||||
nodeSelector:
|
|
||||||
# apply to all nodes
|
|
||||||
matchLabels: {}
|
|
||||||
ingress:
|
|
||||||
# prometheus -> kubelet
|
|
||||||
- fromEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: prometheus-kube-prometheus-prometheus
|
|
||||||
io.kubernetes.pod.namespace: observability
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '10250'
|
|
||||||
protocol: TCP
|
|
||||||
# api server -> kubelet
|
|
||||||
- fromEntities:
|
|
||||||
- kube-apiserver
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '10250'
|
|
||||||
protocol: TCP
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
apiVersion: cilium.io/v2
|
|
||||||
kind: CiliumClusterwideNetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: monitoring
|
|
||||||
spec:
|
|
||||||
nodeSelector:
|
|
||||||
# apply to all nodes
|
|
||||||
matchLabels: {}
|
|
||||||
ingress:
|
|
||||||
# prometheus -> monitoring ports
|
|
||||||
- fromEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: prometheus-kube-prometheus-prometheus
|
|
||||||
io.kubernetes.pod.namespace: observability
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '9100'
|
|
||||||
protocol: TCP
|
|
||||||
- port: '9962'
|
|
||||||
protocol: TCP
|
|
||||||
- port: '9963'
|
|
||||||
protocol: TCP
|
|
||||||
- port: '9965'
|
|
||||||
protocol: TCP
|
|
||||||
- port: '10257'
|
|
||||||
protocol: TCP
|
|
||||||
- port: '10259'
|
|
||||||
protocol: TCP
|
|
||||||
egress:
|
|
||||||
- toEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: prometheus-kube-prometheus-prometheus
|
|
||||||
io.kubernetes.pod.namespace: observability
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '9090'
|
|
||||||
protocol: TCP
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
apiVersion: cilium.io/v2
|
|
||||||
kind: CiliumClusterwideNetworkPolicy
|
|
||||||
metadata:
|
|
||||||
name: cilium-vxlan
|
|
||||||
spec:
|
|
||||||
nodeSelector:
|
|
||||||
# apply to all nodes
|
|
||||||
matchLabels: {}
|
|
||||||
ingress:
|
|
||||||
# node -> vxlan
|
|
||||||
- fromEntities:
|
|
||||||
- remote-node
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '8472'
|
|
||||||
protocol: UDP
|
|
||||||
egress:
|
|
||||||
# node -> vxlan
|
|
||||||
- toEntities:
|
|
||||||
- remote-node
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '8472'
|
|
||||||
protocol: UDP
|
|
||||||
Reference in New Issue
Block a user