Skip to content

Commit

Permalink
Split udn creation and other objects, parameterize job pause (#171)
Browse files Browse the repository at this point in the history
parameterize job pause for udn workload

Signed-off-by: Mohit Sheth <[email protected]>
Co-authored-by: Joe Talerico (rook) <[email protected]>
  • Loading branch information
mohit-sheth and jtaleric authored Jan 15, 2025
1 parent 695416e commit 40ee7db
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
34 changes: 30 additions & 4 deletions cmd/config/udn-density-pods/udn-density-pods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ metricsEndpoints:

jobs:
{{ if eq .ENABLE_LAYER_3 "true" }}
- name: udn-density-l3-pods
- name: create-udn-l3
{{ else }}
- name: udn-density-l2-pods
- name: create-udn-l2
{{ end }}
namespace: udn-density-pods
jobIterations: {{.JOB_ITERATIONS}}
Expand All @@ -39,15 +39,15 @@ jobs:
namespacedIterations: true
podWait: false
waitWhenFinished: true
preLoadImages: true
preLoadImages: false
preLoadPeriod: 15s
churn: {{.CHURN}}
churnCycles: {{.CHURN_CYCLES}}
churnDuration: {{.CHURN_DURATION}}
churnPercent: {{.CHURN_PERCENT}}
churnDelay: {{.CHURN_DELAY}}
churnDeletionStrategy: {{.CHURN_DELETION_STRATEGY}}
jobPause: 5m
jobPause: {{.JOB_PAUSE}}
namespaceLabels:
security.openshift.io/scc.podSecurityLabelSync: false
pod-security.kubernetes.io/enforce: privileged
Expand All @@ -62,6 +62,31 @@ jobs:
replicas: 1
{{ end }}

- name: udn-density-pods
namespace: udn-density-pods
jobIterations: {{.JOB_ITERATIONS}}
qps: {{.QPS}}
burst: {{.BURST}}
namespacedIterations: true
podWait: false
waitWhenFinished: true
preLoadImages: true
preLoadPeriod: 15s
churn: {{.CHURN}}
churnCycles: {{.CHURN_CYCLES}}
churnDuration: {{.CHURN_DURATION}}
churnPercent: {{.CHURN_PERCENT}}
churnDelay: {{.CHURN_DELAY}}
churnDeletionStrategy: {{.CHURN_DELETION_STRATEGY}}
jobPause: 5m
cleanup: false
namespaceLabels:
security.openshift.io/scc.podSecurityLabelSync: false
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/audit: privileged
pod-security.kubernetes.io/warn: privileged
objects:

- objectTemplate: service.yml
replicas: 5

Expand All @@ -74,3 +99,4 @@ jobs:
replicas: 2
inputVars:
podReplicas: 2

4 changes: 3 additions & 1 deletion udn-density-pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ func NewUDNDensityPods(wh *workloads.WorkloadHelper) *cobra.Command {
var churnPercent, churnCycles, iterations int
var churn, l3 bool
var churnDelay, churnDuration, podReadyThreshold time.Duration
var churnDeletionStrategy string
var churnDeletionStrategy, jobPause string
var metricsProfiles []string
var rc int
cmd := &cobra.Command{
Use: "udn-density-pods",
Short: "Runs node-density-udn workload",
SilenceUsage: true,
PreRun: func(cmd *cobra.Command, args []string) {
os.Setenv("JOB_PAUSE", jobPause)
os.Setenv("CHURN", fmt.Sprint(churn))
os.Setenv("CHURN_CYCLES", fmt.Sprintf("%v", churnCycles))
os.Setenv("CHURN_DURATION", fmt.Sprintf("%v", churnDuration))
Expand All @@ -63,6 +64,7 @@ func NewUDNDensityPods(wh *workloads.WorkloadHelper) *cobra.Command {
},
}
cmd.Flags().BoolVar(&l3, "layer3", true, "Layer3 UDN test")
cmd.Flags().StringVar(&jobPause, "job-pause", "1ms", "Time to pause after finishing the job")
cmd.Flags().BoolVar(&churn, "churn", true, "Enable churning")
cmd.Flags().IntVar(&churnCycles, "churn-cycles", 0, "Churn cycles to execute")
cmd.Flags().DurationVar(&churnDuration, "churn-duration", 1*time.Hour, "Churn duration")
Expand Down

0 comments on commit 40ee7db

Please sign in to comment.