-
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.
Merge pull request #1211 from balopat/v0170_v2
cut v0.17.0
- Loading branch information
Showing
20 changed files
with
3,128 additions
and
6 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,6 @@ | ||
FROM golang:alpine | ||
|
||
WORKDIR /go/src/github.com/GoogleCloudPlatform/skaffold | ||
CMD ["./app"] | ||
COPY main.go . | ||
RUN go build -o app main.go |
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,34 @@ | ||
=== Example: Azure Container Registry | ||
:icons: font | ||
|
||
This is an example demonstrating | ||
|
||
* *building* a single go file app and with a single stage `Dockerfile` using https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick-task[ACR build] | ||
* *tagging* using the default tagPolicy (`gitCommit`) | ||
* *deploying* a single container pod using `kubectl` | ||
ifndef::env-github[] | ||
==== Example files | ||
link:{github-repo-tree}/examples/acr[see on Github icon:github[]] | ||
|
||
[source,yaml, indent=3, title=skaffold.yaml] | ||
---- | ||
include::skaffold.yaml[] | ||
---- | ||
|
||
[source,go, indent=3, title=main.go, syntax=go] | ||
---- | ||
include::main.go[] | ||
---- | ||
|
||
[source,docker, indent=3, title=Dockerfile] | ||
---- | ||
include::Dockerfile[] | ||
---- | ||
|
||
[source,yaml, indent=3, title=k8s-pod.yaml] | ||
---- | ||
include::k8s-pod.yaml[] | ||
---- | ||
|
||
endif::[] |
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-acr | ||
spec: | ||
containers: | ||
- name: getting-started | ||
image: registry.azurecr.io/skaffold-example |
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,13 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"time" | ||
) | ||
|
||
func main() { | ||
for { | ||
fmt.Println("Hello world!") | ||
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,10 @@ | ||
apiVersion: skaffold/v1alpha4 | ||
kind: Config | ||
build: | ||
artifacts: | ||
- image: myregistry.azurecr.io/skaffold-example | ||
acr: {} | ||
deploy: | ||
kubectl: | ||
manifests: | ||
- k8s-* |
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,16 @@ | ||
=== Example: Node.js with hot-reload | ||
:icons: font | ||
|
||
Simple example based on Node.js demonstrating the file synchronization mode. | ||
|
||
==== Init | ||
`skaffold dev` | ||
|
||
==== Workflow | ||
* Make some changes to `index.js`: | ||
** The file will be synchronized to the cluster | ||
** `nodemon` will restart the application | ||
* Make some changes to `package.json`: | ||
** The full build/push/deploy process will be triggered, fetching dependencies from `npm` | ||
|
||
|
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,2 @@ | ||
node_modules | ||
*.swp |
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,2 @@ | ||
node_modules | ||
*.swp |
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 node:8.12.0-alpine | ||
|
||
WORKDIR /opt/backend | ||
CMD ["npm", "run", "dev"] | ||
|
||
COPY . . | ||
RUN npm install |
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 @@ | ||
const express = require('express') | ||
const app = express() | ||
const port = 3000 | ||
|
||
app.get('/', (req, res) => res.send('Hello World!')) | ||
|
||
app.listen(port, () => console.log(`Example app listening on port ${port}!`)) |
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,10 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: node | ||
spec: | ||
containers: | ||
- name: node | ||
image: gcr.io/k8s-skaffold/node-example | ||
ports: | ||
- containerPort: 3000 |
Oops, something went wrong.