Skip to content

Commit

Permalink
Rename to metal-token-rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed Jan 14, 2025
1 parent b77a6d9 commit 8964297
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ linters-settings:
- yodaStyleExpr
goimports:
# Put local imports after 3rd-party packages.
local-prefixes: github.com/ironcore-dev/metal-token-dealer
local-prefixes: github.com/ironcore-dev/metal-token-rotate
gosec:
excludes:
# gosec wants us to set a short ReadHeaderTimeout to avoid Slowloris attacks, but doing so would expose us to Keep-Alive race conditions (see https://iximiuz.com/en/posts/reverse-proxy-http-keep-alive-and-502s/)
Expand Down
4 changes: 2 additions & 2 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: metal-token-dealer
Upstream-Name: metal-token-rotate
Upstream-Contact: IronCore authors <ospo@sap.com>
Source: <https://github.com/ironcore-dev/metal-token-dealer>
Source: <https://github.com/ironcore-dev/metal-token-rotate>
Disclaimer: The code in this project may include calls to APIs ("API Calls") of
SAP or third-party products or services developed outside of this project
("External Products").
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ COPY go.sum go.sum
RUN go mod download

COPY ./ /workspace/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on GOTOOLCHAIN=local go build -a -o metal-auth main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on GOTOOLCHAIN=local go build -a -o metal-token-rotate main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
LABEL source_repository="https://github.com/ironcore-dev/metal-token-dealer"
COPY --from=builder /workspace/metal-auth .
LABEL source_repository="https://github.com/ironcore-dev/metal-token-rotate"
COPY --from=builder /workspace/metal-token-rotate .
USER nonroot:nonroot

ENTRYPOINT ["/metal-auth"]
ENTRYPOINT ["/metal-token-rotate"]
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ GO_TESTENV =
GO_BUILDENV =
TESTBIN=$(shell pwd)/testbin

build-all: build/metal-token-dealer
build-all: build/metal-token-rotate

build/metal-token-dealer: FORCE generate
@env $(GO_BUILDENV) go build $(GO_BUILDFLAGS) -ldflags '-s -w $(GO_LDFLAGS)' -o build/metal-token-dealer .
build/metal-token-rotate: FORCE generate
@env $(GO_BUILDENV) go build $(GO_BUILDFLAGS) -ldflags '-s -w $(GO_LDFLAGS)' -o build/metal-token-rotate .

DESTDIR =
ifeq ($(shell uname -s),Darwin)
Expand All @@ -46,9 +46,9 @@ else
PREFIX = /usr
endif

install: FORCE build/metal-token-dealer
install: FORCE build/metal-token-rotate
install -d -m 0755 "$(DESTDIR)$(PREFIX)/bin"
install -m 0755 build/metal-token-dealer "$(DESTDIR)$(PREFIX)/bin/metal-token-dealer"
install -m 0755 build/metal-token-rotate "$(DESTDIR)$(PREFIX)/bin/metal-token-rotate"

# which packages to test with test runner
GO_TESTPKGS := $(shell go list -f '{{if or .TestGoFiles .XTestGoFiles}}{{.Dir}}{{end}}' ./...)
Expand All @@ -67,7 +67,7 @@ check: FORCE static-check build/cover.html build-all

generate: install-controller-gen
@printf "\e[1;36m>> controller-gen\e[0m\n"
@controller-gen crd rbac:roleName=metal-token-dealer paths="./..." output:crd:artifacts:config=crd
@controller-gen crd rbac:roleName=metal-token-rotate paths="./..." output:crd:artifacts:config=crd
@controller-gen object paths=./...

run-golangci-lint: FORCE prepare-static-check
Expand Down Expand Up @@ -133,7 +133,7 @@ help: FORCE
@printf "\n"
@printf "\e[1mBuild\e[0m\n"
@printf " \e[36mbuild-all\e[0m Build all binaries.\n"
@printf " \e[36mbuild/metal-token-dealer\e[0m Build metal-token-dealer.\n"
@printf " \e[36mbuild/metal-token-rotate\e[0m Build metal-token-rotate.\n"
@printf " \e[36minstall\e[0m Install all binaries. This option understands the conventional 'DESTDIR' and 'PREFIX' environment variables for choosing install locations.\n"
@printf "\n"
@printf "\e[1mTest\e[0m\n"
Expand Down
4 changes: 2 additions & 2 deletions Makefile.maker.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Configuration file for <https://github.com/sapcc/go-makefile-maker>

metadata:
url: https://github.com/ironcore-dev/metal-token-dealer
url: https://github.com/ironcore-dev/metal-token-rotate

binaries:
- name: metal-token-dealer
- name: metal-token-rotate
fromPackage: .
installTo: bin/

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# metal-token-dealer
# metal-token-rotate

## About this project

Delivers tokens for metal-operator into Gardener.

## Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/ironcore-dev/metal-token-dealer/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/ironcore-dev/metal-token-rotate/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).

## Licensing

Copyright 2024 SAP SE or an SAP affiliate company and IronCore contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/ironcore-dev/metal-token-dealer).
Copyright 2024 SAP SE or an SAP affiliate company and IronCore contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/ironcore-dev/metal-token-rotate).
2 changes: 1 addition & 1 deletion controllers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
)

const DefaultConfigPath string = "/etc/metal-token-dealer/config.json"
const DefaultConfigPath string = "/etc/metal-token-rotate/config.json"

type Config struct {
ServiceAccountName string `json:"serviceAccountName"`
Expand Down
2 changes: 1 addition & 1 deletion controllers/secret_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/ironcore-dev/metal-token-dealer/controllers"
"github.com/ironcore-dev/metal-token-rotate/controllers"
)

var _ = Describe("The secret controller", func() {
Expand Down
2 changes: 1 addition & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/ironcore-dev/metal-token-dealer/controllers"
"github.com/ironcore-dev/metal-token-rotate/controllers"
)

func TestControllers(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ironcore-dev/metal-token-dealer
module github.com/ironcore-dev/metal-token-rotate

go 1.23.0

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
ctrlconfig "sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/ironcore-dev/metal-token-dealer/controllers"
"github.com/ironcore-dev/metal-token-rotate/controllers"
)

var (
Expand Down

0 comments on commit 8964297

Please sign in to comment.