Skip to content

Commit c089483

Browse files
hypnocemanusa
authored andcommitted
Update chaos mesh to v2.1.3
1 parent 6f76d79 commit c089483

File tree

6 files changed

+2568
-1469
lines changed

6 files changed

+2568
-1469
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#### Dependency Upgrade
2626
* Bump Knative model to v0.34.0
2727
* Bump Apache Camel-K to v1.9.2
28+
* Update chaos-mesh extension to v2.1.3. Add PodHttpChaos, GCPChaos, BlockChaos and PhysicalMachineChaos.
2829

2930
#### New Features
3031
* Fix #2271: Support periodic refresh of access tokens before they expire

extensions/chaosmesh/generator/cmd/generate/generate.go

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@ func main() {
2929
// the CRD List types for which the model should be generated
3030
// no other types need to be defined as they are auto discovered
3131
crdLists := map[reflect.Type]schemagen.CrdScope{
32-
reflect.TypeOf(chaosmesh.IoChaosList{}): schemagen.Namespaced,
33-
reflect.TypeOf(chaosmesh.KernelChaosList{}): schemagen.Namespaced,
34-
reflect.TypeOf(chaosmesh.NetworkChaosList{}): schemagen.Namespaced,
35-
reflect.TypeOf(chaosmesh.PodChaosList{}): schemagen.Namespaced,
36-
reflect.TypeOf(chaosmesh.PodIoChaosList{}): schemagen.Namespaced,
37-
reflect.TypeOf(chaosmesh.PodNetworkChaosList{}): schemagen.Namespaced,
38-
reflect.TypeOf(chaosmesh.StressChaosList{}): schemagen.Namespaced,
39-
reflect.TypeOf(chaosmesh.TimeChaosList{}): schemagen.Namespaced,
40-
reflect.TypeOf(chaosmesh.JVMChaosList{}): schemagen.Namespaced,
41-
reflect.TypeOf(chaosmesh.HTTPChaosList{}): schemagen.Namespaced,
42-
reflect.TypeOf(chaosmesh.DNSChaosList{}): schemagen.Namespaced,
43-
reflect.TypeOf(chaosmesh.AwsChaosList{}): schemagen.Namespaced,
32+
reflect.TypeOf(chaosmesh.IOChaosList{}): schemagen.Namespaced,
33+
reflect.TypeOf(chaosmesh.KernelChaosList{}): schemagen.Namespaced,
34+
reflect.TypeOf(chaosmesh.NetworkChaosList{}): schemagen.Namespaced,
35+
reflect.TypeOf(chaosmesh.PodChaosList{}): schemagen.Namespaced,
36+
reflect.TypeOf(chaosmesh.PodIOChaosList{}): schemagen.Namespaced,
37+
reflect.TypeOf(chaosmesh.PodHttpChaosList{}): schemagen.Namespaced,
38+
reflect.TypeOf(chaosmesh.PodNetworkChaosList{}): schemagen.Namespaced,
39+
reflect.TypeOf(chaosmesh.StressChaosList{}): schemagen.Namespaced,
40+
reflect.TypeOf(chaosmesh.TimeChaosList{}): schemagen.Namespaced,
41+
reflect.TypeOf(chaosmesh.JVMChaosList{}): schemagen.Namespaced,
42+
reflect.TypeOf(chaosmesh.HTTPChaosList{}): schemagen.Namespaced,
43+
reflect.TypeOf(chaosmesh.DNSChaosList{}): schemagen.Namespaced,
44+
reflect.TypeOf(chaosmesh.AWSChaosList{}): schemagen.Namespaced,
45+
reflect.TypeOf(chaosmesh.GCPChaosList{}): schemagen.Namespaced,
46+
reflect.TypeOf(chaosmesh.BlockChaosList{}): schemagen.Namespaced,
47+
reflect.TypeOf(chaosmesh.PhysicalMachineChaosList{}): schemagen.Namespaced,
4448
}
4549

4650
// constraints and patterns for fields
@@ -65,17 +69,27 @@ func main() {
6569
// - replace <key> with <value> aka "package prefix"
6670
// - replace '/' with '.' for a valid java package name
6771
// e.g. knative.dev/eventing/pkg/apis/messaging/v1beta1/ChannelTemplateSpec is mapped to "io.fabric8.knative.internal.eventing.pkg.apis.messaging.v1beta1.ChannelTemplateSpec"
68-
mappingSchema := map[string]string{
69-
}
72+
mappingSchema := map[string]string{}
7073

7174
// overwriting some times
7275
manualTypeMap := map[reflect.Type]string{
7376
reflect.TypeOf(v1.Time{}): "java.lang.String",
7477
reflect.TypeOf(runtime.RawExtension{}): "Map<String, Object>",
7578
reflect.TypeOf([]byte{}): "java.lang.String",
79+
reflect.TypeOf([]string{}): "java.util.List<java.lang.String>",
7680
}
7781

78-
json := schemagen.GenerateSchema("http://fabric8.io/csi/ChaosMeshSchema#", crdLists, providedPackages, manualTypeMap, packageMapping, mappingSchema, providedTypes, constraints, "io.fabric8")
82+
json := schemagen.GenerateSchema(
83+
"http://fabric8.io/csi/ChaosMeshSchema#",
84+
crdLists,
85+
providedPackages,
86+
manualTypeMap,
87+
packageMapping,
88+
mappingSchema,
89+
providedTypes,
90+
constraints,
91+
"io.fabric8",
92+
)
7993

8094
fmt.Println(json)
8195
}

extensions/chaosmesh/generator/go.mod

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,64 @@
11
module github.com/fabric8io/kubernetes-client/extensions/chaosmesh/generator
22

33
require (
4-
github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20210728073817-92f5e71c799f
4+
github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657
55
github.com/fabric8io/kubernetes-client/generator v0.0.0
6-
k8s.io/apimachinery v0.17.2
6+
k8s.io/apimachinery v0.23.1
77
)
88

9-
replace (
10-
github.com/fabric8io/kubernetes-client/generator v0.0.0 => ./../../../generator
11-
github.com/ugorji/go v1.1.5-pre => github.com/ugorji/go v1.1.7 // indirect https://github.com/swaggo/gin-swagger/issues/128
12-
k8s.io/api => k8s.io/api v0.17.0
13-
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.17.0
14-
k8s.io/apimachinery => k8s.io/apimachinery v0.17.0
15-
k8s.io/apiserver => k8s.io/apiserver v0.17.0
16-
k8s.io/cli-runtime => k8s.io/cli-runtime v0.17.0
17-
k8s.io/client-go => k8s.io/client-go v0.17.0
18-
k8s.io/cloud-provider => k8s.io/cloud-provider v0.17.0
19-
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.17.0
20-
k8s.io/code-generator => k8s.io/code-generator v0.17.0
21-
k8s.io/component-base => k8s.io/component-base v0.17.0
22-
k8s.io/cri-api => k8s.io/cri-api v0.17.0
23-
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.17.0
24-
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.17.0
25-
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.17.0
26-
k8s.io/kube-proxy => k8s.io/kube-proxy v0.17.0
27-
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.17.0
28-
k8s.io/kubectl => k8s.io/kubectl v0.17.0
29-
k8s.io/kubelet => k8s.io/kubelet v0.17.0
30-
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.17.0
31-
k8s.io/metrics => k8s.io/metrics v0.17.0
32-
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.17.0
9+
require (
10+
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect
11+
github.com/beorn7/perks v1.0.1 // indirect
12+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
13+
github.com/davecgh/go-spew v1.1.1 // indirect
14+
github.com/docker/go-units v0.4.0 // indirect
15+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
16+
github.com/fsnotify/fsnotify v1.5.1 // indirect
17+
github.com/go-logr/logr v1.2.0 // indirect
18+
github.com/gogo/protobuf v1.3.2 // indirect
19+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
20+
github.com/golang/protobuf v1.5.2 // indirect
21+
github.com/google/go-cmp v0.5.5 // indirect
22+
github.com/google/gofuzz v1.1.0 // indirect
23+
github.com/google/uuid v1.1.2 // indirect
24+
github.com/googleapis/gnostic v0.5.5 // indirect
25+
github.com/imdario/mergo v0.3.12 // indirect
26+
github.com/json-iterator/go v1.1.12 // indirect
27+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
28+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
29+
github.com/modern-go/reflect2 v1.0.2 // indirect
30+
github.com/pkg/errors v0.9.1 // indirect
31+
github.com/prometheus/client_golang v1.11.0 // indirect
32+
github.com/prometheus/client_model v0.2.0 // indirect
33+
github.com/prometheus/common v0.28.0 // indirect
34+
github.com/prometheus/procfs v0.6.0 // indirect
35+
github.com/robfig/cron/v3 v3.0.1 // indirect
36+
github.com/spf13/pflag v1.0.5 // indirect
37+
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
38+
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
39+
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
40+
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
41+
golang.org/x/text v0.3.7 // indirect
42+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
43+
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
44+
google.golang.org/appengine v1.6.7 // indirect
45+
google.golang.org/protobuf v1.27.1 // indirect
46+
gopkg.in/inf.v0 v0.9.1 // indirect
47+
gopkg.in/yaml.v2 v2.4.0 // indirect
48+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
49+
k8s.io/api v0.23.1 // indirect
50+
k8s.io/apiextensions-apiserver v0.23.0 // indirect
51+
k8s.io/client-go v0.23.1 // indirect
52+
k8s.io/component-base v0.23.0 // indirect
53+
k8s.io/klog/v2 v2.30.0 // indirect
54+
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
55+
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
56+
sigs.k8s.io/controller-runtime v0.11.0 // indirect
57+
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
58+
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
59+
sigs.k8s.io/yaml v1.3.0 // indirect
3360
)
3461

35-
go 1.13
62+
replace github.com/fabric8io/kubernetes-client/generator v0.0.0 => ./../../../generator
63+
64+
go 1.17

0 commit comments

Comments
 (0)