UNCLASSIFIED

Commit 526ad987 authored by Joshua Carnes's avatar Joshua Carnes Committed by runyontr
Browse files

Add network policy

parent 39326aff
include: include:
- project: 'platform-one/big-bang/pipeline-templates/pipeline-templates' - project: "platform-one/big-bang/pipeline-templates/pipeline-templates"
ref: master ref: master
file: '/templates/package-tests.yml' file: "/templates/package-tests.yml"
apiVersion: v2 apiVersion: v2
name: twistlock name: twistlock
version: 0.0.4-bb.0 version: 0.0.4-bb.1
appVersion: 21.04.412 appVersion: 21.04.412
{{- if .Values.networkPolicies.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-external-egress
namespace: "{{ .Release.Namespace }}"
spec:
podSelector: {}
policyTypes:
- Egress
egress: []
{{- end }}
\ No newline at end of file
{{- if .Values.networkPolicies.enabled}}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-ingress
namespace: "{{ .Release.Namespace }}"
spec:
podSelector: {}
ingress: []
policyTypes:
- Ingress
{{- end }}
\ No newline at end of file
{{- if and .Values.networkPolicies.enabled .Values.istio.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: istio
namespace: "{{ .Release.Namespace }}"
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
ingress:
- from:
- namespaceSelector:
matchLabels:
app.kubernetes.io/name: istio-controlplane
egress:
- to:
- namespaceSelector:
matchLabels:
app.kubernetes.io/name: istio-controlplane
{{- end }}
{{- if and .Values.networkPolicies.enabled .Values.monitoring.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-scraping
namespace: "{{ .Release.Namespace }}"
spec:
ingress:
- from:
- namespaceSelector: {} # all namespaces for now
ports:
- port: PROMETHEUS_PORT
protocol: TCP
podSelector: {} # all pods
policyTypes:
- Ingress
{{- end }}
...@@ -16,9 +16,12 @@ istio: ...@@ -16,9 +16,12 @@ istio:
hosts: hosts:
- twistlock.{{ .Values.hostname }} - twistlock.{{ .Values.hostname }}
networkPolicies:
enabled: false
# imagePullSecrets defines the secrets to use when pulling the operator container image. # imagePullSecrets defines the secrets to use when pulling the operator container image.
imagePullSecrets: [] imagePullSecrets: []
console: console:
image: image:
repository: registry1.dso.mil/ironbank/twistlock/console/console repository: registry1.dso.mil/ironbank/twistlock/console/console
...@@ -28,7 +31,8 @@ console: ...@@ -28,7 +31,8 @@ console:
size: 100Gi size: 100Gi
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
affinity: {} affinity:
{}
# podAntiAffinity: # podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution: # requiredDuringSchedulingIgnoredDuringExecution:
# - topologyKey: "kubernetes.io/hostname" # - topologyKey: "kubernetes.io/hostname"
...@@ -44,10 +48,12 @@ affinity: {} ...@@ -44,10 +48,12 @@ affinity: {}
# values: # values:
# - "twistlock" # - "twistlock"
nodeSelector: {} nodeSelector:
{}
# node-type: twistlock" # node-type: twistlock"
tolerations: [] tolerations:
[]
# - key: "key1" # - key: "key1"
# operator: "Equal" # operator: "Equal"
# value: "value1" # value: "value1"
......
...@@ -2,7 +2,7 @@ istio: ...@@ -2,7 +2,7 @@ istio:
enabled: true enabled: true
imagePullSecrets: imagePullSecrets:
- name: private-registry-mil - name: private-registry-mil
console: console:
persistence: persistence:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment