Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additions to CCNP/CNP Pipeline #500

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c3ed3ac
- adjusted ccnp and cnp policies
karina-ranadive Jan 25, 2025
92d75d3
changed scenario version back to main
karina-ranadive Jan 31, 2025
e17d4c9
fixed templates
karina-ranadive Feb 2, 2025
21bc464
fix
karina-ranadive Feb 2, 2025
68513a4
temp keeping cluster scaled
karina-ranadive Feb 2, 2025
84ebb67
end label
karina-ranadive Feb 2, 2025
30114b4
removed extra end
karina-ranadive Feb 3, 2025
1e43c71
skip scaling down
karina-ranadive Feb 3, 2025
f248306
changed deletion of ns to false temp
karina-ranadive Feb 4, 2025
525abfb
dont cleanup resources
karina-ranadive Feb 4, 2025
540ab26
adjusted deployment numbers
karina-ranadive Feb 4, 2025
373a40a
1-1 cnp-deployment
karina-ranadive Feb 4, 2025
0644fd2
name
karina-ranadive Feb 4, 2025
e7e73ea
name adjustment
karina-ranadive Feb 4, 2025
dabc8ce
added name deployment label
karina-ranadive Feb 4, 2025
8035aa7
uncommented out
karina-ranadive Feb 5, 2025
4fb9da8
multiple ns
karina-ranadive Feb 5, 2025
bf5e1e4
slo parameter passing in
karina-ranadive Feb 6, 2025
d086c86
adjustments
karina-ranadive Feb 6, 2025
6f69325
fix
karina-ranadive Feb 6, 2025
f3c0a20
adjustment
karina-ranadive Feb 6, 2025
679ad26
basename
karina-ranadive Feb 6, 2025
afc2562
fix
karina-ranadive Feb 6, 2025
56c26ae
passing in ns
karina-ranadive Feb 6, 2025
5a17bf5
cnp basename
karina-ranadive Feb 6, 2025
c9a113b
adjusted ns
karina-ranadive Feb 6, 2025
3ae5c2d
randomized namespace
karina-ranadive Feb 7, 2025
fc8a42e
adjustment
karina-ranadive Feb 7, 2025
0b7ddd6
slice function
karina-ranadive Feb 7, 2025
2bb67df
fixed slice
karina-ranadive Feb 7, 2025
08182ef
map
karina-ranadive Feb 7, 2025
f38d2bc
array
karina-ranadive Feb 7, 2025
c2b5dca
using sprig
karina-ranadive Feb 7, 2025
f8c8851
2 ns
karina-ranadive Feb 7, 2025
0922cd1
change
karina-ranadive Feb 7, 2025
c290716
fix
karina-ranadive Feb 7, 2025
03aa965
randNamspace
karina-ranadive Feb 7, 2025
fe3fd2e
took out -
karina-ranadive Feb 7, 2025
748b92a
randomNs
karina-ranadive Feb 7, 2025
c3c3f0b
changes
karina-ranadive Feb 7, 2025
74e9a40
fix
karina-ranadive Feb 7, 2025
248ced3
removed break
karina-ranadive Feb 7, 2025
96392aa
fixes
karina-ranadive Feb 7, 2025
e0c90fa
fix
karina-ranadive Feb 7, 2025
72ed99f
fix to template
karina-ranadive Feb 7, 2025
421ccb8
fixes
karina-ranadive Feb 7, 2025
2f8909d
switched to for loop
karina-ranadive Feb 10, 2025
245b10a
need to scale
karina-ranadive Feb 10, 2025
aae810f
no scale and changing ns
karina-ranadive Feb 10, 2025
74f381b
fix
karina-ranadive Feb 10, 2025
8ea2ef9
changes
karina-ranadive Feb 10, 2025
f71c34d
dont scale down
karina-ranadive Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions jobs/competitive-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
regions: ${{ parameters.regions }}
engine_input: ${{ parameters.engine_input }}
credential_type: ${{ parameters.credential_type }}
- template: /steps/cleanup-resources.yml
parameters:
cloud: ${{ parameters.cloud }}
regions: ${{ parameters.regions }}
terraform_arguments: ${{ parameters.terraform_arguments }}
retry_attempt_count: ${{ parameters.retry_attempt_count }}
credential_type: ${{ parameters.credential_type }}
# - template: /steps/cleanup-resources.yml

Check failure on line 100 in jobs/competitive-test.yml

View workflow job for this annotation

GitHub Actions / yaml-validation

