comment out
Some checks failed
E2E Tests / Run on Ubuntu (push) Failing after 46s
Build images / Run lint test (push) Failing after 6m18s
Lint / Run on Ubuntu (push) Failing after 11m13s
Build images / Run unit test (push) Successful in 16m0s
Tests / Run on Ubuntu (push) Successful in 16m1s
Build images / Run e2e tests (push) Failing after 17m43s
Build images / Build docker image (push) Has been skipped

This commit is contained in:
Chris Richardson
2025-07-02 15:10:03 -04:00
parent 819acfa40c
commit 21d8004e27
4 changed files with 86 additions and 371 deletions

View File

@@ -24,59 +24,12 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InfrastructureSpec) DeepCopyInto(out *InfrastructureSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureSpec.
func (in *InfrastructureSpec) DeepCopy() *InfrastructureSpec {
if in == nil {
return nil
}
out := new(InfrastructureSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LeaderDownloadSpec) DeepCopyInto(out *LeaderDownloadSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderDownloadSpec.
func (in *LeaderDownloadSpec) DeepCopy() *LeaderDownloadSpec {
if in == nil {
return nil
}
out := new(LeaderDownloadSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LeaderSpec) DeepCopyInto(out *LeaderSpec) {
*out = *in
out.Download = in.Download
out.Resources = in.Resources
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderSpec.
func (in *LeaderSpec) DeepCopy() *LeaderSpec {
if in == nil {
return nil
}
out := new(LeaderSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LocustCluster) DeepCopyInto(out *LocustCluster) { func (in *LocustCluster) DeepCopyInto(out *LocustCluster) {
*out = *in *out = *in
out.TypeMeta = in.TypeMeta out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec) out.Spec = in.Spec
out.Status = in.Status out.Status = in.Status
} }
@@ -133,21 +86,6 @@ func (in *LocustClusterList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LocustClusterSpec) DeepCopyInto(out *LocustClusterSpec) { func (in *LocustClusterSpec) DeepCopyInto(out *LocustClusterSpec) {
*out = *in *out = *in
out.Leader = in.Leader
in.Worker.DeepCopyInto(&out.Worker)
out.Metrics = in.Metrics
if in.Infrastructure != nil {
in, out := &in.Infrastructure, &out.Infrastructure
*out = make([]InfrastructureSpec, len(*in))
copy(*out, *in)
}
if in.Secrets != nil {
in, out := &in.Secrets, &out.Secrets
*out = make([]SecretsSpec, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
} }
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocustClusterSpec. // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocustClusterSpec.
@@ -174,147 +112,3 @@ func (in *LocustClusterStatus) DeepCopy() *LocustClusterStatus {
in.DeepCopyInto(out) in.DeepCopyInto(out)
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MetricsSpec) DeepCopyInto(out *MetricsSpec) {
*out = *in
out.Mosaic = in.Mosaic
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsSpec.
func (in *MetricsSpec) DeepCopy() *MetricsSpec {
if in == nil {
return nil
}
out := new(MetricsSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MosaicSpec) DeepCopyInto(out *MosaicSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MosaicSpec.
func (in *MosaicSpec) DeepCopy() *MosaicSpec {
if in == nil {
return nil
}
out := new(MosaicSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourcesSpec) DeepCopyInto(out *ResourcesSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcesSpec.
func (in *ResourcesSpec) DeepCopy() *ResourcesSpec {
if in == nil {
return nil
}
out := new(ResourcesSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SecretsKeys) DeepCopyInto(out *SecretsKeys) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsKeys.
func (in *SecretsKeys) DeepCopy() *SecretsKeys {
if in == nil {
return nil
}
out := new(SecretsKeys)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SecretsSpec) DeepCopyInto(out *SecretsSpec) {
*out = *in
if in.SecretsKeys != nil {
in, out := &in.SecretsKeys, &out.SecretsKeys
*out = make([]SecretsKeys, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsSpec.
func (in *SecretsSpec) DeepCopy() *SecretsSpec {
if in == nil {
return nil
}
out := new(SecretsSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TestsSpecs) DeepCopyInto(out *TestsSpecs) {
*out = *in
if in.TestSettings != nil {
in, out := &in.TestSettings, &out.TestSettings
*out = make([]WorkerEnv, len(*in))
copy(*out, *in)
}
if in.TestCommand != nil {
in, out := &in.TestCommand, &out.TestCommand
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestsSpecs.
func (in *TestsSpecs) DeepCopy() *TestsSpecs {
if in == nil {
return nil
}
out := new(TestsSpecs)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkerEnv) DeepCopyInto(out *WorkerEnv) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerEnv.
func (in *WorkerEnv) DeepCopy() *WorkerEnv {
if in == nil {
return nil
}
out := new(WorkerEnv)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkerSpec) DeepCopyInto(out *WorkerSpec) {
*out = *in
if in.Tests != nil {
in, out := &in.Tests, &out.Tests
*out = make([]TestsSpecs, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
out.Resources = in.Resources
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerSpec.
func (in *WorkerSpec) DeepCopy() *WorkerSpec {
if in == nil {
return nil
}
out := new(WorkerSpec)
in.DeepCopyInto(out)
return out
}

View File

@@ -37,167 +37,85 @@ spec:
metadata: metadata:
type: object type: object
spec: spec:
description: LocustClusterSpec defines the desired state of LocustCluster description: |-
properties: LocustClusterSpec defines the desired state of LocustCluster.
infrastructure:
items: type ResourcesSpec struct {
properties: MaxCpu string `json:"maxCpu,omitempty" protobuf:"bytes,1,name=maxCpu"`
endpoint: MinCpu string `json:"minCpu,omitempty" protobuf:"bytes,2,name=minCpu"`
type: string MaxMem string `json:"maxMem,omitempty" protobuf:"bytes,3,name=maxMem"`
prometheusEndpoint: MinMem string `json:"minMem,omitempty" protobuf:"bytes,4,name=minMem"`
type: string }
prometheusJobName:
type: string type LeaderSpec struct {
prometheusPort: TestFile string `json:"leaderFile,omitempty" protobuf:"bytes,1,name=leaderFile"`
type: integer PriorityClass string `json:"priorityClass,omitempty" protobuf:"bytes,2,name=priorityClass"`
required: Download LeaderDownloadSpec `json:"download,omitempty" protobuf:"bytes,3,rep,name=download"`
- endpoint Resources ResourcesSpec `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"`
type: object Image string `json:"image,omitempty" protobuf:"bytes,5,name=image"`
type: array }
leader:
properties: type LeaderDownloadSpec struct {
download: Bucket string `json:"bucket" protobuf:"bytes,1,name=bucket"`
properties: Filename string `json:"filename" protobuf:"bytes,2,name=filename"`
bucket: }
type: string
filename: type WorkerEnv struct {
type: string Name string `json:"name" protobuf:"bytes,1,name=name"`
required: Value string `json:"value" protobuf:"bytes,2,name=value"`
- bucket }
- filename
type: object type TestsSpecs struct {
image: TestName string `json:"testName" protobuf:"bytes,1,name=testName"`
type: string RunTime string `json:"runTime" protobuf:"bytes,2,name=runTime"`
leaderFile: TestSettings []WorkerEnv `json:"env,omitempty" protobuf:"bytes,3,rep,name=env"`
type: string TestCommand []string `json:"testCommand,omitempty" protobuf:"bytes,4,name=testCommand"`
priorityClass: }
type: string
resources: type WorkerSpec struct {
properties: HatchRate int `json:"hatchRate" protobuf:"varint,1,name=hatchRate"`
maxCpu: TestContainer string `json:"testContainer" protobuf:"bytes,2,name=testContainer"`
type: string ScenarioName string `json:"scenarioName" protobuf:"bytes,3,name=scenarioName"`
maxMem: TestLanguage string `json:"testLanguage" protobuf:"bytes,4,name=testLanguage"`
type: string TestPath string `json:"testPath" protobuf:"bytes,5,name=testPath"`
minCpu: Tests []TestsSpecs `json:"tests" protobuf:"bytes,6,rep,name=tests"`
type: string Clients int `json:"clients" protobuf:"varint,7,name=clients"`
minMem: Nodes int `json:"nodes" protobuf:"varint,8,name=nodes"`
type: string PriorityClass string `json:"priorityClass,omitempty" protobuf:"bytes,9,name=priorityClass"`
type: object Resources ResourcesSpec `json:"resources,omitempty" protobuf:"bytes,10,rep,name=resources"`
type: object }
metrics:
properties: type MosaicSpec struct {
mosaic: WorkSpace string `json:"workSpace" protobuf:"bytes,1,name=workSpace"`
properties: NameSpace string `json:"nameSpace" protobuf:"bytes,2,name=nameSpace"`
grafanaEndpoint: PublishingEndpoint string `json:"publishing_endpoint,omitempty" protobuf:"bytes,3,name=publishingEndpoint"`
type: string Mtls bool `json:"mtls,omitempty" protobuf:"bool,4,name=mtls"`
groupEmail: PrometheusTag string `json:"prometheusTag" protobuf:"bytes,3,name=prometheusTag"`
type: string GroupEmail string `json:"groupEmail" protobuf:"bytes,4,name=groupEmail"`
mtls: GrafanaEndpoint string `json:"grafanaEndpoint,omitempty" protobuf:"bytes,5,name=grafanaEndpoint"`
type: boolean }
nameSpace:
type: string type MetricsSpec struct {
prometheusTag: Mosaic MosaicSpec `json:"mosaic,omitempty" protobuf:"bytes,1,rep,name=mosaic"`
type: string }
publishing_endpoint:
type: string type InfrastructureSpec struct {
workSpace: Endpoint string `json:"endpoint" protobuf:"bytes,1,name=endpoint"`
type: string PrometheusJobName string `json:"prometheusJobName,omitempty" protobuf:"bytes,2,name=prometheusJobName"`
required: PrometheusPort int `json:"prometheusPort,omitempty" protobuf:"varint,3,name=prometheusPort"`
- groupEmail PrometheusEndpoint string `json:"prometheusEndpoint,omitempty" protobuf:"bytes,4,name=prometheusEndpoint"`
- nameSpace }
- prometheusTag
- workSpace type SecretsKeys struct {
type: object SecretKey string `json:"secretKey" protobuf:"bytes,1,name=secretKey"`
type: object }
secrets:
items: type SecretsSpec struct {
properties: SecretName string `json:"secretName" protobuf:"bytes,1,name=secretName"`
secretKeys: SecretsKeys []SecretsKeys `json:"secretKeys" protobuf:"bytes,2,name=secretKeys"`
items: }
properties:
secretKey: LocustClusterSpec defines the desired state of LocustCluster
type: string
required:
- secretKey
type: object
type: array
secretName:
type: string
required:
- secretKeys
- secretName
type: object
type: array
worker:
properties:
clients:
type: integer
hatchRate:
type: integer
nodes:
type: integer
priorityClass:
type: string
resources:
properties:
maxCpu:
type: string
maxMem:
type: string
minCpu:
type: string
minMem:
type: string
type: object
scenarioName:
type: string
testContainer:
type: string
testLanguage:
type: string
testPath:
type: string
tests:
items:
properties:
env:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
runTime:
type: string
testCommand:
items:
type: string
type: array
testName:
type: string
required:
- runTime
- testName
type: object
type: array
required:
- clients
- hatchRate
- nodes
- scenarioName
- testContainer
- testLanguage
- testPath
- tests
type: object
required:
- metrics
- worker
type: object type: object
status: status:
description: LocustClusterStatus defines the observed state of LocustCluster. description: LocustClusterStatus defines the observed state of LocustCluster.

7
go.mod
View File

@@ -5,8 +5,12 @@ go 1.23.0
godebug default=go1.23 godebug default=go1.23
require ( require (
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/onsi/ginkgo/v2 v2.22.0 github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.36.1 github.com/onsi/gomega v1.36.1
go.uber.org/zap v1.27.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
k8s.io/apimachinery v0.32.1 k8s.io/apimachinery v0.32.1
k8s.io/client-go v0.32.1 k8s.io/client-go v0.32.1
sigs.k8s.io/controller-runtime v0.20.4 sigs.k8s.io/controller-runtime v0.20.4
@@ -26,9 +30,7 @@ require (
github.com/felixge/httpsnoop v1.0.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.23.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect
@@ -68,7 +70,6 @@ require (
go.opentelemetry.io/otel/trace v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.30.0 // indirect golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect

2
go.sum
View File

@@ -214,6 +214,8 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=