Skip to content

Commit

Permalink
some optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Aug 13, 2021
1 parent b78d3a0 commit 3ba5168
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
- 'docs/**'
- '**.md'

env:
KIND_VERSION: v0.11.1

jobs:
build:
name: Build x86
Expand Down Expand Up @@ -77,8 +80,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -124,8 +125,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -171,8 +170,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -218,8 +215,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -265,8 +260,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -298,8 +291,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -335,8 +326,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -386,8 +375,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -435,8 +422,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down Expand Up @@ -484,8 +469,6 @@ jobs:
uses: actions/checkout@v2

- name: Install Kind
env:
KIND_VERSION: v0.11.1
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea/*
.vscode/*
.DS_Store
vagrant/.vagrant/*
vagrant/kubernetes-setup/*.retry
Expand All @@ -12,7 +13,12 @@ dist/images/kube-ovn-pinger
dist/images/kube-ovn-speaker
dist/images/kube-ovn-monitor
dist/images/kube-ovn-cmd
test/e2e/ovnnb_db.*
test/e2e/ovnsb_db.*
kube-ovn.yaml
kube-ovn-crd.yaml
ovn.yaml
kind.yaml
image.tar
image-amd64.tar
image-arm64.tar
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ push-release: release

.PHONY: tar
tar:
docker save $(REGISTRY)/kube-ovn:$(RELEASE_TAG) > image.tar
docker save $(REGISTRY)/kube-ovn:$(RELEASE_TAG) -o image.tar

.PHONY: base-tar-amd64
base-tar-amd64:
docker save $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-amd64 > image-amd64.tar
docker save $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-amd64 -o image-amd64.tar

.PHONY: base-tar-arm64
base-tar-arm64:
docker save $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-arm64 > image-arm64.tar
docker save $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-arm64 -o image-arm64.tar

.PHONY: kind-init
kind-init:
Expand Down Expand Up @@ -220,7 +220,7 @@ e2e:

printf "package e2e\n\nvar nodeNetworks = map[string]string{\n" > test/e2e/network.go
kind get nodes --name kube-ovn | while read node; do \
printf " \`$$node\`: \`" >> test/e2e/network.go; \
printf "\t\`$$node\`: \`" >> test/e2e/network.go; \
docker inspect -f '{{json .NetworkSettings.Networks.bridge}}' $$node >> test/e2e/network.go; \
printf "\`,\n" >> test/e2e/network.go; \
done
Expand All @@ -236,3 +236,11 @@ e2e-vlan-single-nic:
docker inspect -f '{{json .NetworkSettings.Networks.kind}}' kube-ovn-control-plane >> test/e2e-vlan-single-nic/node/network.go
echo "\`)" >> test/e2e-vlan-single-nic/node/network.go
ginkgo -mod=mod -progress -reportPassed --slowSpecThreshold=60 test/e2e-vlan-single-nic

.PHONY: clean
clean:
$(RM) yamls/kind.yaml
$(RM) ovn.yaml kube-ovn.yaml kube-ovn-crd.yaml
$(RM) image.tar image-amd64.tar image-arm64.tar
$(RM) -r test/e2e/ovnnb_db.*
$(RM) -r test/e2e/ovnsb_db.*

0 comments on commit 3ba5168

Please sign in to comment.