mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
Fixed network policies
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: cluster_setup
|
name: cluster_setup
|
||||||
version: 0.4.0
|
version: 0.4.1
|
||||||
type: application
|
type: application
|
||||||
description: "Initial cluster setup"
|
description: "Initial cluster setup"
|
||||||
maintainers:
|
maintainers:
|
||||||
@@ -8,8 +8,8 @@ maintainers:
|
|||||||
url: https://2martens.de
|
url: https://2martens.de
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- kind: added
|
- kind: fixed
|
||||||
description: Added cilium network policies
|
description: Fixed network policies
|
||||||
artifacthub.io/signKey: |
|
artifacthub.io/signKey: |
|
||||||
fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8
|
fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8
|
||||||
url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc
|
url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc
|
||||||
|
|||||||
@@ -26,4 +26,44 @@ specs:
|
|||||||
- ports:
|
- ports:
|
||||||
- port: '4244'
|
- port: '4244'
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
- toEntities:
|
||||||
|
- world
|
||||||
|
toPorts:
|
||||||
|
- ports:
|
||||||
|
- port: '443'
|
||||||
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: hubble-relay
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: hubble-relay
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
ingress:
|
||||||
|
- from:
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: hubble-ui
|
||||||
|
ports:
|
||||||
|
- port: '80'
|
||||||
|
protocol: TCP
|
||||||
|
- port: '4245'
|
||||||
|
protocol: TCP
|
||||||
|
egress:
|
||||||
|
- to:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: kube-system
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: kube-dns
|
||||||
|
ports:
|
||||||
|
- port: '53'
|
||||||
|
protocol: UDP
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -16,6 +16,8 @@ specs:
|
|||||||
io.cilium.k8s.policy.serviceaccount: hubble-ui
|
io.cilium.k8s.policy.serviceaccount: hubble-ui
|
||||||
toPorts:
|
toPorts:
|
||||||
- ports:
|
- ports:
|
||||||
|
- port: '80'
|
||||||
|
protocol: TCP
|
||||||
- port: '4245'
|
- port: '4245'
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- endpointSelector:
|
- endpointSelector:
|
||||||
@@ -30,20 +32,45 @@ specs:
|
|||||||
- ports:
|
- ports:
|
||||||
- port: '16443'
|
- port: '16443'
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
# hubble ui -> hubble relay
|
|
||||||
- toEndpoints:
|
|
||||||
- matchLabels:
|
|
||||||
io.cilium.k8s.policy.serviceaccount: hubble-relay
|
|
||||||
toPorts:
|
|
||||||
- ports:
|
|
||||||
- port: '4245'
|
|
||||||
protocol: TCP
|
|
||||||
# hubble ui -> core dns
|
# hubble ui -> core dns
|
||||||
- toEndpoints:
|
- toEntities:
|
||||||
- matchLabels:
|
- world
|
||||||
io.cilium.k8s.policy.serviceaccount: coredns
|
|
||||||
toPorts:
|
toPorts:
|
||||||
- ports:
|
- ports:
|
||||||
- port: '53'
|
- port: '443'
|
||||||
protocol: UDP
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: hubble-ui
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: hubble-ui
|
||||||
|
policyTypes:
|
||||||
|
- Egress
|
||||||
|
egress:
|
||||||
|
- to:
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: hubble-relay
|
||||||
|
ports:
|
||||||
|
- port: '80'
|
||||||
|
protocol: TCP
|
||||||
|
- port: '4245'
|
||||||
|
protocol: TCP
|
||||||
|
- to:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: kube-system
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: kube-dns
|
||||||
|
ports:
|
||||||
|
- port: '53'
|
||||||
|
protocol: UDP
|
||||||
|
---
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
Reference in New Issue
Block a user