Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
golang-version=1.19.x
golang-version=1.23.x
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.19-alpine3.16 as builder
FROM --platform=$BUILDPLATFORM golang:1.23-alpine3.21 as builder

RUN apk add --update --no-cache ca-certificates tzdata git make bash && update-ca-certificates

Expand Down
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include .bingo/Variables.mk

SHELL=/usr/bin/env bash -o pipefail
TMP_DIR := $(shell pwd)/tmp
TOOLS_BIN_DIR ?= $(shell pwd)/tmp/tools/bin
BIN_DIR ?= $(TMP_DIR)/bin
LIB_DIR ?= $(TMP_DIR)/lib
FIRST_GOPATH := $(firstword $(subst :, ,$(shell go env GOPATH)))
Expand All @@ -18,7 +19,7 @@ DOCKER_REPO ?= quay.io/observatorium/token-refresher

THANOS ?= $(BIN_DIR)/thanos
THANOS_VERSION ?= 0.13.0
OBSERVATORIUM ?= $(BIN_DIR)/observatorium
API ?= $(BIN_DIR)/api
UP ?= $(BIN_DIR)/up
HYDRA ?= $(BIN_DIR)/hydra
GOLANGCILINT ?= $(FIRST_GOPATH)/bin/golangci-lint
Expand All @@ -27,6 +28,8 @@ EMBEDMD ?= $(BIN_DIR)/embedmd
SHELLCHECK ?= $(BIN_DIR)/shellcheck
MEMCACHED ?= $(BIN_DIR)/memcached

TOOLING=$(API) $(UP) $(EMBEDMD)

default: token-refresher
all: clean lint test token-refresher

Expand Down Expand Up @@ -72,7 +75,7 @@ test-unit:

.PHONY: test-integration
test-integration: build integration-test-dependencies
PATH=$(BIN_DIR):$(FIRST_GOPATH)/bin:$$PATH LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIB_DIR) ./test/integration.sh
PATH=$(TOOLS_BIN_DIR):$(BIN_DIR):$(FIRST_GOPATH)/bin:$$PATH LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIB_DIR) ./test/integration.sh

.PHONY: clean
clean:
Expand Down Expand Up @@ -154,7 +157,7 @@ container-release-build-push: container-build-push
.

.PHONY: integration-test-dependencies
integration-test-dependencies: $(THANOS) $(UP) $(HYDRA) $(OBSERVATORIUM)
integration-test-dependencies: $(THANOS) $(UP) $(HYDRA) $(API)

$(BIN_DIR):
mkdir -p $(BIN_DIR)
Expand All @@ -166,18 +169,10 @@ $(THANOS): | $(BIN_DIR)
@echo "Downloading Thanos"
curl -L "https://github.com/thanos-io/thanos/releases/download/v$(THANOS_VERSION)/thanos-$(THANOS_VERSION).$$(go env GOOS)-$$(go env GOARCH).tar.gz" | tar --strip-components=1 -xzf - -C $(BIN_DIR)

$(OBSERVATORIUM): | vendor $(BIN_DIR)
go build -mod=vendor -o $@ github.com/observatorium/observatorium

$(UP): | vendor $(BIN_DIR)
go build -mod=vendor -o $@ github.com/observatorium/up/cmd/up

$(HYDRA): | vendor $(BIN_DIR)
@echo "Downloading Hydra"
curl -L "https://github.com/ory/hydra/releases/download/v1.7.4/hydra_1.7.4_linux_64-bit.tar.gz" | tar -xzf - -C $(BIN_DIR) hydra

$(EMBEDMD): | vendor $(BIN_DIR)
go build -mod=vendor -o $@ github.com/campoy/embedmd

$(GOLANGCILINT):
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/$(GOLANGCILINT_VERSION)/install.sh \
Expand All @@ -186,3 +181,10 @@ $(GOLANGCILINT):

$(SHELLCHECK): | $(BIN_DIR)
curl -sNL "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.$(OS).$(ARCH).tar.xz" | tar --strip-components=1 -xJf - -C $(BIN_DIR)

