-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure log tailing works with pods and deployments
Signed-off-by: David Gageot <david@gageot.net>
- Loading branch information
Showing
8 changed files
with
131 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM golang:1.12.9-alpine3.10 as builder | ||
COPY main.go . | ||
RUN go build -o /app main.go | ||
|
||
FROM alpine:3.10 | ||
CMD ["./app"] | ||
COPY --from=builder /app . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: getting-started | ||
labels: | ||
app: getting-started | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: getting-started | ||
template: | ||
metadata: | ||
labels: | ||
app: getting-started | ||
spec: | ||
containers: | ||
- name: getting-started | ||
image: skaffold-hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: getting-started | ||
spec: | ||
containers: | ||
- name: getting-started | ||
image: skaffold-hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
) | ||
|
||
func main() { | ||
for counter := 0; ; counter++ { | ||
fmt.Println("Hello world!", counter) | ||
|
||
time.Sleep(time.Second * 1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: skaffold/v2beta3 | ||
kind: Config | ||
build: | ||
artifacts: | ||
- image: skaffold-hello | ||
|
||
profiles: | ||
- name: pod | ||
deploy: | ||
kubectl: | ||
manifests: | ||
- k8s/pod.yaml | ||
- name: deployment | ||
deploy: | ||
kubectl: | ||
manifests: | ||
- k8s/deployment.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters