Skip to content

Commit

Permalink
adding cloudsqlproxy wrapper and use exitdir to signal when the pod s…
Browse files Browse the repository at this point in the history
…hould terminate (#520)

* yaml format

Signed-off-by: cpanato <ctadeu@gmail.com>

* adding cloudsqlproxy wrapper and use exitdir to signal when the pod should terminate

Signed-off-by: cpanato <ctadeu@gmail.com>

* ignore lint for now

Signed-off-by: cpanato <ctadeu@gmail.com>

* bump gcr.io/cloudsql-docker/gce-proxy to 1.33.1

Signed-off-by: cpanato <ctadeu@gmail.com>

Signed-off-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
cpanato authored Jan 17, 2023
1 parent 2f05e1b commit e290f7d
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 168 deletions.
354 changes: 186 additions & 168 deletions .ko.yaml
Original file line number Diff line number Diff line change
@@ -1,182 +1,200 @@
---
defaultBaseImage: cgr.dev/chainguard/alpine-base:latest
baseImageOverrides:
github.com/sigstore/scaffolding/cmd/cloudsqlproxy: gcr.io/cloudsql-docker/gce-proxy:1.33.1-alpine

builds:
- id: ctlog-createctconfig
dir: .
main: ./cmd/ctlog/createctconfig
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: ctlog-createctconfig
dir: .
main: ./cmd/ctlog/createctconfig
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: ctlog-managectroots
dir: .
main: ./cmd/ctlog/managectroots
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: ctlog-managectroots
dir: .
main: ./cmd/ctlog/managectroots
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: ctlog-verifyfulcio
dir: .
main: ./cmd/ctlog/verifyfulcio
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: ctlog-verifyfulcio
dir: .
main: ./cmd/ctlog/verifyfulcio
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: fulcio-createcerts
dir: .
main: ./cmd/fulcio/createcerts
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: fulcio-createcerts
dir: .
main: ./cmd/fulcio/createcerts
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: tuf-createsecret
dir: .
main: ./cmd/tuf/createsecret
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: tuf-createsecret
dir: .
main: ./cmd/tuf/createsecret
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: tuf-server
dir: .
main: ./cmd/tuf/server
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: tuf-server
dir: .
main: ./cmd/tuf/server
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: trillian-createtree
dir: .
main: ./cmd/trillian/createtree
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: trillian-createtree
dir: .
main: ./cmd/trillian/createtree
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: trillian-createdb
dir: .
main: ./cmd/trillian/createdb
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: trillian-createdb
dir: .
main: ./cmd/trillian/createdb
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: trillian-updatetree
dir: .
main: ./cmd/trillian/updatetree
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: trillian-updatetree
dir: .
main: ./cmd/trillian/updatetree
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: getoidctoken
dir: .
main: ./cmd/getoidctoken
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: cloudsqlproxy
dir: .
main: ./cmd/cloudsqlproxy
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: prober
dir: .
main: ./cmd/prober
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: getoidctoken
dir: .
main: ./cmd/getoidctoken
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: rekor-createsecret
dir: .
main: ./cmd/rekor/createsecret
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
- id: prober
dir: .
main: ./cmd/prober
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"

- id: rekor-createsecret
dir: .
main: ./cmd/rekor/createsecret
env:
- CGO_ENABLED=0
flags:
- -trimpath
- -tags
- nostackdriver
ldflags:
- -s
- -w
- -extldflags "-static"
- "{{ .Env.LDFLAGS }}"
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ ko-resolve:
ko resolve --tags $(GIT_TAG),latest -BRf ./config/$(artifact) \
--platform=all \
--image-refs imagerefs-$(artifact) > release-$(artifact).yaml )) \
# "Building cloudsqlproxy wrapper"
LDFLAGS="$(LDFLAGS)" KO_DOCKER_REPO=$(KO_DOCKER_REPO) \
ko build --base-import-paths --platform=all --tags $(GIT_TAG),latest --image-refs imagerefs-cloudsqlproxy ./cmd/cloudsqlproxy

.PHONY: ko-resolve-testdata
ko-resolve-testdata:
Expand All @@ -32,6 +35,7 @@ sign-release-images: sign-test-images
$(foreach artifact,$(artifacts), \
echo "Signing $(artifact)"; export GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_TAG) ARTIFACT=imagerefs-$(artifact); ./scripts/sign-release-images.sh \
)
echo "Signing cloudsqlproxy"; export GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_TAG) ARTIFACT=imagerefs-cloudsqlproxy; ./scripts/sign-release-images.sh \

.PHONY: release-images
release-images: ko-resolve ko-resolve-testdata
Expand Down
Loading

0 comments on commit e290f7d

Please sign in to comment.