$(TOOLS_BIN_DIR):
mkdir -p $(TOOLS_BIN_DIR)

$(TOOLING): $(TOOLS_BIN_DIR)
@echo Installing tools from tools/tools.go
@cat tools/tools.go | grep _ | awk -F'"' '{print $$2}' | GOBIN=$(TOOLS_BIN_DIR) xargs -tI % go install -mod=readonly -modfile=tools/go.mod %
149 changes: 22 additions & 127 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,139 +1,34 @@
module github.com/observatorium/token-refresher

go 1.19
go 1.23.3

toolchain go1.23.9

require (
github.com/campoy/embedmd v1.0.0
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/go-kit/kit v0.10.0
github.com/metalmatze/signal v0.0.0-20201002154727-d0c16e42a3cf
github.com/observatorium/observatorium v0.1.2-0.20201001162514-585e9d38dea7
github.com/observatorium/up v0.0.0-20200603110215-8a20b4e48ac0
github.com/go-kit/kit v0.13.0
github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a
github.com/oklog/run v1.1.0
github.com/prometheus/client_golang v1.5.1
github.com/prometheus/client_golang v1.21.1
github.com/spf13/pflag v1.0.5
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/oauth2 v0.28.0
)

require (
cloud.google.com/go v0.46.3 // indirect
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/OneOfOne/xxhash v1.2.7 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/beevik/etree v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/brancz/gojsontoyaml v0.0.0-20191212081931-bf2969bbd742 // indirect
github.com/brancz/kube-rbac-proxy v0.5.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/dexidp/dex v0.0.0-20200512115545-709d4169d646 // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-chi/chi v4.0.4+incompatible // indirect
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/go-pluto/styx v0.0.0-20200109161911-78a77eb717b4 // indirect
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/golang/protobuf v1.4.0 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-jsonnet v0.15.1-0.20200310221949-724650d358b6 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/gorilla/handlers v1.4.2 // indirect
github.com/gorilla/mux v1.7.3 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.3 // indirect
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/instrumenta/kubeval v0.0.0-20200515185822-7721cbec724c // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/json-iterator/go v1.1.9 // indirect
github.com/jsonnet-bundler/jsonnet-bundler v0.3.1 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.3.0 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.3.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/olekukonko/tablewriter v0.0.1 // indirect
github.com/onsi/gomega v1.7.1 // indirect
github.com/open-policy-agent/opa v0.23.2 // indirect
github.com/opencontainers/runc v1.0.0-rc9 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/peterh/liner v0.0.0-20170211195444-bf27d3ba8e1d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.9.1 // indirect
github.com/prometheus/procfs v0.0.11 // indirect
github.com/prometheus/prometheus v1.8.2-0.20200305080338-7164b58945bb // indirect
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
github.com/russellhaering/goxmldsig v0.0.0-20180430223755-7acd5e4a6ef7 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/sirupsen/logrus v1.6.0 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.7.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/urfave/cli v1.22.2 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v0.0.0-20180816142147-da425ebb7609 // indirect
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b // indirect
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 // indirect
go.opencensus.io v0.22.2 // indirect
go.uber.org/atomic v1.5.1 // indirect
go.uber.org/automaxprocs v1.2.0 // indirect
go.uber.org/multierr v1.3.0 // indirect
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee // indirect
go.uber.org/zap v1.13.0 // indirect
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/mod v0.2.0 // indirect
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect
golang.org/x/text v0.3.2 // indirect
golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
google.golang.org/api v0.17.0 // indirect
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36 // indirect
google.golang.org/grpc v1.27.1 // indirect
google.golang.org/protobuf v1.21.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/ini.v1 v1.57.0 // indirect
gopkg.in/ldap.v2 v2.5.1 // indirect
gopkg.in/square/go-jose.v2 v2.5.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
honnef.co/go/tools v0.0.1-2019.2.3 // indirect
k8s.io/apimachinery v0.18.0 // indirect
k8s.io/component-base v0.18.0 // indirect
k8s.io/klog v1.0.0 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/sys v0.32.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
)
Loading
Loading