Skip to content

Commit

Permalink
update kustomize and other tools (#882)
Browse files Browse the repository at this point in the history
* update kustomize and other tools

* fix golang-lint

* fix readiness log

Signed-off-by: Ziming Zhang <zziming@vmware.com>
  • Loading branch information
bitsf committed Apr 27, 2022
1 parent 2afa9df commit 544d673
Show file tree
Hide file tree
Showing 23 changed files with 49,560 additions and 13,405 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: v0.145.0
version: v1.6.3
args: release --rm-dist --release-footer /tmp/release.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Expand Up @@ -80,7 +80,7 @@ linters:
# - gosec

service:
golangci-lint-version: 1.33.x
golangci-lint-version: 1.45.x
prepare:
- make generate

Expand Down
28 changes: 17 additions & 11 deletions Makefile
Expand Up @@ -510,7 +510,7 @@ clean:

# find or download controller-gen
# download controller-gen if necessary
CONTROLLER_GEN_VERSION := 0.5.0
CONTROLLER_GEN_VERSION := 0.6.2
CONTROLLER_GEN := $(BIN)/controller-gen

.PHONY: controller-gen
Expand All @@ -535,7 +535,7 @@ $(CONTROLLER_GEN):

# find or download markdownlint
# download markdownlint if necessary
MARKDOWNLINT_VERSION := 0.16.0
MARKDOWNLINT_VERSION := 0.31.1
MARKDOWNLINT := $(BIN)/markdownlint

.PHONY: markdownlint
Expand All @@ -554,7 +554,7 @@ $(MARKDOWNLINT):
# find or download golangci-lint
# download golangci-lint if necessary
GOLANGCI_LINT := $(BIN)/golangci-lint
GOLANGCI_LINT_VERSION := 1.33.0
GOLANGCI_LINT_VERSION := 1.45.2

.PHONY: golangci-lint
golangci-lint:
Expand All @@ -571,7 +571,7 @@ $(GOLANGCI_LINT):

# find or download kubebuilder
# download kubebuilder if necessary
KUBEBUIDER_VERSION := 3.1.0
KUBEBUIDER_VERSION := 3.2.0
KUBEBUILDER=$(BIN)/kubebuilder

.PHONY: kubebuilder
Expand All @@ -589,7 +589,7 @@ $(KUBEBUILDER):

# find or download kustomize
# download kustomize if necessary
KUSTOMIZE_VERSION := 3.8.7
KUSTOMIZE_VERSION := 4.5.4
KUSTOMIZE := $(BIN)/kustomize

.PHONY: kustomize
Expand All @@ -616,7 +616,7 @@ HELM=$(shell which helm 2> /dev/null)
endif

# find or download goreleaser
GORELEASER_VERSION := 0.129.0
GORELEASER_VERSION := v1.6.3
GORELEASER := $(BIN)/goreleaser

.PHONY: goreleaser
Expand All @@ -629,13 +629,19 @@ goreleaser:
$(GORELEASER):
$(MAKE) $(BIN)
# https://goreleaser.com/install/
export BINDIR='$(BIN)' ; \
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh \
| bash -s 'v$(GORELEASER_VERSION)'
@{ \
set -e ;\
GORELEASER_TMP_DIR=$$(mktemp -d) ;\
cd $$GORELEASER_TMP_DIR ;\
go mod init tmp ;\
go get github.com/goreleaser/goreleaser@$(GORELEASER_VERSION) ;\
go build -mod=readonly -o $(GORELEASER) github.com/goreleaser/goreleaser ;\
rm -rf $$GORELEASER_TMP_DIR ;\
}

# find or download stringer
# download stringer if necessary
STRINGER_VERSION := v0.1.2
STRINGER_VERSION := v0.1.10
STRINGER := $(BIN)/stringer

.PHONY: stringer
Expand Down Expand Up @@ -695,7 +701,7 @@ $(KIND):

# find or download helm-docs
# download helm-docs if necessary
HELM_DOCS_VERSION := 1.4.0
HELM_DOCS_VERSION := 1.8.1
HELM_DOCS := $(BIN)/helm-docs

.PHONY: helm-docs
Expand Down
6 changes: 4 additions & 2 deletions apis/goharbor.io/v1alpha3/exporter_types.go
Expand Up @@ -86,6 +86,8 @@ const (
defaultCacheDurationSeconds = 30

defaultCacheCleanIntervalSeconds = 4 * 60 * 60 // 4hours

baseInt10 = 10
)

func (spec *ExporterCacheSpec) GetDurationEnvVar() string {
Expand All @@ -94,7 +96,7 @@ func (spec *ExporterCacheSpec) GetDurationEnvVar() string {
seconds = int64(spec.Duration.Seconds())
}

return strconv.FormatInt(seconds, 10)
return strconv.FormatInt(seconds, baseInt10)
}

func (spec *ExporterCacheSpec) GetCleanIntervalEnvVar() string {
Expand All @@ -103,7 +105,7 @@ func (spec *ExporterCacheSpec) GetCleanIntervalEnvVar() string {
seconds = int64(spec.CleanInterval.Seconds())
}

return strconv.FormatInt(seconds, 10)
return strconv.FormatInt(seconds, baseInt10)
}

type ExporterCoreSpec struct {
Expand Down
6 changes: 4 additions & 2 deletions apis/goharbor.io/v1beta1/exporter_types.go
Expand Up @@ -93,6 +93,8 @@ const (
defaultCacheDurationSeconds = 30

defaultCacheCleanIntervalSeconds = 4 * 60 * 60 // 4hours

baseInt10 = 10
)

func (spec *ExporterCacheSpec) GetDurationEnvVar() string {
Expand All @@ -101,7 +103,7 @@ func (spec *ExporterCacheSpec) GetDurationEnvVar() string {
seconds = int64(spec.Duration.Seconds())
}

return strconv.FormatInt(seconds, 10)
return strconv.FormatInt(seconds, baseInt10)
}

func (spec *ExporterCacheSpec) GetCleanIntervalEnvVar() string {
Expand All @@ -110,7 +112,7 @@ func (spec *ExporterCacheSpec) GetCleanIntervalEnvVar() string {
seconds = int64(spec.CleanInterval.Seconds())
}

return strconv.FormatInt(seconds, 10)
return strconv.FormatInt(seconds, baseInt10)
}

type ExporterCoreSpec struct {
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1beta1/harborcluster_types.go
Expand Up @@ -190,7 +190,6 @@ type Database struct {
}

type DatabaseSpec struct {

// +kubebuilder:validation:Optional
PostgreSQL *PostgreSQLSpec `json:"postgresql,omitempty"`

Expand Down
6 changes: 3 additions & 3 deletions charts/harbor-operator/Chart.lock
@@ -1,12 +1,12 @@
dependencies:
- name: operator
repository: https://operator.min.io/
version: 4.4.9
version: 4.4.16
- name: redis-operator
repository: https://spotahome.github.io/redis-operator
version: 3.1.4
- name: postgres-operator
repository: ""
version: 1.6.3
digest: sha256:f2bd62e3b155494472fdded8c56843a39ee29e8f67773f38f56165dcab818137
generated: "2022-03-21T16:47:50.074081158Z"
digest: sha256:1e6f09172d55e1e04fb98c84c76dbba94c0636822f9cc88163e059030b7c9a71
generated: "2022-04-19T19:48:34.855535+08:00"
2 changes: 1 addition & 1 deletion charts/harbor-operator/Chart.yaml
Expand Up @@ -21,7 +21,7 @@ icon: https://branding.cncf.io/img/projects/harbor/icon/color/harbor-icon-color.

dependencies:
- name: operator
version: 4.4.9
version: 4.4.16
condition: minio-operator.enabled
repository: https://operator.min.io/
tags:
Expand Down
4 changes: 2 additions & 2 deletions charts/harbor-operator/charts/postgres-operator/README.md
Expand Up @@ -10,7 +10,7 @@ Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes

| Name | Email | Url |
| ---- | ------ | --- |
| Zalando | opensource@zalando.de | |
| Zalando | <opensource@zalando.de> | |

## Source Code

Expand Down Expand Up @@ -141,4 +141,4 @@ Postgres Operator creates and manages PostgreSQL clusters running in Kubernetes
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.4.0](https://github.com/norwoodj/helm-docs/releases/v1.4.0)
Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1)

0 comments on commit 544d673

Please sign in to comment.