100:3 [comments-indentation] comment not indented like content
# parameters:
# cloud: ${{ parameters.cloud }}
# regions: ${{ parameters.regions }}
# terraform_arguments: ${{ parameters.terraform_arguments }}
# retry_attempt_count: ${{ parameters.retry_attempt_count }}
# credential_type: ${{ parameters.credential_type }}
22 changes: 17 additions & 5 deletions modules/python/clusterloader2/slo/config/ccnp_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,26 @@ spec:
endpointSelector:
matchLabels:
group: cnp-ccnp
ingress:
- icmps:
- fields:
- type: 8
family: IPv4
- type: 128
family: IPv6
ingressDeny:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: default
- fromEntities:
- world
egress:
- icmps:
- fields:
- type: 8
family: IPv4
- type: 128
family: IPv6
- toPorts:
- ports:
- port: "53"
protocol: UDP
- port: "443"
protocol: ANY
toEntities:
- cluster
32 changes: 26 additions & 6 deletions modules/python/clusterloader2/slo/config/cnp_template.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
{{- $randNum := RandIntRange 1 2 -}}
{{- $randomNamespace := printf "slo-%d" $randNum -}}

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
name: {{.Name}}
namespace: {{.Namespace}}
spec:
endpointSelector:
matchLabels:
group: cnp-ccnp
ingressDeny:
name: {{.Name}}
ingress:
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: default
k8s:io.kubernetes.pod.namespace: {{$randomNamespace}}
- icmps:
- fields:
- type: 8
family: IPv4
- type: 128
family: IPv6
egress:
- icmps:
- fields:
- type: 8
family: IPv4
- type: 128
family: IPv6
toEntities:
- cluster
- toPorts:
- ports:
- port: "443"
protocol: TCP
toCIDR:
- 0.0.0.0/0
- port: "53"
protocol: UDP
toEntities:
- cluster
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ metadata:
name: {{.Name}}
labels:
group: {{.Group}}
name: {{.Name}}
{{if .SvcName}}
svc: {{.SvcName}}-{{.Index}}
{{end}}
Expand Down
156 changes: 81 additions & 75 deletions modules/python/clusterloader2/slo/config/load-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ name: load-config
{{$CCNP_TEST := DefaultParam .CL2_CCNP_TEST false}}

# Config options for test parameters
{{$nodesPerNamespace := DefaultParam .CL2_NODES_PER_NAMESPACE 100}}
{{$nodesPerNamespace := DefaultParam .CL2_NODES_PER_NAMESPACE 1000}}
{{$podsPerNode := DefaultParam .CL2_PODS_PER_NODE 50}}
{{$loadTestThroughput := DefaultParam .CL2_LOAD_TEST_THROUGHPUT 100}}
{{$deploymentSize := DefaultParam .CL2_DEPLOYMENT_SIZE 100}}
{{$repeats := DefaultParam .CL2_REPEATS 1}}
{{$groupName := DefaultParam .CL2_GROUP_NAME "service-discovery"}}

# TODO(jshr-w): This should eventually use >1 namespace.
{{$namespaces := 1}}
{{$namespaces := DefaultParam .CL2_NO_OF_NAMESPACES 1}}
{{$nodes := DefaultParam .CL2_NODES 1000}}

#set nodesPerNamespace to 100
{{$deploymentQPS := DivideFloat $loadTestThroughput $deploymentSize}}
{{$operationTimeout := DefaultParam .CL2_OPERATION_TIMEOUT "15m"}}
{{$totalPods := MultiplyInt $namespaces $nodes $podsPerNode}}
{{$totalPods := MultiplyInt $namespaces $nodesPerNamespace $podsPerNode}}
{{$podsPerNamespace := DivideInt $totalPods $namespaces}}
{{$deploymentsPerNamespace := DivideInt $podsPerNamespace $deploymentSize}}

Expand All @@ -40,12 +41,13 @@ name: load-config
{{$CNPS_PER_NAMESPACE := DefaultParam .CL2_CNPS_PER_NAMESPACE 0}}
{{$CCNPS := DefaultParam .CL2_CCNPS 0}}
{{$DUALSTACK := DefaultParam .CL2_DUALSTACK false}}
{{$smallDeploymentsPerNamespaceCNP := DivideInt $podsPerNamespace $SMALL_GROUP_SIZE}}

namespace:
number: {{$namespaces}}
prefix: slo
deleteStaleNamespaces: true
deleteAutomanagedNamespaces: true
deleteStaleNamespaces: false
deleteAutomanagedNamespaces: false
enableExistingNamespaces: false

tuningSets:
Expand Down Expand Up @@ -121,88 +123,92 @@ steps:
{{if or $CCNP_TEST $CNP_TEST}}
bigDeploymentSize: 0
bigDeploymentsPerNamespace: 0
cnp_test: {{$CNP_TEST}}
ccnp_test: {{$CCNP_TEST}}
{{else}}
bigDeploymentSize: {{$BIG_GROUP_SIZE}}
bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}}
{{end}}
smallDeploymentSize: {{$SMALL_GROUP_SIZE}}
smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}}
CpuRequest: {{$latencyPodCpu}}m
MemoryRequest: {{$latencyPodMemory}}M
Group: {{$groupName}}
deploymentLabel: start

