Skip to content

Commit

Permalink
Remove useless flags (#112)
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 authored Sep 26, 2024
1 parent 01536b2 commit 1078970
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
5 changes: 0 additions & 5 deletions cmd/config/udn-density-l3-pods/udn-density-l3-pods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ global:
- conditionType: Ready
metric: P99
threshold: {{.POD_READY_THRESHOLD}}
{{ if eq .SVC_LATENCY "true" }}
- name: serviceLatency
svcTimeout: 10s
{{ end }}
metricsEndpoints:
{{ if .ES_SERVER }}
- metrics: [{{.METRICS}}]
Expand Down Expand Up @@ -67,4 +63,3 @@ jobs:
replicas: 2
inputVars:
podReplicas: 2
ingressDomain: {{.INGRESS_DOMAIN}}
14 changes: 2 additions & 12 deletions udn-density-l3-pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@ package ocp
import (
"fmt"
"os"
"strconv"
"time"

"github.com/kube-burner/kube-burner/pkg/workloads"
log "github.com/sirupsen/logrus"

"github.com/spf13/cobra"
)

// NewUDNDensityL3Pods holds udn-density-l3-pods workload
func NewUDNDensityL3Pods(wh *workloads.WorkloadHelper) *cobra.Command {
var churnPercent, churnCycles, iterations, podsPerNode int
var churn, svcLatency bool
var churnPercent, churnCycles, iterations int
var churn bool
var churnDelay, churnDuration, podReadyThreshold time.Duration
var churnDeletionStrategy string
cmd := &cobra.Command{
Expand All @@ -43,14 +41,8 @@ func NewUDNDensityL3Pods(wh *workloads.WorkloadHelper) *cobra.Command {
os.Setenv("CHURN_DELAY", fmt.Sprintf("%v", churnDelay))
os.Setenv("CHURN_PERCENT", fmt.Sprint(churnPercent))
os.Setenv("CHURN_DELETION_STRATEGY", churnDeletionStrategy)
ingressDomain, err := wh.MetadataAgent.GetDefaultIngressDomain()
if err != nil {
log.Fatal("Error obtaining default ingress domain: ", err.Error())
}
os.Setenv("INGRESS_DOMAIN", ingressDomain)
os.Setenv("JOB_ITERATIONS", fmt.Sprint(iterations))
os.Setenv("POD_READY_THRESHOLD", fmt.Sprintf("%v", podReadyThreshold))
os.Setenv("SVC_LATENCY", strconv.FormatBool(svcLatency))
},
Run: func(cmd *cobra.Command, args []string) {
setMetrics(cmd, "metrics.yml")
Expand All @@ -65,7 +57,5 @@ func NewUDNDensityL3Pods(wh *workloads.WorkloadHelper) *cobra.Command {
cmd.Flags().StringVar(&churnDeletionStrategy, "churn-deletion-strategy", "default", "Churn deletion strategy to use")
cmd.Flags().IntVar(&iterations, "iterations", 0, "Iterations")
cmd.Flags().DurationVar(&podReadyThreshold, "pod-ready-threshold", 1*time.Minute, "Pod ready timeout threshold")
cmd.Flags().IntVar(&podsPerNode, "pods-per-node", 245, "Pods per node")
cmd.Flags().BoolVar(&svcLatency, "service-latency", false, "Enable service latency measurement")
return cmd
}

0 comments on commit 1078970

Please sign in to comment.