Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed Dec 10, 2024
1 parent f5af655 commit 44387be
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 2,058 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Build the manager binary
FROM golang:1.21 as builder
FROM golang:1.23-alpine as builder

WORKDIR /workspace

RUN apk update && apk add make

# Copy miscellaneous stuff.
COPY .git/ .git/
COPY hack/ hack/
Expand All @@ -24,13 +26,13 @@ COPY pkg/ pkg/
# Build the controller.
RUN make build CGO_ENABLED=0

FROM alpine:3.19
FROM alpine:3.21
LABEL source_repository="https://github.com/sapcc/git-cert-shim"

WORKDIR /

RUN apk update && apk upgrade --no-cache --no-progress && \
apk --update add git less openssh && \
apk --update add git less openssh ca-certificates && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/* && git --version

Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Image URL to use all building/pushing image targets
IMG ?= keppel.eu-de-1.cloud.sap/ccloud/git-cert-shim
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -49,7 +47,7 @@ deploy: manifests

# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=git-cert-shim-role webhook paths="./..." output:rbac:artifacts:config=config/rbac
$(CONTROLLER_GEN) rbac:roleName=git-cert-shim-role webhook paths="./..." output:rbac:artifacts:config=config/rbac

# Run go fmt against code
fmt:
Expand All @@ -66,7 +64,7 @@ generate: controller-gen
# Build the docker image
docker-build: VERSION=$(shell cat VERSION)
docker-build:
docker build . -t ${IMG}:${VERSION}
docker build . --platform linux/amd64 -t ${IMG}:${VERSION}

# Push the docker image
docker-push: VERSION=$(shell cat VERSION)
Expand Down Expand Up @@ -102,7 +100,7 @@ release: git-tag-release set-image git-push-tag docker-build docker-push
# download controller-gen if necessary
controller-gen:
ifeq (, $(shell which controller-gen))
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5
CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.1.1
v2.1.2
12 changes: 7 additions & 5 deletions cmd/git-cert-shim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"

"github.com/sapcc/git-cert-shim/controllers"
"github.com/sapcc/git-cert-shim/pkg/config"
Expand Down Expand Up @@ -112,11 +113,12 @@ func main() {
ctrl.SetLogger(zap.New(zap.UseDevMode(true), zap.Level(&level)))

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
LeaderElection: enableLeaderElection,
LeaderElectionID: "336042e1.git-cert-shim",
Scheme: scheme,
Metrics: server.Options{
BindAddress: metricsAddr,
},
LeaderElection: enableLeaderElection,
LeaderElectionID: "336042e1.git-cert-shim",
})
if err != nil {
setupLog.Error(err, "unable to start manager")
Expand Down
12 changes: 5 additions & 7 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: git-cert-shim-role
rules:
- apiGroups:
- cert-manager.io
- ""
resources:
- certificates
- configmaps
- secrets
verbs:
- create
- delete
Expand All @@ -19,10 +18,9 @@ rules:
- update
- watch
- apiGroups:
- ""
- cert-manager.io
resources:
- configmaps
- secrets
- certificates
verbs:
- create
- delete
Expand Down
87 changes: 40 additions & 47 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,99 +1,92 @@
module github.com/sapcc/git-cert-shim

go 1.21
go 1.23

replace (
// Keep k8s dependencies in sync.
k8s.io/api => k8s.io/api v0.28.4
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.4
k8s.io/apimachinery => k8s.io/apimachinery v0.28.4
k8s.io/client-go => k8s.io/client-go v0.28.4
)
replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.4

require (
github.com/cert-manager/cert-manager v1.8.0
github.com/go-logr/logr v1.2.4
github.com/hashicorp/vault/api v1.12.2
github.com/onsi/ginkgo/v2 v2.9.7
github.com/onsi/gomega v1.27.7
github.com/cert-manager/cert-manager v1.13.3
github.com/go-logr/logr v1.4.2
github.com/hashicorp/vault/api v1.15.0
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.36.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
go.uber.org/zap v1.24.0
github.com/prometheus/client_golang v1.20.5
go.uber.org/zap v1.27.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/client-go v0.28.4
sigs.k8s.io/controller-runtime v0.15.0
sigs.k8s.io/controller-runtime v0.16.1
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.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/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-jose/go-jose/v4 v4.0.1 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.6 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/crypto v0.28.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.9.1 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
golang.org/x/tools v0.26.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/apiextensions-apiserver v0.27.2 // indirect
k8s.io/apiextensions-apiserver v0.28.1 // indirect
k8s.io/component-base v0.28.4 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
sigs.k8s.io/gateway-api v0.4.1 // indirect
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/gateway-api v0.8.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 44387be

Please sign in to comment.