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

add support for gateway-api #72

Merged
merged 6 commits into from
Nov 8, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
go mod rm 1.23
mohit-sheth authored and rsevilla87 committed Nov 8, 2024
commit d912bf939427a8d9cf4a834b8042ceb4439163e8
5 changes: 4 additions & 1 deletion pkg/runner/runner.go
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@
}
}

func WithGatewayApi(enable bool) OptsFunctions {

Check warning on line 107 in pkg/runner/runner.go

GitHub Actions / Run golangci-lint

var-naming: func WithGatewayApi should be WithGatewayAPI (revive)
return func(r *Runner) {
r.gatewayApi = enable
}
@@ -304,7 +304,10 @@
}
if r.gatewayApi {
ocpMetadata, _ := ocpmetadata.NewMetadata(restConfig)
ingressDomain, _ = ocpMetadata.GetDefaultIngressDomain()
ingressDomain, err = ocpMetadata.GetDefaultIngressDomain()
if err != nil {
return err
}
listenerHostName = gatewayv1beta1.Hostname("*.gwapi." + ingressDomain)
httproutes.Spec.Hostnames = append(httproutes.Spec.Hostnames, gatewayv1beta1.Hostname("nginx.gwapi."+ingressDomain))
log.Debugf("Creating GatewayClass...")

Unchanged files with check annotations Beta

clusterMetadata tools.ClusterMetadata,
p *prometheus.Prometheus,
podMetrics bool,
isGatewayApiEnabled bool,

Check warning on line 46 in pkg/runner/exec.go

GitHub Actions / Run golangci-lint

var-naming: func parameter isGatewayApiEnabled should be isGatewayAPIEnabled (revive)
) ([]tools.Result, error) {
var aggAvgRps, aggAvgLatency, aggP95Latency float64
var timeouts, httpErrors int64
podMetrics bool
cleanup bool
serviceMesh bool
gatewayApi bool

Check warning on line 46 in pkg/runner/types.go

GitHub Actions / Run golangci-lint

var-naming: struct field gatewayApi should be gatewayAPI (revive)
igNamespace string
}
type OptsFunctions func(r *Runner)
var routesNamespace = benchmarkNs.Name
var gatewayClassName string = "openshift-default"

Check warning on line 53 in pkg/runner/types.go

GitHub Actions / Run golangci-lint

var-declaration: should omit type string from declaration of var gatewayClassName; it will be inferred from the right-hand side (revive)
var gatewayNamespace gatewayv1beta1.Namespace = "openshift-ingress"
var portNumber gatewayv1beta1.PortNumber = 8080
var tlsType gatewayv1beta1.TLSModeType = "Terminate"
func run() *cobra.Command {
var cfg, uuid, esServer, esIndex, logLevel, outputDir, igNamespace string
var cleanup, podMetrics, serviceMesh, gatewayApi bool

Check warning on line 47 in cmd/ingress-perf.go

GitHub Actions / Run golangci-lint

var-naming: var gatewayApi should be gatewayAPI (revive)
cmd := &cobra.Command{
Use: "run",
Short: "Run benchmark",