Skip to content

Commit

Permalink
Merge branch 'master' into mike-aws-chaos
Browse files Browse the repository at this point in the history
  • Loading branch information
miketonks-form3 authored Dec 7, 2023
2 parents 8c38ee7 + ee64258 commit 21ae0a0
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 31 deletions.
2 changes: 1 addition & 1 deletion ADOPTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you are an adopter and are willing to share your Chaos Mesh story, feel free
| [DataStax](https://www.datastax.com/)  |DataStax utilized Chaos Mesh to create a tool for running local or large scale remote based distributed correctness, verification and performance tests: [Fallout](https://github.com/datastax/fallout), which they use to test AstraDB, a multi-cloud DBaaS built on Apache Cassandra.  | [Leveraging Chaos Mesh in AstraDB Testing](https://youtu.be/Kw7gMurHJnQ) |
| [DigitalChina](http://www.digitalchina.com/en/)  |To better serve their strategy to transform to cloud infrastructure, DigitalChina uses Chaos Mesh to test the application's ability to maintain business functions and to discover errors and vulnerabilities that may occur under extreme conditions.  |[Develop a Daily Reporting System for Chaos Mesh](https://mp.weixin.qq.com/s/dm6GayOE-4A6Bdz-ucS6Dw) |
| [KingNet](https://www.kingnet.com/)  |KingNet uses Chaos Mesh for testing the availability of multiple data centers and microservice links. Chaos Mesh also helps them with mocking service unavailability or abnormal network conditions.  |To be added. |
| [GreptimeDB](https://www.greptime.com/)  |GreptimeDB uses Chaos Mesh to enhance the correctness and availability of their distributed cluster. Chaos engineering finds lots of corner cases from the database implement to their dependencies. |To be added. |
| [GreptimeDB](https://www.greptime.com/)  |GreptimeDB uses Chaos Mesh to enhance the correctness and availability of their distributed cluster. Chaos engineering finds lots of corner cases from the database implement to their dependencies. | [Chaos Engineering - Who's to Blame for the Bug Mess?](https://greptime.com/blogs/2023-11-06-chaos-engineering) |
| [NetEase Fuxi Lab](https://fuxi.163.com/fuxi-introduction)  |Uses Chaos Mesh to improve the stability of their internal hybrid cloud. In addition, their users with cloud platforms also access Chaos Mesh to test the stability of user services.  |[How a Top Game Company Uses Chaos Engineering to Improve Testing](https://chaos-mesh.org/blog/how-a-top-game-company-uses-chaos-engineering-to-improve-testing) |
| [Percona](https://www.percona.com/)  |Percona uses Chaos Mesh to test their Percona Kubernetes Operators, which is used to deploy their own Database-as-Service.  |[Chaos Mesh to Create Chaos in Kubernetes](https://www.percona.com/blog/2020/11/05/chaosmesh-to-create-chaos-in-kubernetes/) |
| [PingCAP](https://en.pingcap.com/)  |Built [TiPocket](https://github.com/pingcap/tipocket) ontop of Chaos Mesh, an automated testing framework to build a full Chaos Engineering testing loop for TiDB, a distributed database.  |[Building an Automated Testing Framework Based on Chaos Mesh and Argo](https://chaos-mesh.org/blog/building_automated_testing_framework/) |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/
- Support for deploying chaos-dashboard with sidecar containers in helm chart [#4164](https://github.com/chaos-mesh/chaos-mesh/pull/4164)
- Add `values.schema.json` [#4205](https://github.com/chaos-mesh/chaos-mesh/pull/4205)
- Add [`GreptimeDB`](https://greptime.com) to ADOPTERS.md [#4245](https://github.com/chaos-mesh/chaos-mesh/pull/4245)
- Support configurable chaos-dns-server pod affinities[#4260](https://github.com/chaos-mesh/chaos-mesh/pull/4260)

### Changed

Expand Down
26 changes: 15 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif

endif

BASIC_IMAGE_ENV= IMAGE_DEV_ENV_TAG=$(IMAGE_DEV_ENV_TAG) \
BASIC_IMAGE_ENV=IMAGE_DEV_ENV_TAG=$(IMAGE_DEV_ENV_TAG) \
IMAGE_BUILD_ENV_TAG=$(IMAGE_BUILD_ENV_TAG) \
IMAGE_TAG=$(IMAGE_TAG) TARGET_PLATFORM=$(TARGET_PLATFORM) \
GO_BUILD_CACHE=$(GO_BUILD_CACHE)
Expand Down Expand Up @@ -214,12 +214,24 @@ PAUSE_IMAGE ?= gcr.io/google-containers/pause:latest
e2e: e2e-build ## Run e2e tests in current kubernetes cluster
./e2e-test/image/e2e/bin/ginkgo ${GINKGO_FLAGS} ./e2e-test/image/e2e/bin/e2e.test -- --e2e-image ghcr.io/chaos-mesh/e2e-helper:${IMAGE_TAG} --pause-image ${PAUSE_IMAGE}

define failpoint-ctl
find $(ROOT)/* -type d | grep -vE "(\.git|bin|\.cache|ui)" | xargs failpoint-ctl $1
endef

failpoint-enable: SHELL:=$(RUN_IN_DEV_SHELL)
failpoint-enable: images/dev-env/.dockerbuilt ## Enable failpoint stub for testing
$(call failpoint-ctl,enable)

failpoint-disable: SHELL:=$(RUN_IN_DEV_SHELL)
failpoint-disable: images/dev-env/.dockerbuilt ## Disable failpoint stub for testing
$(call failpoint-ctl,disable)

test: SHELL:=$(RUN_IN_DEV_SHELL)
test: generate manifests test-utils images/dev-env/.dockerbuilt ## Run unit tests
make failpoint-enable
$(call failpoint-ctl,enable)
CGO_ENABLED=1 $(GOTEST) -p 1 $$($(PACKAGE_LIST)) -coverprofile cover.out.tmp -covermode=atomic
cat cover.out.tmp | grep -v "_generated.deepcopy.go" > cover.out
make failpoint-disable
$(call failpoint-ctl,disable)

##@ Advanced building targets

Expand Down Expand Up @@ -303,14 +315,6 @@ bin/chaos-builder: SHELL:=$(RUN_IN_DEV_SHELL)
bin/chaos-builder: images/dev-env/.dockerbuilt
$(CGOENV) go build -ldflags '$(LDFLAGS)' -buildvcs=false -o bin/chaos-builder ./cmd/chaos-builder/...

failpoint-enable: SHELL:=$(RUN_IN_DEV_SHELL)
failpoint-enable: images/dev-env/.dockerbuilt ## Enable failpoint stub for testing
find $(ROOT)/* -type d | grep -vE "(\.git|bin|\.cache|ui)" | xargs failpoint-ctl enable

failpoint-disable: SHELL:=$(RUN_IN_DEV_SHELL)
failpoint-disable: images/dev-env/.dockerbuilt ## Disable failpoint stub for testing
find $(ROOT)/* -type d | grep -vE "(\.git|bin|\.cache|ui)" | xargs failpoint-ctl disable

.PHONY: all image clean test manifests manifests/crd.yaml \
boilerplate tidy groupimports fmt vet lint install.sh schedule-migration \
config proto \
Expand Down
8 changes: 4 additions & 4 deletions hack/env-image-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

# This script would report the tag of build-env and dev-env to use based on configuartion file env-images.yaml.
# This script would report the tag of build-env and dev-env to use based on configuration file env-images.yaml.
#
# Usage:
# On master branch:
Expand All @@ -29,9 +29,9 @@ set -euo pipefail
DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
PROJECT_DIR="$(dirname "$DIR")"

if [ "$#" -eq "0" ]; then
echo "Usage: $0 <env-image-name>"
exit 1
if [[ "$#" == "0" ]]; then
echo "Usage: $0 <env-image-name: dev-env|build-env>"
exit 0
fi

if [[ "$1" == "dev-env" || "$1" == "build-env" ]]; then
Expand Down
13 changes: 3 additions & 10 deletions helm/chaos-mesh/templates/dns-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,10 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ .Values.dnsServer.serviceAccount }}
{{- with .Values.dnsServer.affinity }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values: ["chaos-dns"]
topologyKey: kubernetes.io/hostname
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.dnsServer.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
Expand Down
12 changes: 12 additions & 0 deletions helm/chaos-mesh/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,18 @@ dnsServer:
LISTEN_HOST: "0.0.0.0"
# The port of chaos-dns-server listen on
LISTEN_PORT: 53
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/component
operator: In
values:
- chaos-dns-server
topologyKey: kubernetes.io/hostname
weight: 100

prometheus:
# Enable prometheus
Expand Down
11 changes: 6 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1963,14 +1963,15 @@ spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values: ["chaos-dns"]
- key: app.kubernetes.io/component
operator: In
values:
- chaos-dns-server
topologyKey: kubernetes.io/hostname
weight: 100
priorityClassName:
containers:
- name: chaos-dns-server
Expand Down

0 comments on commit 21ae0a0

Please sign in to comment.