Skip to content

Commit 4c15562

Browse files
Merge branch 'master' into feature-auth-extras-support-upstream
2 parents 515bb10 + 4423797 commit 4c15562

26 files changed

+403
-205
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- verify
5555
- build
5656
- test
57-
runs-on: ${{ fromJson('{"amd64":"ubuntu-20.04", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
57+
runs-on: ${{ fromJson('{"amd64":"ubuntu-20.04", "arm64":"github-arm64-2c-8gb"}')[matrix.arch] }}
5858
steps:
5959
- uses: actions/checkout@v4
6060

.github/workflows/integration_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
arch: [amd64, arm64]
39-
runs-on: ${{ fromJson('{"amd64":"ubuntu-20.04", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
39+
runs-on: ${{ fromJson('{"amd64":"ubuntu-20.04", "arm64":"github-arm64-2c-8gb"}')[matrix.arch] }}
4040
steps:
4141
- uses: actions/checkout@v4
4242
with:

.github/workflows/upload_image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
[chaos-daemon, chaos-mesh, chaos-dashboard, chaos-kernel, chaos-dlv]
2323
outputs:
2424
image_tag: ${{ steps.image_tag.outputs.image_tag }}
25-
runs-on: ${{ fromJson('{"amd64":"ubuntu-20.04", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }}
25+
runs-on: ${{ fromJson('{"amd64":"ubuntu-20.04", "arm64":"github-arm64-2c-8gb"}')[matrix.arch] }}
2626
steps:
2727
- uses: actions/checkout@v4
2828
with:

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/
1515
### Changed
1616

1717
- Upgrade pnpm lockfile version to 9.0 [#4522](https://github.com/chaos-mesh/chaos-mesh/pull/4522)
18+
- Use gauge subsystem in controller/daemon metrics [#4554](https://github.com/chaos-mesh/chaos-mesh/pull/4554)
19+
- Bump kubernetes dependencies to 1.28.12 [#4565](https://github.com/chaos-mesh/chaos-mesh/pull/4565)
1820
- Support for userInfo.Extra in validating webhook [#4559](https://github.com/chaos-mesh/chaos-mesh/pull/4559)
1921

2022
### Deprecated
@@ -29,6 +31,8 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/
2931

3032
- Issue with getting a single archive in the Dashboard UI [#4521](https://github.com/chaos-mesh/chaos-mesh/pull/4521)
3133
- Wrong references of helm values in the prometheus template [#4543](https://github.com/chaos-mesh/chaos-mesh/pull/4543)
34+
- Return 404 when the archive schedule was not found [#4553](https://github.com/chaos-mesh/chaos-mesh/pull/4553)
35+
- Changed JVMParameter.ReturnValue json tag field name to `returnValue` [#4525](https://github.com/chaos-mesh/chaos-mesh/pull/4525)
3236

3337
### Security
3438

@@ -74,7 +78,6 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/
7478
- Upgrade byteman-helper to v4.0.22 [#4299](https://github.com/chaos-mesh/chaos-mesh/pull/4299)
7579
- GCP auth is changed to object with additional key `existingSecret` in helm chart values [#4303](https://github.com/chaos-mesh/chaos-mesh/pull/4303)
7680
- Add context to the http request to download the chart [#4304](https://github.com/chaos-mesh/chaos-mesh/pull/4304)
77-
- dashboard: return 404 when the archive schedule was not found [#4553](https://github.com/chaos-mesh/chaos-mesh/pull/4553)
7881

7982
### Deprecated
8083

api/v1alpha1/jvmchaos_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ type JVMParameter struct {
8484

8585
// +optional
8686
// the return value for action 'return'
87-
ReturnValue string `json:"value"`
87+
ReturnValue string `json:"returnValue"`
8888

8989
// +optional
9090
// the exception which needs to throw for action `exception`

api/v1alpha1/jvmchaos_types_test.go

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package v1alpha1
1717

1818
import (
1919
"context"
20+
"encoding/json"
2021

2122
. "github.com/onsi/ginkgo/v2"
2223
. "github.com/onsi/gomega"
@@ -82,4 +83,72 @@ var _ = Describe("JVMChaos", func() {
8283
Expect(k8sClient.Get(context.TODO(), key, created)).ToNot(Succeed())
8384
})
8485
})
86+
87+
Describe("JSON Marshal and Unmarshal", func() {
88+
object := &JVMChaos{
89+
ObjectMeta: metav1.ObjectMeta{
90+
Name: "foo",
91+
Namespace: "default",
92+
},
93+
Spec: JVMChaosSpec{
94+
ContainerSelector: ContainerSelector{
95+
PodSelector: PodSelector{
96+
Mode: FixedMode,
97+
Value: "1337",
98+
},
99+
},
100+
JVMParameter: JVMParameter{
101+
Name: "param-name",
102+
ReturnValue: "param-return-value",
103+
},
104+
},
105+
}
106+
It("should marshal an object successfully", func() {
107+
By("marshalling the object")
108+
data, _ := json.MarshalIndent(object, "", " ")
109+
Expect(data).To(MatchJSON(`{
110+
"metadata": {
111+
"name": "foo",
112+
"namespace": "default",
113+
"creationTimestamp": null
114+
},
115+
"spec": {
116+
"selector": {},
117+
"mode": "fixed",
118+
"value": "1337",
119+
"action": "",
120+
"name": "param-name",
121+
"returnValue": "param-return-value",
122+
"exception": "",
123+
"latency": 0,
124+
"ruleData": ""
125+
},
126+
"status": {
127+
"experiment": {}
128+
}
129+
}`))
130+
})
131+
It("should unmarshal the object successfully", func() {
132+
marshalledJson := []byte(`{
133+
"metadata": {
134+
"name": "foo",
135+
"namespace": "default"
136+
},
137+
"spec": {
138+
"name": "param-name",
139+
"returnValue": "param-return-value",
140+
"mode": "fixed",
141+
"value": "1337"
142+
}
143+
}`)
144+
By("unmarshalling the object")
145+
var unmarshalledJVMChaos JVMChaos
146+
Expect(json.Unmarshal(marshalledJson, &unmarshalledJVMChaos)).To(Succeed())
147+
Expect(&unmarshalledJVMChaos).To(HaveField("ObjectMeta.Name", "foo"))
148+
Expect(&unmarshalledJVMChaos).To(HaveField("Spec.ContainerSelector.PodSelector.Mode", FixedMode))
149+
Expect(&unmarshalledJVMChaos).To(HaveField("Spec.ContainerSelector.PodSelector.Value", "1337"))
150+
Expect(&unmarshalledJVMChaos).To(HaveField("Spec.JVMParameter.Name", "param-name"))
151+
Expect(&unmarshalledJVMChaos).To(HaveField("Spec.JVMParameter.ReturnValue", "param-return-value"))
152+
})
153+
})
85154
})

config/crd/bases/chaos-mesh.org_jvmchaos.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ spec:
117117
description: RemoteCluster represents the remote cluster where the
118118
chaos will be deployed
119119
type: string
120+
returnValue:
121+
description: the return value for action 'return'
122+
type: string
120123
ruleData:
121124
description: the byteman rule's data for action 'ruleData'
122125
type: string

config/crd/bases/chaos-mesh.org_schedules.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,9 @@ spec:
10941094
description: RemoteCluster represents the remote cluster where
10951095
the chaos will be deployed
10961096
type: string
1097+
returnValue:
1098+
description: the return value for action 'return'
1099+
type: string
10971100
ruleData:
10981101
description: the byteman rule's data for action 'ruleData'
10991102
type: string
@@ -4435,6 +4438,9 @@ spec:
44354438
description: RemoteCluster represents the remote cluster
44364439
where the chaos will be deployed
44374440
type: string
4441+
returnValue:
4442+
description: the return value for action 'return'
4443+
type: string
44384444
ruleData:
44394445
description: the byteman rule's data for action 'ruleData'
44404446
type: string
@@ -7544,6 +7550,9 @@ spec:
75447550
description: RemoteCluster represents the remote
75457551
cluster where the chaos will be deployed
75467552
type: string
7553+
returnValue:
7554+
description: the return value for action 'return'
7555+
type: string
75477556
ruleData:
75487557
description: the byteman rule's data for action
75497558
'ruleData'

config/crd/bases/chaos-mesh.org_workflownodes.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,9 @@ spec:
11151115
description: RemoteCluster represents the remote cluster where
11161116
the chaos will be deployed
11171117
type: string
1118+
returnValue:
1119+
description: the return value for action 'return'
1120+
type: string
11181121
ruleData:
11191122
description: the byteman rule's data for action 'ruleData'
11201123
type: string
@@ -4031,6 +4034,9 @@ spec:
40314034
description: RemoteCluster represents the remote cluster where
40324035
the chaos will be deployed
40334036
type: string
4037+
returnValue:
4038+
description: the return value for action 'return'
4039+
type: string
40344040
ruleData:
40354041
description: the byteman rule's data for action 'ruleData'
40364042
type: string
@@ -7441,6 +7447,9 @@ spec:
74417447
description: RemoteCluster represents the remote
74427448
cluster where the chaos will be deployed
74437449
type: string
7450+
returnValue:
7451+
description: the return value for action 'return'
7452+
type: string
74447453
ruleData:
74457454
description: the byteman rule's data for action
74467455
'ruleData'
@@ -10653,6 +10662,9 @@ spec:
1065310662
description: RemoteCluster represents the remote
1065410663
cluster where the chaos will be deployed
1065510664
type: string
10665+
returnValue:
10666+
description: the return value for action 'return'
10667+
type: string
1065610668
ruleData:
1065710669
description: the byteman rule's data for action
1065810670
'ruleData'

config/crd/bases/chaos-mesh.org_workflows.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,9 @@ spec:
11601160
description: RemoteCluster represents the remote cluster
11611161
where the chaos will be deployed
11621162
type: string
1163+
returnValue:
1164+
description: the return value for action 'return'
1165+
type: string
11631166
ruleData:
11641167
description: the byteman rule's data for action 'ruleData'
11651168
type: string
@@ -4189,6 +4192,9 @@ spec:
41894192
description: RemoteCluster represents the remote cluster
41904193
where the chaos will be deployed
41914194
type: string
4195+
returnValue:
4196+
description: the return value for action 'return'
4197+
type: string
41924198
ruleData:
41934199
description: the byteman rule's data for action 'ruleData'
41944200
type: string

e2e-test/go.mod

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ require (
88
github.com/onsi/ginkgo/v2 v2.12.0
99
github.com/onsi/gomega v1.27.10
1010
github.com/pkg/errors v0.9.1
11-
k8s.io/api v0.28.4
12-
k8s.io/apiextensions-apiserver v0.28.4
13-
k8s.io/apimachinery v0.28.4
14-
k8s.io/cli-runtime v0.28.4
15-
k8s.io/client-go v0.28.4
16-
k8s.io/component-base v0.28.4
11+
k8s.io/api v0.28.12
12+
k8s.io/apiextensions-apiserver v0.28.12
13+
k8s.io/apimachinery v0.28.12
14+
k8s.io/cli-runtime v0.28.12
15+
k8s.io/client-go v0.28.12
16+
k8s.io/component-base v0.28.12
1717
k8s.io/klog/v2 v2.100.1
18-
k8s.io/kube-aggregator v0.28.1
19-
k8s.io/kubelet v0.28.1
20-
k8s.io/kubernetes v1.28.2
21-
k8s.io/pod-security-admission v0.28.1
18+
k8s.io/kube-aggregator v0.28.12
19+
k8s.io/kubelet v0.28.12
20+
k8s.io/kubernetes v1.28.12
21+
k8s.io/pod-security-admission v0.28.12
2222
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
2323
sigs.k8s.io/controller-runtime v0.16.2
2424
)
@@ -57,7 +57,7 @@ require (
5757
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
5858
github.com/gogo/protobuf v1.3.2 // indirect
5959
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
60-
github.com/golang/protobuf v1.5.3 // indirect
60+
github.com/golang/protobuf v1.5.4 // indirect
6161
github.com/google/btree v1.0.1 // indirect
6262
github.com/google/cel-go v0.16.1 // indirect
6363
github.com/google/gnostic-models v0.6.8 // indirect
@@ -114,28 +114,28 @@ require (
114114
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
115115
golang.org/x/net v0.23.0 // indirect
116116
golang.org/x/oauth2 v0.10.0 // indirect
117-
golang.org/x/sync v0.3.0 // indirect
117+
golang.org/x/sync v0.5.0 // indirect
118118
golang.org/x/sys v0.18.0 // indirect
119119
golang.org/x/term v0.18.0 // indirect
120120
golang.org/x/text v0.14.0 // indirect
121121
golang.org/x/time v0.3.0 // indirect
122-
golang.org/x/tools v0.12.0 // indirect
122+
golang.org/x/tools v0.16.1 // indirect
123123
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
124124
google.golang.org/appengine v1.6.7 // indirect
125125
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect
126126
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
127127
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
128128
google.golang.org/grpc v1.58.3 // indirect
129-
google.golang.org/protobuf v1.31.0 // indirect
129+
google.golang.org/protobuf v1.33.0 // indirect
130130
gopkg.in/inf.v0 v0.9.1 // indirect
131131
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
132132
gopkg.in/yaml.v2 v2.4.0 // indirect
133133
gopkg.in/yaml.v3 v3.0.1 // indirect
134-
k8s.io/apiserver v0.28.4 // indirect
134+
k8s.io/apiserver v0.28.12 // indirect
135135
k8s.io/cloud-provider v0.0.0 // indirect
136-
k8s.io/component-helpers v0.28.2 // indirect
137-
k8s.io/controller-manager v0.28.2 // indirect
138-
k8s.io/kms v0.28.2 // indirect
136+
k8s.io/component-helpers v0.28.12 // indirect
137+
k8s.io/controller-manager v0.28.12 // indirect
138+
k8s.io/kms v0.28.12 // indirect
139139
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
140140
k8s.io/kubectl v0.28.4 // indirect
141141
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect
@@ -149,34 +149,34 @@ require (
149149
replace (
150150
github.com/chaos-mesh/chaos-mesh => ../
151151
github.com/chaos-mesh/chaos-mesh/api => ../api
152-
k8s.io/api => k8s.io/api v0.28.2
153-
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.2
154-
k8s.io/apimachinery => k8s.io/apimachinery v0.28.2
155-
k8s.io/apiserver => k8s.io/apiserver v0.28.2
156-
k8s.io/cli-runtime => k8s.io/cli-runtime v0.28.2
157-
k8s.io/client-go => k8s.io/client-go v0.28.2
158-
k8s.io/cloud-provider => k8s.io/cloud-provider v0.28.2
159-
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.28.2
160-
k8s.io/code-generator => k8s.io/code-generator v0.28.2
161-
k8s.io/component-base => k8s.io/component-base v0.28.2
162-
k8s.io/component-helpers => k8s.io/component-helpers v0.28.2
163-
k8s.io/controller-manager => k8s.io/controller-manager v0.28.2
164-
k8s.io/cri-api => k8s.io/cri-api v0.28.2
165-
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.2
166-
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.2
167-
k8s.io/endpointslice => k8s.io/endpointslice v0.28.2
168-
k8s.io/kms => k8s.io/kms v0.28.2
169-
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.28.2
170-
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.28.2
171-
k8s.io/kube-proxy => k8s.io/kube-proxy v0.28.2
172-
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.2
173-
k8s.io/kubectl => k8s.io/kubectl v0.28.2
174-
k8s.io/kubelet => k8s.io/kubelet v0.28.2
175-
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.2
176-
k8s.io/metrics => k8s.io/metrics v0.28.2
177-
k8s.io/mount-utils => k8s.io/mount-utils v0.28.2
178-
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.28.2
179-
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.28.2
180-
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.28.2
181-
k8s.io/sample-controller => k8s.io/sample-controller v0.28.2
152+
k8s.io/api => k8s.io/api v0.28.12
153+
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.12
154+
k8s.io/apimachinery => k8s.io/apimachinery v0.28.12
155+
k8s.io/apiserver => k8s.io/apiserver v0.28.12
156+
k8s.io/cli-runtime => k8s.io/cli-runtime v0.28.12
157+
k8s.io/client-go => k8s.io/client-go v0.28.12
158+
k8s.io/cloud-provider => k8s.io/cloud-provider v0.28.12
159+
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.28.12
160+
k8s.io/code-generator => k8s.io/code-generator v0.28.12
161+
k8s.io/component-base => k8s.io/component-base v0.28.12
162+
k8s.io/component-helpers => k8s.io/component-helpers v0.28.12
163+
k8s.io/controller-manager => k8s.io/controller-manager v0.28.12
164+
k8s.io/cri-api => k8s.io/cri-api v0.28.12
165+
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.12
166+
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.12
167+
k8s.io/endpointslice => k8s.io/endpointslice v0.28.12
168+
k8s.io/kms => k8s.io/kms v0.28.12
169+
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.28.12
170+
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.28.12
171+
k8s.io/kube-proxy => k8s.io/kube-proxy v0.28.12
172+
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.12
173+
k8s.io/kubectl => k8s.io/kubectl v0.28.12
174+
k8s.io/kubelet => k8s.io/kubelet v0.28.12
175+
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.12
176+
k8s.io/metrics => k8s.io/metrics v0.28.12
177+
k8s.io/mount-utils => k8s.io/mount-utils v0.28.12
178+
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.28.12
179+
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.28.12
180+
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.28.12
181+
k8s.io/sample-controller => k8s.io/sample-controller v0.28.12
182182
)

0 commit comments

Comments
 (0)