forked from bcgov/common-hosted-form-service
-
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.
FORMS-1495: Network Policies for NATS protocol (bcgov#1541)
* FORMS-1495: Network Poilicies for NATS protocol Signed-off-by: Jason Sherman <[email protected]> * remove the smoke test configuration, revert to production like config. Signed-off-by: Jason Sherman <[email protected]> --------- Signed-off-by: Jason Sherman <[email protected]>
- Loading branch information
1 parent
5f75bc9
commit e989383
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
event-stream-service/charts/event-stream-service/templates/nats-nsp.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,69 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: allow-chefs-to-nats | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
spec: | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/component: nats | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/name: nats | ||
policyTypes: | ||
- Ingress | ||
ingress: | ||
- from: | ||
- namespaceSelector: | ||
matchLabels: | ||
environment: {{ .Values.nsp.chefs.env }} | ||
name: {{ .Values.nsp.chefs.namespace }} | ||
podSelector: | ||
matchLabels: | ||
role: app | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: allow-websocket-ingress-to-nats | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
spec: | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/component: nats | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/name: nats | ||
policyTypes: | ||
- Ingress | ||
ingress: | ||
- from: | ||
- namespaceSelector: | ||
matchLabels: | ||
network.openshift.io/policy-group: ingress | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: allow-nats-to-nats | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
spec: | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/component: nats | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/name: nats | ||
policyTypes: | ||
- Ingress | ||
ingress: | ||
- from: | ||
- namespaceSelector: | ||
matchLabels: | ||
environment: {{ .Values.nsp.nats.env }} | ||
name: {{ .Values.nsp.nats.namespace }} | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/component: nats | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/name: nats |
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
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
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