spacewander commented on a change in pull request #3404: URL: https://github.com/apache/apisix/pull/3404#discussion_r563414156
########## File path: .github/workflows/chaos.yml ########## @@ -0,0 +1,61 @@ +name: Chaos Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: setup go + uses: actions/setup-go@v2.1.3 + with: + go-version: '1.13' Review comment: The go mod says the version of Go is `1.14`... ########## File path: kubernetes/service.yaml ########## @@ -36,8 +36,10 @@ spec: # port: 9180 # protocol: TCP # targetPort: 9180 - selector: - app: apisix-gw - type: NodePort - externalTrafficPolicy: Local - # sessionAffinity: None + selector: + app: apisix-gw + type: NodePort + externalTrafficPolicy: Local + # sessionAffinity: None + externalIPs: + - 10.253.0.11 Review comment: Why chose this IP? ########## File path: t/chaos-test/go.mod ########## @@ -0,0 +1,5 @@ +module chaos Review comment: Better to use a uri contains apisix, like github.com/apache/apisix/t/chaos. And `t/chaos/` might be a better name, as all files under `t` are tests. ########## File path: t/chaos-test/kill-etcd_test.go ########## @@ -0,0 +1,115 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package chaos + +import ( + "net/http" + "os/exec" + "testing" + + "github.com/gavv/httpexpect/v2" +) + +var ( + token = "edd1c9f034335f136f87ad84b625c8f1" + host = "http://10.253.0.11:9080" Review comment: Need a comment to explain why this IP is chosen. ########## File path: .github/workflows/chaos.yml ########## @@ -0,0 +1,61 @@ +name: Chaos Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: setup go + uses: actions/setup-go@v2.1.3 + with: + go-version: '1.13' + + - name: Creating kind cluster + uses: helm/kind-action@v1.0.0-rc.1 + + - name: Print cluster information + run: | + kubectl config view + kubectl cluster-info + kubectl get nodes + kubectl get pods -n kube-system + helm version + kubectl version + - uses: actions/checkout@v2 + + # TODO: should not use personal repo, while it's hard to modify a lot in an archived repo. Could we use api7's repo? + - name: Deploy Etcd Operator + run: | + git clone https://github.com/yiyiyimu/etcd-operator.git --depth 1 + cd etcd-operator + example/rbac/create_role.sh + kubectl create -f example/deployment.yaml + while [[ $(kubectl get pods -l app=etcd-operator -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "Waiting for pod running" && sleep 10; done + kubectl create -f example/example-etcd-cluster.yaml + while [[ $(kubectl get pods -l app=etcd -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True True True" ]]; do echo "Waiting for pod running" && sleep 10; done + + - name: Deploy APISIX + run: | + echo ' + dns_resolver: + - 10.96.0.10 Review comment: Why chose this IP? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org