Skip to content

Instantly share code, notes, and snippets.

Working from home

Jason Hall ImJasonH

Working from home
View GitHub Profile
ImJasonH / gcr-creds.yaml
Created Oct 2, 2020
GCR creds-updating Tekton sidecar
View gcr-creds.yaml
# Demonstrates a GCR creds-updating sidecar
# - The `creds-refresh` sidecar periodically fetches a Service Account auth
# token and uses it with `docker login` to authorize docker pushes to GCR.
# - The dind sidecar provides an ephemeral Docker daemon to run builds and
# store images before they're pushed.
# - The step periodically uses these credentials to push an image to GCR.
# $ kubectl create -f gcr-creds.yaml
# created

Testing GCE VM suspend/resume latency

time ./  &> output.txt


  • COS VM create takes ~10s
  • VM delete takes ~2m20s
ImJasonH /
Last active Jul 13, 2020
Custom Tasks TODOs
ImJasonH /
Created Jun 24, 2020
Cloud Build custom task for Tekton

Google Cloud Build for Tekton


Install and configure ko.

ko apply -f cmd/cloudbuild/

From within this directory: go run ./
ImJasonH / git_resource.go
Created Jan 28, 2020
Sketch of change to migrate `git-init` to script mode (
View git_resource.go
// GetInputTaskModifier returns the TaskModifier to be used when this resource is an input.
func (s *GitResource) GetInputTaskModifier(_ *TaskSpec, path string) (TaskModifier, error) {
return &InternalTaskModifier{
StepsToPrepend: []Step{{
Container: corev1.Container{
Name: names.SimpleNameGenerator.RestrictLengthWithRandomSuffix(gitSource + "-" + s.Name),
Image: s.GitImage,
WorkingDir: pipeline.WorkspaceDir,
// This is used to populate the ResourceResult status.
Env: []corev1.EnvVar{{
View go.mod
go 1.13
View gist:e28498d52e8ee9ded05e92ce679a6d3a
* gcloud-image (default: foo)
* args (default: ["help"])
* image (type: image)
You can’t perform that action at this time.