Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0c1daa6
feat: migrate filesystem to library model
alexander-ding Oct 7, 2022
ba9a0a8
Merge pull request #231 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 10, 2022
abf4245
feat: migrate disk API group to library model
alexander-ding Oct 10, 2022
6602735
feat: migrate volume API group to library model
alexander-ding Oct 10, 2022
0a24a71
Merge pull request #233 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 11, 2022
1e7bd18
chore: move volumeInit to utils
alexander-ding Oct 12, 2022
1009791
Merge pull request #240 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 12, 2022
158866f
feat: migrate system API group to library model
alexander-ding Oct 12, 2022
90ea3ad
Merge pull request #244 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 13, 2022
53fc811
feat: migrate smb API group to library model
alexander-ding Oct 13, 2022
4f70284
refactor: move SMB specific test utils into smb_test.go
alexander-ding Oct 13, 2022
02cf55d
Merge pull request #245 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 13, 2022
39de50d
feat: migrate iscsi API group to library model
alexander-ding Oct 14, 2022
df276c8
Merge pull request #247 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 14, 2022
f7920f5
test: remove v1 tests
alexander-ding Oct 14, 2022
8aae804
chore: remove bump version code and tests
alexander-ding Oct 14, 2022
2810c45
chore: clean up v1 client and pkg code
alexander-ding Oct 14, 2022
dcbbf77
test: remove v1 binary commands from GitHub actions and Makefile
alexander-ding Oct 14, 2022
a6fc199
Merge pull request #251 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 15, 2022
3db4149
test: comment out test-go and test-vet
alexander-ding Oct 15, 2022
7848dce
Merge pull request #252 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 17, 2022
41ed087
doc: document API group interface methods
alexander-ding Oct 17, 2022
217b17a
refactor: remove compatibility methods for old API versions
alexander-ding Oct 17, 2022
5c1a742
Merge pull request #254 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 17, 2022
d7d054f
refactor: rename Smb to SMB
alexander-ding Oct 17, 2022
219b990
refactor: rename iscsi to iSCSI
alexander-ding Oct 17, 2022
9a01a14
Merge pull request #258 from alexander-ding/enh/rename-api-groups
k8s-ci-robot Oct 18, 2022
6e21a4a
Merge pull request #257 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 19, 2022
3f6d00f
doc: document structs used in API group interfaces
alexander-ding Oct 19, 2022
cf06152
Merge pull request #266 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 19, 2022
3649e19
refactor: rename iqn to IQN
alexander-ding Oct 19, 2022
bc1eb23
Merge pull request #260 from alexander-ding/enh/rename-api-groups
k8s-ci-robot Oct 19, 2022
a2485c0
Merge pull request #269 from alexander-ding/enh/rename-api-groups
k8s-ci-robot Oct 20, 2022
0d6ebaf
fix: remove duplicate makefile checks (already run in Prow)
alexander-ding Oct 19, 2022
0a2b8ff
refactor: rename API to HostAPI
alexander-ding Oct 19, 2022
aff0587
refactor: rename Id to ID
alexander-ding Oct 19, 2022
a089fe0
Merge pull request #270 from alexander-ding/enh/rename-api-groups
k8s-ci-robot Oct 21, 2022
b36b549
Merge pull request #262 from alexander-ding/fix/gh-actions
k8s-ci-robot Oct 21, 2022
5da96a3
Merge pull request #268 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 21, 2022
cf83608
fix: rename typo in file name
alexander-ding Oct 24, 2022
cac8299
Merge pull request #273 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 24, 2022
c112ff0
test: migrate tests to HostProcess pods
alexander-ding Oct 24, 2022
7f83b4f
chore: bump version to v2
alexander-ding Oct 25, 2022
4c73b12
Merge pull request #274 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 25, 2022
312980b
Merge pull request #275 from alexander-ding/enh/migrate-v2
k8s-ci-robot Oct 25, 2022
37ce886
chore: make build compiles integration test
alexander-ding Oct 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 0 additions & 45 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,8 @@ jobs:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
go build -v -a -o ./bin/csi-proxy.exe ./cmd/csi-proxy
go build -v -a -o ./bin/csi-proxy-api-gen.exe ./cmd/csi-proxy-api-gen
- name: Run Windows Integration Tests
run: |
# start the CSI Proxy before running tests on windows
Start-Job -Name CSIProxy -ScriptBlock {
.\bin\csi-proxy.exe
};
Start-Sleep -Seconds 30;
Write-Output "getting named pipes"
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
$env:CSI_PROXY_GH_ACTIONS="TRUE"
go test -v -race ./integrationtests/...
unit_tests:
Expand All @@ -44,38 +33,4 @@ jobs:
uses: actions/checkout@v2
- name: Run Windows Unit Tests
run: |
make all
go test -v -race ./pkg/...

