Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vorgang-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
vorgang-manager
Commits
18e75974
Commit
18e75974
authored
11 months ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-5653 update netpol for zufi and add unittests
parent
96394f1b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/helm/templates/network_policy.yaml
+5
-2
5 additions, 2 deletions
src/main/helm/templates/network_policy.yaml
src/test/helm/network_policy_test.yaml
+49
-19
49 additions, 19 deletions
src/test/helm/network_policy_test.yaml
with
54 additions
and
21 deletions
src/main/helm/templates/network_policy.yaml
+
5
−
2
View file @
18e75974
...
@@ -110,14 +110,17 @@ spec:
...
@@ -110,14 +110,17 @@ spec:
matchLabels
:
matchLabels
:
component
:
info-manager
component
:
info-manager
{{
- end
}}
{{
- end
}}
{{
- if
(
(.Values.
ozgcloud).zufi
).enabled
}}
{{
- if (.Values.
zufiManager
).enabled
}}
-
to
:
-
to
:
-
namespaceSelector
:
-
namespaceSelector
:
matchLabels
:
matchLabels
:
kubernetes.io/metadata.name
:
{{
required "
ozgcloud.zufi
.namespace must be set if zufi is enabled"
(
(.Values.
ozgcloud).zufi
).namespace
}}
kubernetes.io/metadata.name
:
{{
required "
zufiManager
.namespace must be set if zufi
Manager server
is enabled" (.Values.
zufiManager
).namespace
}}
podSelector
:
podSelector
:
matchLabels
:
matchLabels
:
component
:
zufi-server
component
:
zufi-server
ports
:
-
port
:
9190
protocol
:
TCP
{{
- end
}}
{{
- end
}}
-
to
:
-
to
:
-
namespaceSelector
:
-
namespaceSelector
:
...
...
This diff is collapsed.
Click to expand it.
src/test/helm/network_policy_test.yaml
+
49
−
19
View file @
18e75974
...
@@ -264,12 +264,31 @@ tests:
...
@@ -264,12 +264,31 @@ tests:
-
it
:
should add egress rule to zufi server if zufi is enabled
-
it
:
should add egress rule to zufi server if zufi is enabled
set
:
set
:
ozgcloud
:
zufiManager
:
zufi
:
enabled
:
true
enabled
:
true
namespace
:
zufi
namespace
:
zufi
asserts
:
asserts
:
-
contains
:
-
contains
:
path
:
spec.egress
content
:
to
:
-
podSelector
:
matchLabels
:
component
:
zufi-server
namespaceSelector
:
matchLabels
:
kubernetes.io/metadata.name
:
zufi
ports
:
-
port
:
9190
protocol
:
TCP
-
it
:
should not add egress rule to zufi server if zufi is disabled
set
:
zufiManager
:
enabled
:
false
asserts
:
-
notContains
:
path
:
spec.egress
path
:
spec.egress
content
:
content
:
to
:
to
:
...
@@ -279,12 +298,19 @@ tests:
...
@@ -279,12 +298,19 @@ tests:
podSelector
:
podSelector
:
matchLabels
:
matchLabels
:
component
:
zufi-server
component
:
zufi-server
ports
:
-
it
:
should not add egress rule to zufi server if zufi is disabled
-
port
:
9190
protocol
:
TCP
-
it
:
should throw error if zufi is enabled but zufi namespace is not set
set
:
set
:
ozgcloud
:
zufiManager
:
zufi
:
enabled
:
true
enabled
:
false
namespace
:
asserts
:
-
failedTemplate
:
errorMessage
:
zufiManager.namespace must be set if zufiManager server is enabled
-
it
:
should not enable zufi netpol by default
asserts
:
asserts
:
-
notContains
:
-
notContains
:
path
:
spec.egress
path
:
spec.egress
...
@@ -296,6 +322,10 @@ tests:
...
@@ -296,6 +322,10 @@ tests:
podSelector
:
podSelector
:
matchLabels
:
matchLabels
:
component
:
zufi-server
component
:
zufi-server
ports
:
-
port
:
9190
protocol
:
TCP
-
it
:
should add egress rule to dns service
-
it
:
should add egress rule to dns service
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment