-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
776 changed files
with
95,857 additions
and
37,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ HELM_TEMPLATES=$(HELM_HOME)/templates | |
KUSTOMIZE_HOME=resources | ||
KUSTOMIZE_CRDS=$(KUSTOMIZE_HOME)/base/crds/ | ||
|
||
PLUGIN_HOME=kubectl-minio | ||
|
||
all: build | ||
|
||
|
@@ -28,19 +27,21 @@ getdeps: | |
@echo "Installing golangci-lint" && \ | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] && \ | ||
echo "Installing govulncheck" && \ | ||
go install golang.org/x/vuln/cmd/govulncheck@latest | ||
go install golang.org/x/vuln/cmd/govulncheck@latest &&\ | ||
echo "installng gopls" && \ | ||
go install golang.org/x/tools/gopls@latest | ||
|
||
verify: getdeps govet lint | ||
|
||
binary: | ||
@CGO_ENABLED=0 GOOS=linux go build -trimpath --ldflags $(LDFLAGS) -o minio-operator ./cmd/operator | ||
|
||
operator: assets binary | ||
operator: binary | ||
|
||
docker: operator | ||
@docker build --no-cache -t $(TAG) . | ||
@docker buildx build --no-cache --load --platform linux/$(GOARCH) -t $(TAG) . | ||
|
||
build: regen-crd verify plugin operator docker | ||
build: regen-crd verify operator docker | ||
|
||
install: all | ||
|
||
|
@@ -65,35 +66,31 @@ clean: | |
@rm -rf dist/ | ||
|
||
regen-crd: | ||
@go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.11.1 | ||
@go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 | ||
@${GOPATH}/bin/controller-gen crd:maxDescLen=0,generateEmbeddedObjectMeta=true paths="./..." output:crd:artifacts:config=$(KUSTOMIZE_CRDS) | ||
@sed 's#namespace: minio-operator#namespace: {{ .Release.Namespace }}#g' resources/base/crds/minio.min.io_tenants.yaml > $(HELM_TEMPLATES)/minio.min.io_tenants.yaml | ||
@sed 's#namespace: minio-operator#namespace: {{ .Release.Namespace }}#g' resources/base/crds/sts.min.io_policybindings.yaml > $(HELM_TEMPLATES)/sts.min.io_policybindings.yaml | ||
@sed 's#namespace: minio-operator#namespace: {{ .Release.Namespace }}#g' resources/base/crds/job.min.io_miniojobs.yaml > $(HELM_TEMPLATES)/job.min.io_jobs.yaml | ||
|
||
regen-crd-docs: | ||
@echo "Installing crd-ref-docs" && GO111MODULE=on go install -v github.com/elastic/crd-ref-docs@latest | ||
@${GOPATH}/bin/crd-ref-docs --source-path=./pkg/apis/minio.min.io/v2 --config=docs/templates/config.yaml --renderer=asciidoctor --output-path=docs/tenant_crd.adoc --templates-dir=docs/templates/asciidoctor/ | ||
@${GOPATH}/bin/crd-ref-docs --source-path=./pkg/apis/sts.min.io/v1alpha1 --config=docs/templates/config.yaml --renderer=asciidoctor --output-path=docs/policybinding_crd.adoc --templates-dir=docs/templates/asciidoctor/ | ||
|
||
plugin: regen-crd | ||
@echo "Building 'kubectl-minio' binary" | ||
@(cd $(PLUGIN_HOME); \ | ||
go vet ./... && \ | ||
go test -race ./... && \ | ||
GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean && \ | ||
GO111MODULE=on ${GOPATH}/bin/golangci-lint run --timeout=5m --config ../.golangci.yml) | ||
|
||
plugin-binary: plugin | ||
@(cd $(PLUGIN_HOME) && CGO_ENABLED=0 go build -trimpath --ldflags $(LDFLAGS) -o kubectl-minio .) | ||
@${GOPATH}/bin/crd-ref-docs --source-path=./pkg/apis/job.min.io/v1alpha1 --config=docs/templates/config.yaml --renderer=asciidoctor --output-path=docs/job_crd.adoc --templates-dir=docs/templates/asciidoctor/ | ||
|
||
generate-code: | ||
@./k8s/update-codegen.sh | ||
|
||
generate-openshift-manifests: | ||
@./olm.sh | ||
|
||
release: assets generate-openshift-manifests | ||
helm-reindex: | ||
@echo "Re-indexing helm chart release" | ||
@./helm-reindex.sh | ||
|
||
release: assets | ||
@./release.sh | ||
@./olm.sh | ||
|
||
apply-gofmt: | ||
@echo "Applying gofmt to all generated an existing files" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.