fix: add atlantis services cnp
This commit is contained in:
@@ -14,4 +14,25 @@ spec:
|
||||
- matchName: analytics.loft.rocks
|
||||
endpointSelector:
|
||||
matchLabels: {}
|
||||
|
||||
---
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-atlantis-services
|
||||
namespace: atlantis
|
||||
spec:
|
||||
egress:
|
||||
- toEndpoints:
|
||||
- matchLabels:
|
||||
k8s:io.kubernetes.pod.namespace: dapr-system
|
||||
- toEndpoints:
|
||||
- matchLabels:
|
||||
k8s:io.kubernetes.pod.namespace: redis
|
||||
- toEndpoints:
|
||||
- matchLabels:
|
||||
k8s:io.kubernetes.pod.namespace: rabbitmq
|
||||
- toEndpoints:
|
||||
- matchLabels:
|
||||
k8s:io.kubernetes.pod.namespace: jaeger
|
||||
endpointSelector:
|
||||
matchLabels: {}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- $name := include "vCluster.releaseName" . -}}
|
||||
apiVersion: kyverno.io/v1
|
||||
kind: ClusterPolicy
|
||||
metadata:
|
||||
name: "allow-{{ $name }}-vcluster-services"
|
||||
spec:
|
||||
background: true
|
||||
generateExistingOnPolicyUpdate: true
|
||||
rules:
|
||||
- name: allow-atlantis-services
|
||||
generate:
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
name: allow-atlantis-services
|
||||
namespace: {{ printf "{{request.object.metadata.name}}" | quote }}
|
||||
synchronize: true
|
||||
clone:
|
||||
namespace: atlantis
|
||||
name: allow-atlantis-services
|
||||
match:
|
||||
resources:
|
||||
kinds:
|
||||
- Namespace
|
||||
names:
|
||||
- "vcluster-009dba7e-*"
|
||||
selector:
|
||||
matchLabels:
|
||||
vcluster.loft.sh/vcluster-namespace: '{{ .Release.Namespace }}'
|
||||
Reference in New Issue
Block a user