UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
Big Bang
P
Packages
Security Tools
Twistlock
Commits
526ad987
Commit
526ad987
authored
May 25, 2021
by
Joshua Carnes
Committed by
runyontr
May 25, 2021
Browse files
Add network policy
parent
39326aff
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
8 deletions
+77
-8
.gitlab-ci.yml
.gitlab-ci.yml
+2
-2
chart/Chart.yaml
chart/Chart.yaml
+1
-1
chart/templates/network-policy/egress-default-deny-external.yml
...templates/network-policy/egress-default-deny-external.yml
+12
-0
chart/templates/network-policy/ingress-default-deny.yml
chart/templates/network-policy/ingress-default-deny.yml
+12
-0
chart/templates/network-policy/ingress-egress-istio.yml
chart/templates/network-policy/ingress-egress-istio.yml
+22
-0
chart/templates/network-policy/ingress-monitoring.yml
chart/templates/network-policy/ingress-monitoring.yml
+17
-0
chart/values.yaml
chart/values.yaml
+10
-4
tests/test-values.yml
tests/test-values.yml
+1
-1
No files found.
.gitlab-ci.yml
View file @
526ad987
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
"
chart/Chart.yaml
View file @
526ad987
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
chart/templates/network-policy/egress-default-deny-external.yml
0 → 100644
View file @
526ad987
{{
- 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
chart/templates/network-policy/ingress-default-deny.yml
0 → 100644
View file @
526ad987
{{
- 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
chart/templates/network-policy/ingress-egress-istio.yml
0 → 100644
View file @
526ad987
{{
- 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
}}
chart/templates/network-policy/ingress-monitoring.yml
0 → 100644
View file @
526ad987
{{
- 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
}}
chart/values.yaml
View file @
526ad987
...
@@ -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"
...
...
tests/test-values.yml
View file @
526ad987
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment