Skip to content

Commit

Permalink
feat: add ingress network policy with generic sandbox label (#1113)
Browse files Browse the repository at this point in the history
* allow from dev sandbox managed NS
---------

Co-authored-by: Devtools <devtools@redhat.com>
Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
  • Loading branch information
3 people authored Dec 17, 2024
1 parent d45ae89 commit d3c2c60
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deploy/templates/nstemplatetiers/base/ns_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,19 @@ objects:
kubernetes.io/metadata.name: redhat-ods-applications
policyTypes:
- Ingress
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-dev-sandbox-managed-ns
namespace: ${SPACE_NAME}-dev
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
dev-sandbox/policy-group: ingress
policyTypes:
- Ingress
parameters:
- name: SPACE_NAME
required: true
13 changes: 13 additions & 0 deletions deploy/templates/nstemplatetiers/base/ns_stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,19 @@ objects:
kubernetes.io/metadata.name: redhat-ods-applications
policyTypes:
- Ingress
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-dev-sandbox-managed-ns
namespace: ${SPACE_NAME}-stage
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
dev-sandbox/policy-group: ingress
policyTypes:
- Ingress
parameters:
- name: SPACE_NAME
required: true
13 changes: 13 additions & 0 deletions deploy/templates/nstemplatetiers/base1ns/ns_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,19 @@ objects:
kubernetes.io/metadata.name: redhat-ods-applications
policyTypes:
- Ingress
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-dev-sandbox-managed-ns
namespace: ${SPACE_NAME}-dev
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
dev-sandbox/policy-group: ingress
policyTypes:
- Ingress
parameters:
- name: SPACE_NAME
required: true
Expand Down
13 changes: 13 additions & 0 deletions deploy/templates/nstemplatetiers/intellarge/ns_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,19 @@ objects:
kubernetes.io/metadata.name: redhat-ods-applications
policyTypes:
- Ingress
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-dev-sandbox-managed-ns
namespace: ${SPACE_NAME}-dev
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
dev-sandbox/policy-group: ingress
policyTypes:
- Ingress
parameters:
- name: SPACE_NAME
required: true
Expand Down
13 changes: 13 additions & 0 deletions deploy/templates/nstemplatetiers/intelmedium/ns_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,19 @@ objects:
kubernetes.io/metadata.name: redhat-ods-applications
policyTypes:
- Ingress
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-dev-sandbox-managed-ns
namespace: ${SPACE_NAME}-dev
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
dev-sandbox/policy-group: ingress
policyTypes:
- Ingress
parameters:
- name: SPACE_NAME
required: true
Expand Down
13 changes: 13 additions & 0 deletions deploy/templates/nstemplatetiers/test/ns_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,19 @@ objects:
podSelector: {}
policyTypes:
- Ingress
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-dev-sandbox-managed-ns
namespace: ${SPACE_NAME}-dev
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
dev-sandbox/policy-group: ingress
policyTypes:
- Ingress
parameters:
- name: SPACE_NAME
required: true
Expand Down

0 comments on commit d3c2c60

Please sign in to comment.