Skip to content

Commit

Permalink
Merge pull request #102 from teamsnap/PLAT-4800
Browse files Browse the repository at this point in the history
chore: Upgrading Go, Debian for vault-k8s-secret Container
  • Loading branch information
wnoonan authored Aug 9, 2024
2 parents efa1a8d + d49f23a commit 7dfb1a0
Show file tree
Hide file tree
Showing 12 changed files with 339 additions and 2,398 deletions.
21 changes: 21 additions & 0 deletions cmd/vault-k8s-secret/DEPLOYING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Deploying
This is manual for now

## Prerequisites
* gcloud cli and both staging/production project credentials
* docker desktop

## Staging
Replace `x.x.x` version with the new version.

```sh
docker build --platform=linux/amd64 -f Dockerfile -t us.gcr.io/staging-205121/vault-key/vault-key:x.x.x .
docker push us.gcr.io/staging-205121/vault-key/k8-secret:x.x.x
```
## Production
Replace `x.x.x` version with the new version.

```sh
docker build --platform=linux/amd64 -f Dockerfile -t us.gcr.io/production-195315/vault-key/vault-key:x.x.x .
docker push us.gcr.io/production-195315/vault-key/k8-secret:x.x.x
```
19 changes: 14 additions & 5 deletions cmd/vault-k8s-secret/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
FROM golang:1.16.6-stretch
FROM golang:1.22.6-bookworm

ENV \
GOARCH="amd64" \
GCLOUD_VERSION="455.0.0" \
PATH="$PATH:/go/bin"

RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
ca-certificates \
&& echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& apt-get update \
&& apt-get install -y google-cloud-sdk
wget

# install gcloud manually because the latest version ships with a kubectl that does not work for our clusters
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$GCLOUD_VERSION-linux-x86_64.tar.gz \
&& tar -xzf google-cloud-sdk-$GCLOUD_VERSION-linux-x86_64.tar.gz \
&& rm google-cloud-sdk-$GCLOUD_VERSION-linux-x86_64.tar.gz \
&& mv google-cloud-sdk /usr/local \
&& ln -s /usr/local/google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud \
&& gcloud components install gke-gcloud-auth-plugin \
&& gcloud components install kubectl \
&& ln -s /usr/local/google-cloud-sdk/bin/kubectl.$KUBECTL_VERSION /usr/local/bin/kubectl \
&& apt-get remove -y curl wget

WORKDIR /go/src/github.com/teamsnap/vault-k8s-secret

Expand Down
112 changes: 108 additions & 4 deletions cmd/vault-k8s-secret/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,114 @@
module github.com/teamsnap/vault-k8s-secret

go 1.16
go 1.22.6

require (
github.com/teamsnap/vault-key/pkg/k8s v0.2.7
github.com/teamsnap/vault-key/pkg/vault v0.4.3
go.uber.org/automaxprocs v1.5.1
go.uber.org/zap v1.14.1
github.com/teamsnap/vault-key/pkg/vault v0.4.8
go.uber.org/automaxprocs v1.5.3
go.uber.org/zap v1.27.0
)

require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.8.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.13 // indirect
cloud.google.com/go/kms v1.18.5 // indirect
cloud.google.com/go/longrunning v0.5.12 // indirect
cloud.google.com/go/secretmanager v1.13.6 // indirect
cloud.google.com/go/storage v1.43.0 // indirect
github.com/GoogleCloudPlatform/berglas v1.0.3 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gammazero/deque v0.2.1 // indirect
github.com/gammazero/workerpool v1.1.3 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.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.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/googleapis/gnostic v0.5.5 // 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.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.1-vault-5 // indirect
github.com/hashicorp/vault/api v1.14.0 // indirect
github.com/hashicorp/vault/sdk v0.13.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jstemmer/go-junit-report v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // 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/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
google.golang.org/api v0.191.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240808171019-573a1156607a // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240808171019-573a1156607a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.30.3 // indirect
k8s.io/apimachinery v0.30.3 // indirect
k8s.io/client-go v0.30.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 7dfb1a0

Please sign in to comment.