-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created Cilium Network Policy and Cilium Cluster Wide Network Policy …
…Test (#456) I created a Cilium Network Policy and Cilium Cluster Wide Network Policy pipeline that will deploy a set number of CCNPS and CNPS that match to pods. It will also scale to a certain number of nodes and scale to a set number of pods. The policies have egress and ingress rules to reflect customer usage and to be able to test control plane resource usage consumption. This test is created based on the existing service churn pipeline framework. I created this test to be able to find the cilium cpu, memory, and apiserver usage through testing a 1000 node cilium cluster with endpoints as well as a 3000 node cilium cluster with CES enabled. This is for the upcoming official release of the cnp/ccnp feature. Here is the link to my pipeline: https://dev.azure.com/akstelescope/telescope/_build?definitionId=37 and here is a link to a successful run: https://dev.azure.com/akstelescope/telescope/_build/results?buildId=9548&view=results Since I made changes to files that the other pipelines use, I'm running Service & Cluster Churn: Regular Pipelines: - Service Churn: https://dev.azure.com/akstelescope/telescope/_build/results?buildId=9545&view=results - Cluster Churn: https://dev.azure.com/akstelescope/telescope/_build/results?buildId=9546&view=results
- Loading branch information
1 parent
0ad5629
commit 90a7647
Showing
11 changed files
with
246 additions
and
13 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
modules/python/clusterloader2/slo/config/ccnp_template.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,19 @@ | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumClusterwideNetworkPolicy | ||
metadata: | ||
name: {{.basename}} | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
group: cnp-ccnp | ||
ingressDeny: | ||
- fromEndpoints: | ||
- matchLabels: | ||
io.kubernetes.pod.namespace: default | ||
egress: | ||
- toPorts: | ||
- ports: | ||
- port: "53" | ||
protocol: UDP | ||
toEntities: | ||
- cluster |
20 changes: 20 additions & 0 deletions
20
modules/python/clusterloader2/slo/config/cnp_template.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,20 @@ | ||
apiVersion: cilium.io/v2 | ||
kind: CiliumNetworkPolicy | ||
metadata: | ||
name: {{.basename}} | ||
namespace: slo-1 # slo-1 was used because that is the ns pods are deployed in & tried passing in namespace from load-config but had object mismatch error, revise in future to possibly pass in ns | ||
spec: | ||
endpointSelector: | ||
matchLabels: | ||
group: cnp-ccnp | ||
ingressDeny: | ||
- fromEndpoints: | ||
- matchLabels: | ||
io.kubernetes.pod.namespace: default | ||
egress: | ||
- toPorts: | ||
- ports: | ||
- port: "443" | ||
protocol: TCP | ||
toCIDR: | ||
- 0.0.0.0/0 |
2 changes: 2 additions & 0 deletions
2
modules/python/clusterloader2/slo/config/deployment_template.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
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
16 changes: 16 additions & 0 deletions
16
modules/python/clusterloader2/slo/config/modules/ciliumclusternetworkpolicy.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,16 @@ | ||
## CCNP module provides a module for creating / deleting CCNPs. | ||
|
||
## Input params | ||
{{$actionName := .actionName}} | ||
{{$ccnps := .ccnps}} | ||
{{$Group := .Group}} | ||
|
||
steps: | ||
- name: "{{$actionName}} {{$ccnps}} k8s CCNPs" | ||
phases: | ||
- namespaceRange: null | ||
replicasPerNamespace: {{$ccnps}} | ||
tuningSet: Sequence | ||
objectBundle: | ||
- basename: ccnp | ||
objectTemplatePath: ccnp_template.yaml |
19 changes: 19 additions & 0 deletions
19
modules/python/clusterloader2/slo/config/modules/ciliumnetworkpolicy.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,19 @@ | ||
## CNP module provides a module for creating / deleting CNPs. | ||
|
||
## Input params | ||
{{$actionName := .actionName}} | ||
{{$namespaces := .namespaces}} | ||
{{$cnpsPerNamespace := .cnpsPerNamespace}} | ||
{{$Group := .Group}} | ||
|
||
steps: | ||
- name: "{{$actionName}} {{$cnpsPerNamespace}} k8s CNPs" | ||
phases: | ||
- namespaceRange: | ||
min: 1 | ||
max: {{$namespaces}} | ||
replicasPerNamespace: {{$cnpsPerNamespace}} | ||
tuningSet: Sequence | ||
objectBundle: | ||
- basename: cnp | ||
objectTemplatePath: cnp_template.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
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
Oops, something went wrong.