bump_version_test:
strategy:
matrix:
go: ['1.16']
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Install Tools
run: |
echo "${HOME}/.local/bin" >> $GITHUB_PATH
echo "/home/runner/work/csi-proxy/csi-proxy/go/bin" >> $GITHUB_PATH
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/.local
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 1
path: go/src/github.com/kubernetes-csi/csi-proxy
- name: Run bump version script
env:
GOPATH: /home/runner/work/csi-proxy/csi-proxy/go
GOBIN: /home/runner/work/csi-proxy/csi-proxy/go/bin
run: |
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
protoc --version
cd /home/runner/work/csi-proxy/csi-proxy/go/src/github.com/kubernetes-csi/csi-proxy
API_GROUP=filesystem OLD_API_VERSION=v1beta2 NEW_API_VERSION=v99 scripts/bump-version.sh
52 changes: 8 additions & 44 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CMDS=csi-proxy
all: build test

# include release tools for building binary and testing targets
Expand All @@ -9,43 +8,7 @@ GOPATH ?= $(shell go env GOPATH)
REPO_ROOT = $(CURDIR)
BUILD_DIR = bin
BUILD_TOOLS_DIR = $(BUILD_DIR)/tools
GO_ENV_VARS = GO111MODULE=on GOOS=windows
CSI_PROXY_API_GEN = $(BUILD_DIR)/csi-proxy-api-gen

.PHONY: compile-csi-proxy-api-gen
compile-csi-proxy-api-gen:
GO111MODULE=on go build -o $(CSI_PROXY_API_GEN) ./cmd/csi-proxy-api-gen

.PHONY: generate
generate: generate-protobuf generate-csi-proxy-api-gen

# using xargs instead of -exec since the latter doesn't propagate exit statuses
.PHONY: generate-protobuf
generate-protobuf:
@ if ! which protoc > /dev/null 2>&1; then echo 'Unable to find protoc binary' ; exit 1; fi
@ generate_protobuf_for() { \
local FILE="$$1"; \
local FILE_DIR="$$(dirname "$(GOPATH)/$$FILE")"; \
echo "Generating protobuf file from $$FILE in $$FILE_DIR"; \
protoc -I "$(GOPATH)/src/" -I '$(REPO_ROOT)/client/api' "$$FILE" --go_out=plugins="grpc:$(GOPATH)/src"; \
} ; \
export -f generate_protobuf_for; \
find '$(REPO_ROOT)' -not -path './vendor/*' -name '*.proto' | sed -e "s|$(GOPATH)/src/||g" | xargs -n1 '$(SHELL)' -c 'generate_protobuf_for "$$0"'

.PHONY: generate-csi-proxy-api-gen
generate-csi-proxy-api-gen: compile-csi-proxy-api-gen
$(CSI_PROXY_API_GEN) -i github.com/kubernetes-csi/csi-proxy/client/api,github.com/kubernetes-csi/csi-proxy/integrationtests/apigroups/api/dummy --v=8

.PHONY: clean
clean: clean-protobuf clean-generated

.PHONY: clean-protobuf
clean-protobuf:
find '$(REPO_ROOT)' -name '*.proto' -exec '$(SHELL)' -c 'rm -vf "$$(dirname {})/$$(basename {} .proto).pb.go"' \;

.PHONY: clean-generated
clean-generated:
find '$(REPO_ROOT)' -name '*_generated.go' -exec '$(SHELL)' -c '[[ "$$(head -n 1 "{}")" == "// Code generated by csi-proxy-api-gen"* ]] && rm -v {}' \;
GO_ENV_VARS = GO111MODULE=on GOOS=windows GOARCH=amd64

# see https://github.com/golangci/golangci-lint/releases
GOLANGCI_LINT_VERSION = v1.21.0
Expand All @@ -56,21 +19,22 @@ lint: $(GOLANGCI_LINT)
$(GO_ENV_VARS) $(GOLANGCI_LINT) run
git --no-pager diff --exit-code

.PHONY: build
build:
${GO_ENV_VARS} go test -c ./integrationtests -o ./bin/integrationtests.test.exe

.PHONY: test-go
test: test-go
test-go:
@ echo; echo "### $@:"
# TODO: After issue https://github.com/microsoft/go-winio/pull/169 is resolved, remove the filter on the test path.
GO111MODULE=on go test `find ./internal/server/ -type d -not -name server`;\
cd client && GO111MODULE=on go test `go list ./... | grep -v group` && cd ../
@ echo "No need to run test. Testing is done in GitHub Actions and custom Prow job."

.PHONY: test-vet
test: test-vet
test-vet:
@ echo; echo "### $@:"
# TODO: After issue https://github.com/microsoft/go-winio/pull/169 is resolved, remove the filter on the test path.
# GO111MODULE=on go vet `find ./internal/server/ -type d -not -name server`;\
cd client && GO111MODULE=on go vet `go list ./... | grep -v group` && cd ../
@ echo "No need to run vet. Testing is done in GitHub Actions and custom Prow job."

# see https://github.com/golangci/golangci-lint#binary-release
$(GOLANGCI_LINT):
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$$(dirname '$(GOLANGCI_LINT)')" '$(GOLANGCI_LINT_VERSION)'
202 changes: 0 additions & 202 deletions client/LICENSE

This file was deleted.

5 changes: 0 additions & 5 deletions client/README.md

This file was deleted.

Loading