Skip to content

Commit 4cc7bbe

Browse files
committed
chore: rename to siderolabs/grpc-proxy, rekres
No real changes. Signed-off-by: Andrey Smirnov <[email protected]>
1 parent 2c586db commit 4cc7bbe

13 files changed

+124
-106
lines changed

.drone.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
33
#
4-
# Generated on 2022-06-06T17:35:55Z by kres 65530e7.
4+
# Generated on 2022-10-13T11:49:36Z by kres latest.
55

66
kind: pipeline
77
type: kubernetes
@@ -207,6 +207,12 @@ volumes:
207207
temp:
208208
medium: memory
209209

210+
trigger:
211+
branch:
212+
exclude:
213+
- renovate/*
214+
- dependabot/*
215+
210216
---
211217
kind: pipeline
212218
type: kubernetes
@@ -234,6 +240,10 @@ steps:
234240
- failure
235241

236242
trigger:
243+
branch:
244+
exclude:
245+
- renovate/*
246+
- dependabot/*
237247
status:
238248
- success
239249
- failure

.golangci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2022-06-06T17:35:55Z by kres 65530e7.
3+
# Generated on 2022-10-13T11:49:36Z by kres latest.
44

55
# options for analysis running
66
run:
@@ -36,7 +36,7 @@ linters-settings:
3636
lines: 60
3737
statements: 40
3838
gci:
39-
local-prefixes: github.com/talos-systems/grpc-proxy
39+
local-prefixes: github.com/siderolabs/grpc-proxy
4040
gocognit:
4141
min-complexity: 30
4242
ireturn:
@@ -65,7 +65,7 @@ linters-settings:
6565
gofmt:
6666
simplify: true
6767
goimports:
68-
local-prefixes: github.com/talos-systems/grpc-proxy
68+
local-prefixes: github.com/siderolabs/grpc-proxy
6969
golint:
7070
min-confidence: 0.8
7171
gomnd:
@@ -135,9 +135,11 @@ linters:
135135
- goerr113
136136
- gomnd
137137
- gomoddirectives
138+
- ireturn
138139
- nestif
140+
- nonamedreturns
141+
- nosnakecase
139142
- paralleltest
140-
- promlinter
141143
- tagliatelle
142144
- thelper
143145
- typecheck
@@ -148,6 +150,7 @@ linters:
148150
- maligned
149151
- golint
150152
- scopelint
153+
- promlinter
151154

152155
issues:
153156
exclude: []

Dockerfile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2022-06-06T17:35:55Z by kres 65530e7.
5+
# Generated on 2022-10-13T11:49:36Z by kres latest.
66

77
ARG TOOLCHAIN
88

99
# cleaned up specs and compiled versions
1010
FROM scratch AS generate
1111

1212
# runs markdownlint
13-
FROM node:18.2.0-alpine AS lint-markdown
13+
FROM docker.io/node:18.10.0-alpine3.16 AS lint-markdown
1414
WORKDIR /src
15-
RUN npm i -g markdownlint-cli@0.31.1
15+
RUN npm i -g markdownlint-cli@0.32.2
1616
1717
COPY .markdownlint.json .
1818
COPY ./README.md ./README.md
@@ -23,15 +23,19 @@ FROM ${TOOLCHAIN} AS toolchain
2323
RUN apk --update --no-cache add bash curl build-base protoc protobuf-dev
2424

2525
# build tools
26-
FROM toolchain AS tools
26+
FROM --platform=${BUILDPLATFORM} toolchain AS tools
2727
ENV GO111MODULE on
28-
ENV CGO_ENABLED 0
28+
ARG CGO_ENABLED
29+
ENV CGO_ENABLED ${CGO_ENABLED}
2930
ENV GOPATH /go
3031
ARG GOLANGCILINT_VERSION
31-
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/${GOLANGCILINT_VERSION}/install.sh | bash -s -- -b /bin ${GOLANGCILINT_VERSION}
32+
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCILINT_VERSION} \
33+
&& mv /go/bin/golangci-lint /bin/golangci-lint
3234
ARG GOFUMPT_VERSION
3335
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
3436
&& mv /go/bin/gofumpt /bin/gofumpt
37+
RUN go install golang.org/x/vuln/cmd/govulncheck@latest \
38+
&& mv /go/bin/govulncheck /bin/govulncheck
3539
ARG GOIMPORTS_VERSION
3640
RUN go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \
3741
&& mv /go/bin/goimports /bin/goimports
@@ -56,14 +60,18 @@ RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is no
5660

5761
# runs goimports
5862
FROM base AS lint-goimports
59-
RUN FILES="$(goimports -l -local github.com/talos-systems/grpc-proxy .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/talos-systems/grpc-proxy .':\n${FILES}"; exit 1)
63+
RUN FILES="$(goimports -l -local github.com/siderolabs/grpc-proxy .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/grpc-proxy .':\n${FILES}"; exit 1)
6064

6165
# runs golangci-lint
6266
FROM base AS lint-golangci-lint
6367
COPY .golangci.yml .
6468
ENV GOGC 50
6569
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint --mount=type=cache,target=/go/pkg golangci-lint run --config .golangci.yml
6670

71+
# runs govulncheck
72+
FROM base AS lint-govulncheck
73+
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg govulncheck ./...
74+
6775
# runs unit-tests with race detector
6876
FROM base AS unit-tests-race
6977
ARG TESTPKGS

Makefile

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2022-06-06T17:35:55Z by kres 65530e7.
3+
# Generated on 2022-10-13T11:49:36Z by kres latest.
44

55
# common variables
66

77
SHA := $(shell git describe --match=none --always --abbrev=8 --dirty)
88
TAG := $(shell git describe --tag --always --dirty)
99
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
1010
ARTIFACTS := _out
11+
WITH_DEBUG ?= false
12+
WITH_RACE ?= false
1113
REGISTRY ?= ghcr.io
1214
USERNAME ?= siderolabs
1315
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
14-
GOLANGCILINT_VERSION ?= v1.46.2
15-
GOFUMPT_VERSION ?= v0.3.1
16-
GO_VERSION ?= 1.18
17-
GOIMPORTS_VERSION ?= v0.1.10
18-
PROTOBUF_GO_VERSION ?= 1.28.0
16+
GOLANGCILINT_VERSION ?= v1.50.0
17+
GOFUMPT_VERSION ?= v0.4.0
18+
GO_VERSION ?= 1.19
19+
GOIMPORTS_VERSION ?= v0.1.12
20+
PROTOBUF_GO_VERSION ?= 1.28.1
1921
GRPC_GO_VERSION ?= 1.2.0
20-
GRPC_GATEWAY_VERSION ?= 2.10.0
22+
GRPC_GATEWAY_VERSION ?= 2.11.3
2123
VTPROTOBUF_VERSION ?= 0.3.0
2224
DEEPCOPY_VERSION ?= v0.5.5
25+
GO_BUILDFLAGS ?=
26+
GO_LDFLAGS ?=
27+
CGO_ENABLED ?= 0
2328
TESTPKGS ?= ./...
2429
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
2530
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
@@ -35,21 +40,25 @@ COMMON_ARGS = --file=Dockerfile
3540
COMMON_ARGS += --progress=$(PROGRESS)
3641
COMMON_ARGS += --platform=$(PLATFORM)
3742
COMMON_ARGS += --push=$(PUSH)
38-
COMMON_ARGS += --build-arg=ARTIFACTS=$(ARTIFACTS)
39-
COMMON_ARGS += --build-arg=SHA=$(SHA)
40-
COMMON_ARGS += --build-arg=TAG=$(TAG)
41-
COMMON_ARGS += --build-arg=USERNAME=$(USERNAME)
42-
COMMON_ARGS += --build-arg=TOOLCHAIN=$(TOOLCHAIN)
43-
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION=$(GOLANGCILINT_VERSION)
44-
COMMON_ARGS += --build-arg=GOFUMPT_VERSION=$(GOFUMPT_VERSION)
45-
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION=$(GOIMPORTS_VERSION)
46-
COMMON_ARGS += --build-arg=PROTOBUF_GO_VERSION=$(PROTOBUF_GO_VERSION)
47-
COMMON_ARGS += --build-arg=GRPC_GO_VERSION=$(GRPC_GO_VERSION)
48-
COMMON_ARGS += --build-arg=GRPC_GATEWAY_VERSION=$(GRPC_GATEWAY_VERSION)
49-
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION=$(VTPROTOBUF_VERSION)
50-
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION=$(DEEPCOPY_VERSION)
51-
COMMON_ARGS += --build-arg=TESTPKGS=$(TESTPKGS)
52-
TOOLCHAIN ?= docker.io/golang:1.18-alpine
43+
COMMON_ARGS += --build-arg=ARTIFACTS="$(ARTIFACTS)"
44+
COMMON_ARGS += --build-arg=SHA="$(SHA)"
45+
COMMON_ARGS += --build-arg=TAG="$(TAG)"
46+
COMMON_ARGS += --build-arg=USERNAME="$(USERNAME)"
47+
COMMON_ARGS += --build-arg=REGISTRY="$(REGISTRY)"
48+
COMMON_ARGS += --build-arg=TOOLCHAIN="$(TOOLCHAIN)"
49+
COMMON_ARGS += --build-arg=CGO_ENABLED="$(CGO_ENABLED)"
50+
COMMON_ARGS += --build-arg=GO_BUILDFLAGS="$(GO_BUILDFLAGS)"
51+
COMMON_ARGS += --build-arg=GO_LDFLAGS="$(GO_LDFLAGS)"
52+
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
53+
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
54+
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
55+
COMMON_ARGS += --build-arg=PROTOBUF_GO_VERSION="$(PROTOBUF_GO_VERSION)"
56+
COMMON_ARGS += --build-arg=GRPC_GO_VERSION="$(GRPC_GO_VERSION)"
57+
COMMON_ARGS += --build-arg=GRPC_GATEWAY_VERSION="$(GRPC_GATEWAY_VERSION)"
58+
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION="$(VTPROTOBUF_VERSION)"
59+
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
60+
COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)"
61+
TOOLCHAIN ?= docker.io/golang:1.19-alpine
5362

5463
# help menu
5564

@@ -84,6 +93,18 @@ respectively.
8493

8594
endef
8695

96+
ifneq (, $(filter $(WITH_RACE), t true TRUE y yes 1))
97+
GO_BUILDFLAGS += -race
98+
CGO_ENABLED := 1
99+
GO_LDFLAGS += -linkmode=external -extldflags '-static'
100+
endif
101+
102+
ifneq (, $(filter $(WITH_DEBUG), t true TRUE y yes 1))
103+
GO_BUILDFLAGS += -tags sidero.debug
104+
else
105+
GO_LDFLAGS += -s -w
106+
endif
107+
87108
all: unit-tests lint
88109

89110
.PHONY: clean
@@ -109,6 +130,9 @@ fmt: ## Formats the source code
109130
go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION) && \
110131
gofumpt -w ."
111132

133+
lint-govulncheck: ## Runs govulncheck linter.
134+
@$(MAKE) target-$@
135+
112136
lint-goimports: ## Runs goimports linter.
113137
@$(MAKE) target-$@
114138

@@ -133,7 +157,7 @@ lint-markdown: ## Runs markdownlint.
133157
@$(MAKE) target-$@
134158

135159
.PHONY: lint
136-
lint: lint-golangci-lint lint-gofumpt lint-goimports lint-markdown ## Run all linters for the project.
160+
lint: lint-golangci-lint lint-gofumpt lint-govulncheck lint-goimports lint-markdown ## Run all linters for the project.
137161

138162
.PHONY: rekres
139163
rekres:
@@ -154,4 +178,3 @@ release-notes:
154178
conformance:
155179
@docker pull $(CONFORMANCE_IMAGE)
156180
@docker run --rm -it -v $(PWD):/src -w /src $(CONFORMANCE_IMAGE) enforce
157-

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
module github.com/talos-systems/grpc-proxy
1+
module github.com/siderolabs/grpc-proxy
22

33
go 1.19
44

55
require (
66
github.com/golang/protobuf v1.5.2
77
github.com/hashicorp/go-multierror v1.1.1
8-
github.com/stretchr/testify v1.7.2
9-
google.golang.org/grpc v1.47.0
10-
google.golang.org/protobuf v1.28.0
8+
github.com/stretchr/testify v1.8.0
9+
google.golang.org/grpc v1.50.0
10+
google.golang.org/protobuf v1.28.1
1111
)
1212

1313
require (
14-
github.com/davecgh/go-spew v1.1.0 // indirect
14+
github.com/davecgh/go-spew v1.1.1 // indirect
1515
github.com/hashicorp/errwrap v1.0.0 // indirect
1616
github.com/pmezard/go-difflib v1.0.0 // indirect
1717
golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect

0 commit comments

Comments
 (0)