- module:
path: /modules/reconcile-objects.yaml
params:
actionName: "restart"
namespaces: {{$namespaces}}
tuningSet: Sequence
operationTimeout: {{$operationTimeout}}
{{if or $CCNP_TEST $CNP_TEST}}
bigDeploymentSize: 0
bigDeploymentsPerNamespace: 0
smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespaceCNP}}
cnp_test: {{$CNP_TEST}}
ccnp_test: {{$CCNP_TEST}}
{{else}}
bigDeploymentSize: {{$BIG_GROUP_SIZE}}
bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}}
{{end}}
smallDeploymentSize: {{$SMALL_GROUP_SIZE}}
smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}}
{{end}}
CpuRequest: {{$latencyPodCpu}}m
MemoryRequest: {{$latencyPodMemory}}M
Group: {{$groupName}}
deploymentLabel: restart
deploymentLabel: start


- module:
path: /modules/reconcile-objects.yaml
params:
actionName: "delete"
namespaces: {{$namespaces}}
tuningSet: DeploymentDeleteQps
operationTimeout: {{$operationTimeout}}
{{if or $CCNP_TEST $CNP_TEST}}
bigDeploymentSize: 0
bigDeploymentsPerNamespace: 0
cnp_test: {{$CNP_TEST}}
ccnp_test: {{$CCNP_TEST}}
{{else}}
bigDeploymentSize: {{$BIG_GROUP_SIZE}}
bigDeploymentsPerNamespace: 0
{{end}}
smallDeploymentSize: {{$SMALL_GROUP_SIZE}}
smallDeploymentsPerNamespace: 0
deploymentLabel: restart
Group: {{$groupName}}
{{if $SERVICE_TEST}}
- module:
path: /modules/services.yaml
params:
actionName: "Deleting"
namespaces: {{$namespaces}}
smallServicesPerNamespace: 0
bigServicesPerNamespace: 0
{{end}}
{{if $CNP_TEST}}
- module:
path: /modules/ciliumnetworkpolicy.yaml
params:
actionName: "Deleting"
namespaces: {{$namespaces}}
cnpsPerNamespace: 0
{{end}}
{{if $CCNP_TEST}}
- module:
path: /modules/ciliumclusternetworkpolicy.yaml
params:
actionName: "Deleting"
namespaces: {{$namespaces}}
ccnps: 0
{{end}}
{{end}}

# - module:
# path: /modules/reconcile-objects.yaml
# params:
# actionName: "restart"
# namespaces: {{$namespaces}}
# tuningSet: Sequence
# operationTimeout: {{$operationTimeout}}
# {{if or $CCNP_TEST $CNP_TEST}}
# bigDeploymentSize: 0
# bigDeploymentsPerNamespace: 0
# cnp_test: {{$CNP_TEST}}
# ccnp_test: {{$CCNP_TEST}}
# {{else}}
# bigDeploymentSize: {{$BIG_GROUP_SIZE}}
# bigDeploymentsPerNamespace: {{$bigDeploymentsPerNamespace}}
# {{end}}
# smallDeploymentSize: {{$SMALL_GROUP_SIZE}}
# smallDeploymentsPerNamespace: {{$smallDeploymentsPerNamespace}}
# CpuRequest: {{$latencyPodCpu}}m
# MemoryRequest: {{$latencyPodMemory}}M
# Group: {{$groupName}}
# deploymentLabel: restart

# - module:
# path: /modules/reconcile-objects.yaml
# params:
# actionName: "delete"
# namespaces: {{$namespaces}}
# tuningSet: DeploymentDeleteQps
# operationTimeout: {{$operationTimeout}}
# {{if or $CCNP_TEST $CNP_TEST}}
# bigDeploymentSize: 0
# bigDeploymentsPerNamespace: 0
# cnp_test: {{$CNP_TEST}}
# ccnp_test: {{$CCNP_TEST}}
# {{else}}
# bigDeploymentSize: {{$BIG_GROUP_SIZE}}
# bigDeploymentsPerNamespace: 0
# {{end}}
# smallDeploymentSize: {{$SMALL_GROUP_SIZE}}
# smallDeploymentsPerNamespace: 0
# deploymentLabel: restart
# Group: {{$groupName}}
# {{if $SERVICE_TEST}}
# - module:
# path: /modules/services.yaml
# params:
# actionName: "Deleting"
# namespaces: {{$namespaces}}
# smallServicesPerNamespace: 0
# bigServicesPerNamespace: 0
# {{end}}
# {{if $CNP_TEST}}
# - module:
# path: /modules/ciliumnetworkpolicy.yaml
# params:
# actionName: "Deleting"
# namespaces: {{$namespaces}}
# cnpsPerNamespace: 0
# {{end}}
# {{if $CCNP_TEST}}
# - module:
# path: /modules/ciliumclusternetworkpolicy.yaml
# params:
# actionName: "Deleting"
# namespaces: {{$namespaces}}
# ccnps: 0
# {{end}}
# {{end}}

{{if $CILIUM_METRICS_ENABLED}}
- module:
Expand Down
Loading
Loading