generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nathan Pawelek <[email protected]>
- Loading branch information
Showing
11 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
kubernetes/apps/longhorn-system/networkpolicies/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./networkpolicy-admission-webhook.yaml | ||
- ./networkpolicy-backing-image-data-source.yaml | ||
- ./networkpolicy-backing-image-manager.yaml | ||
- ./networkpolicy-conversion-webhook.yaml | ||
- ./networkpolicy-instance-manager.yaml | ||
- ./networkpolicy-manager.yaml | ||
- ./networkpolicy-recovery-backend.yaml | ||
- ./networkpolicy-ui.yaml |
15 changes: 15 additions & 0 deletions
15
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-admission-webhook.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-admission-webhook | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
app: longhorn-manager | ||
ingress: | ||
- toPorts: | ||
- ports: | ||
- port: "9502" | ||
protocol: TCP |
23 changes: 23 additions & 0 deletions
23
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-backing-image-data-source.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-backing-image-data-source | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
longhorn.io/component: backing-image-data-source | ||
ingress: | ||
- fromEndpoints: | ||
- matchLabels: | ||
app: longhorn-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: instance-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: backing-image-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: backing-image-data-source |
23 changes: 23 additions & 0 deletions
23
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-backing-image-manager.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-backing-image-manager | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
longhorn.io/component: backing-image-manager | ||
ingress: | ||
- fromEndpoints: | ||
- matchLabels: | ||
app: longhorn-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: instance-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: backing-image-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: backing-image-data-source |
15 changes: 15 additions & 0 deletions
15
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-conversion-webhook.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-conversion-webhook | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
app: longhorn-manager | ||
ingress: | ||
- toPorts: | ||
- ports: | ||
- port: "9501" | ||
protocol: TCP |
23 changes: 23 additions & 0 deletions
23
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-instance-manager.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-instance-manager | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
longhorn.io/component: instance-manager | ||
ingress: | ||
- fromEndpoints: | ||
- matchLabels: | ||
app: longhorn-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: instance-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: backing-image-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/component: backing-image-data-source |
33 changes: 33 additions & 0 deletions
33
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-manager.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-manager | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
app: longhorn-manager | ||
ingress: | ||
- fromEndpoints: | ||
- matchLabels: | ||
app: longhorn-manager | ||
- fromEndpoints: | ||
- matchLabels: | ||
app: longhorn-ui | ||
- fromEndpoints: | ||
- matchLabels: | ||
app: longhorn-csi-plugin | ||
- fromEndpoints: | ||
- matchLabels: | ||
longhorn.io/managed-by: longhorn-manager | ||
matchExpressions: | ||
- key: recurring-job.longhorn.io | ||
operator: Exists | ||
- fromEndpoints: | ||
- matchExpressions: | ||
- key: longhorn.io/job-task | ||
operator: Exists | ||
- fromEndpoints: | ||
- matchLabels: | ||
app: longhorn-driver-deployer |
15 changes: 15 additions & 0 deletions
15
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-recovery-backend.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-recovery-backend | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
app: longhorn-manager | ||
ingress: | ||
- toPorts: | ||
- ports: | ||
- port: "9503" | ||
protocol: TCP |
22 changes: 22 additions & 0 deletions
22
kubernetes/apps/longhorn-system/networkpolicies/networkpolicy-ui.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: allow-longhorn-ui | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
app: longhorn-ui | ||
ingress: | ||
- fromEndpoints: | ||
- matchLabels: | ||
app.kubernetes.io/instance: nginx-internal | ||
io.kubernetes.pod.namespace: ingress | ||
toPorts: | ||
- ports: | ||
- port: "8000" | ||
protocol: TCP | ||
- ports: | ||
- port: "80" | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: default-deny-all | ||
namespace: longhorn-system | ||
spec: | ||
endpointSelector: {} | ||
ingress: | ||
- {} | ||
egress: | ||
- {} |