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

Remove crd v1beta1 Support #3630

Merged
merged 19 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
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
14 changes: 4 additions & 10 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ jobs:
fail-fast: false
matrix:
kubernetes-version:
- v1.15.12
- v1.20.15
- v1.23.4
- v1.25.1
focus:
- '[Graceful-Shutdown] [IOChaos]'
- '[Graceful-Shutdown] [HTTPChaos]'
Expand Down Expand Up @@ -143,9 +143,9 @@ jobs:
uses: manusa/actions-setup-minikube@v2.4.3
with:
driver: docker
minikube version: v1.24.0
minikube version: v1.27.0
kubernetes version: ${{ matrix.kubernetes-version }}
start args: --cni flannel
start args: --cni calico
github token: ${{ secrets.GITHUB_TOKEN }}

- name: load image into minikube
Expand All @@ -160,13 +160,7 @@ jobs:

- name: Install Chaos Mesh
run: |
# if kubernetes does not support apiextensions.k8s.io/v1, fallback to apiextensions.k8s.io/v1beta1
if kubectl api-resources | grep -w apiextensions.k8s.io/v1; then
helm install --wait --create-namespace chaos-mesh helm/chaos-mesh --namespace=chaos-mesh --set dnsServer.create=true --set dashboard.create=true --set images.tag=latest
else
kubectl create --validate=false -f ./manifests/crd-v1beta1.yaml && \
helm install --skip-crds --wait --create-namespace chaos-mesh helm/chaos-mesh --namespace=chaos-mesh --set dnsServer.create=true --set dashboard.create=true --set images.tag=latest
fi
helm install --wait --create-namespace chaos-mesh helm/chaos-mesh --namespace=chaos-mesh --set dnsServer.create=true --set dashboard.create=true --set images.tag=latest
- name: e2e tests
env:
FOCUS: ${{ matrix.focus }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/upload_latest_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
paths:
- install.sh
- manifests/crd.yaml
- manifests/crd-v1beta1.yaml
- examples/web-show/deploy.sh
- pkg/chaosctl/**
- cmd/chaosctl/**
Expand Down Expand Up @@ -44,7 +43,6 @@
fi
aws s3 cp install.sh ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/install.sh
aws s3 cp manifests/crd.yaml ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/crd.yaml
aws s3 cp manifests/crd-v1beta1.yaml ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/crd-v1beta1.yaml
aws s3 cp examples/web-show/deploy.sh ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/web-show/deploy.sh
aws s3 cp bin/chaosctl ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/chaosctl
aws s3 cp bin/schedule-migration ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/schedule-migration
1 change: 0 additions & 1 deletion .github/workflows/upload_release_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
GIT_TAG=${GITHUB_REF##*/}
aws s3 cp install.sh ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/install.sh
aws s3 cp manifests/crd.yaml ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/crd.yaml
aws s3 cp manifests/crd-v1beta1.yaml ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/crd-v1beta1.yaml
aws s3 cp examples/web-show/deploy.sh ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/web-show/deploy.sh
aws s3 cp bin/chaosctl ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/chaosctl
aws s3 cp schedule-migration.tar.gz ${{ secrets.AWS_BUCKET_NAME }}/${GIT_TAG}/schedule-migration.tar.gz
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/
- Dashboard: Fix rbac.yaml for token generation verbs/resources [#3370](https://github.com/chaos-mesh/chaos-mesh/pull/3370)
- Refine logging, remove the usage of klog in event recorder [#3629](https://github.com/chaos-mesh/chaos-mesh/pull/3629)
- Use int64 to restore latency for BlockChaos [#3638](https://github.com/chaos-mesh/chaos-mesh/pull/3638)
- Remove CRD v1beta1 support [#3630](https://github.com/chaos-mesh/chaos-mesh/pull/3630)

### Deprecated

Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,7 @@ manifests/crd.yaml: SHELL:=$(RUN_IN_DEV_SHELL)
manifests/crd.yaml: config images/dev-env/.dockerbuilt
kustomize build config/default > manifests/crd.yaml

manifests/crd-v1beta1.yaml: SHELL:=$(RUN_IN_DEV_SHELL)
manifests/crd-v1beta1.yaml: config images/dev-env/.dockerbuilt
mkdir -p ./output
cp -Tr ./config ./output/config-v1beta1
cd ./api ;\
controller-gen "crd:trivialVersions=true,preserveUnknownFields=false,crdVersions=v1beta1" rbac:roleName=manager-role paths="./..." output:crd:artifacts:config=../output/config-v1beta1/crd/bases ;
kustomize build output/config-v1beta1/default > manifests/crd-v1beta1.yaml

yaml: manifests/crd.yaml manifests/crd-v1beta1.yaml
yaml: manifests/crd.yaml

config: SHELL:=$(RUN_IN_DEV_SHELL)
config: images/dev-env/.dockerbuilt
Expand Down
37 changes: 23 additions & 14 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,40 @@ require (
github.com/onsi/gomega v1.17.0
github.com/pkg/errors v0.9.1
github.com/robfig/cron/v3 v3.0.1
k8s.io/api v0.23.1
k8s.io/apimachinery v0.23.1
k8s.io/client-go v0.23.1
k8s.io/api v0.24.5
k8s.io/apimachinery v0.24.5
k8s.io/client-go v0.24.5
sigs.k8s.io/controller-runtime v0.11.0
)

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-logr/zapr v1.2.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
Expand All @@ -45,12 +54,12 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
Expand All @@ -60,10 +69,10 @@ require (
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/apiextensions-apiserver v0.23.0 // indirect
k8s.io/component-base v0.23.0 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading