Skip to content

Instantly share code, notes, and snippets.

View aaron-prindle's full-sized avatar
💭
📦

Aaron Prindle aaron-prindle

💭
📦
  • Google
  • San Francisco
View GitHub Profile
@aaron-prindle
aaron-prindle / gist:4ee7e1d31976a855b46ba844c06626f6
Last active April 7, 2022 01:17
transform.go panic related to #7255
aprindle@aprindle ~/panic-test $ skaff debug --default-repo=gcr.io/my-repo
Listing files to watch...
- skaffold-templated
Generating tags...
- skaffold-templated -> gcr.io/aprindle-test-cluster/skaffold-templated:latest
Some taggers failed. Rerun with -vdebug for errors.
Checking cache...
- skaffold-templated: Found Remotely
Tags used in deployment:
- skaffold-templated -> gcr.io/aprindle-test-cluster/skaffold-templated:latest@sha256:155da19316252d528072101ee1521ad6056918f4a342763f2954d22688540d47
I0922 23:14:17.872362 3840855 out.go:298] Setting OutFile to fd 1 ...
I0922 23:14:17.872555 3840855 out.go:350] isatty.IsTerminal(1) = false
I0922 23:14:17.872572 3840855 out.go:311] Setting ErrFile to fd 2...
I0922 23:14:17.872583 3840855 out.go:350] isatty.IsTerminal(2) = false
I0922 23:14:17.872700 3840855 root.go:313] Updating PATH: /usr/local/google/home/aprindle/.minikube/bin
I0922 23:14:17.873252 3840855 config.go:177] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I0922 23:14:17.874328 3840855 config.go:177] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I0922 23:14:17.874848 3840855 cli_runner.go:115] Run: docker container inspect minikube --format={{.State.Status}}
I0922 23:14:17.930530 3840855 ssh_runner.go:152] Run: systemctl --version
I0922 23:14:17.930644 3840855 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
I0922 23:08:59.322340 3835227 out.go:298] Setting OutFile to fd 1 ...
I0922 23:08:59.322464 3835227 out.go:350] isatty.IsTerminal(1) = false
I0922 23:08:59.322474 3835227 out.go:311] Setting ErrFile to fd 2...
I0922 23:08:59.322481 3835227 out.go:350] isatty.IsTerminal(2) = false
I0922 23:08:59.322594 3835227 root.go:313] Updating PATH: /usr/local/google/home/aprindle/.minikube/bin
I0922 23:08:59.323083 3835227 config.go:177] Loaded profile config "minikube": Driver=kvm2, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I0922 23:08:59.324066 3835227 config.go:177] Loaded profile config "minikube": Driver=kvm2, ContainerRuntime=docker, KubernetesVersion=v1.22.2
I0922 23:08:59.324583 3835227 main.go:130] libmachine: Found binary path at /usr/local/google/home/aprindle/.minikube/bin/docker-machine-driver-kvm2
I0922 23:08:59.324633 3835227 main.go:130] libmachine: Launching plugin server for driver kvm2
I0922 23:08:59.342676 3835227 main.go:130] libmachine: Plugin server listening at address 127.0.0.1:42125
Tags used in deployment:
- leeroy-web -> leeroy-web:a0d77fd6d4ae87c49f6a828074704298c4e1ba0774455108668f67e8cbd2df0c
- leeroy-app -> leeroy-app:46fdb7ddd2ad1ec3144418b6c8133be7a51b5102cb707ef8abd0e7da5f6f43c1
- base -> base:3e11d3f611f0265d893bce94213b1cda923a5191d0164b41ed84443fbbbb1ec5
Starting deploy...
- deployment.apps/leeroy-app configured
Waiting for deployments to stabilize...
- deployment/leeroy-web is ready. [1/2 deployment(s) still pending]
- deployment/leeroy-app is ready.
Deployments stabilized in 2.101 seconds
CHECK_SUCCESS > > entry:"Resource deployment/leeroy-app status completed successfully"
2021/08/10 16:31:00 received event: timestamp:<seconds:1628638260 nanos:129176198 > event:<statusCheckEvent:<status:"Succeeded" > > entry:"Status check succeeded"
2021/08/10 16:31:00 received event: timestamp:<seconds:1628638260 nanos:129445141 > event:<devLoopEvent:<iteration:1 status:"Succeeded" > > entry:"Update succeeded"
INFO[0018] Dev loop iteration 1 is complete, next dev loop...
INFO[0018] arglen: 10, Parsed args [[sh -c "sleep 1; printf "// test comment\n" >> leeroy-app/app.go"]]
INFO[0018] 'sh -c' prefix found, modifying command args
INFO[0018] Running [[sh -c ""sleep 1; printf "// test comment\n" >> leeroy-app/app.go""]] in /tmp/802435253
INFO[0019] ran [sh -c ""sleep 1; printf "// test comment\n" >> leeroy-app/app.go""], got output:
INFO[0020] successfully connected to grpc client
2021/08/10 16:31:02 received event: timestamp:<seconds:1628638241 nanos:932081535 > event:<metaEvent:<entry:"Startin
@aaron-prindle
aaron-prindle / gist:c93e1e66e34e37338b9fa19d302cefb8
Created July 27, 2021 19:43
Full logs for #6292 investigation - working using --default-repo
aprindle@aprindle ~/hello-k8s [(HEAD detached from origin/tutorial)]$ skaffold build --default-repo=aaronprindle
Generating tags...
- hello-k8s -> aaronprindle/hello-k8s:ddf6533-dirty
Checking cache...
- hello-k8s: Not found. Building
Starting build...
Found [minikube] context, using local docker daemon.
Building [hello-k8s]...
Sending build context to Docker daemon 4.608kB
Step 1/8 : from node:14.17.3
### Alternative Solutions
#### Alternative flag to `-f` (new flag `-w`) to set working directory
Explicit flag specify working directory
Skaffold will effectively set its working directory to the specified path.
```
$ skaffold build -f path/to/skaffold.yaml -W path/to
```
- Pros:
- Very flexible
- Cons:
aprindle@aprindle ~/minikube [trace-test]$ docker logs d46c8469a097
+ configure_containerd
++ stat -f -c %T /kind
+ [[ overlayfs == \z\f\s ]]
+ configure_proxy
+ mkdir -p /etc/systemd/system.conf.d/
+ [[ ! -z '' ]]
+ cat
+ fix_kmsg
+ [[ ! -e /dev/kmsg ]]
@aaron-prindle
aaron-prindle / gist:f99a43da2089a5412e88dca11005d034
Created June 4, 2021 23:27
Minikube in a container errors
aprindle@aprindle ~/skaffold [minikube-in-container]$ make integration-in-minikube
time docker build \
--build-arg GCP_PROJECT=k8s-skaffold \
-f deploy/skaffold/Dockerfile \
--target builder \
-t gcr.io/k8s-skaffold/skaffold-builder \
.
Sending build context to Docker daemon 163.2MB
Step 1/4 : ARG GCP_PROJECT=k8s-skaffold
@aaron-prindle
aaron-prindle / gist:29553ed2c902401566ca93fd2ff850c8
Created April 16, 2021 05:47
unable to repro skaffold test issue, works repeatedly
Listing files to watch...
- test-image
- base
- sample-app-backend-dev
- sample-app-frontend-dev
Generating tags...
- test-image -> gcr.io/aprindle-billing-test/test-image:v0.0.1-alpha.1-51-g2859606-dirty
- base -> gcr.io/aprindle-billing-test/base:v0.0.1-alpha.1-51-g2859606
- sample-app-backend-dev -> gcr.io/aprindle-billing-test/sample-app-backend-dev:v0.0.1-alpha.1-51-g2859606-dirty
- sample-app-frontend-dev -> gcr.io/aprindle-billing-test/sample-app-frontend-dev:v0.0.1-alpha.1-51-g2859606-dirty