Skip to content

Commit

Permalink
Merge pull request #1211 from balopat/v0170_v2
Browse files Browse the repository at this point in the history
cut v0.17.0
  • Loading branch information
balopat authored Oct 26, 2018
2 parents bc8a69a + 1fed9a8 commit 77a98b7
Show file tree
Hide file tree
Showing 20 changed files with 3,128 additions and 6 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# v0.17.0 Release - 10/26/2018

Note: This release comes with a config change, use `skaffold fix` to upgrade your config to `v1alpha4`.

New Features:

* Add cloudbuild.yaml for releasing docs-controller image [#1202](https://github.com/GoogleContainerTools/skaffold/pull/1202)
* Add support for setting default-repo in global config [#1057](https://github.com/GoogleContainerTools/skaffold/pull/1057)
* Add support for building Maven multimodule projects [#1152](https://github.com/GoogleContainerTools/skaffold/pull/1152)
* Azure Container Registry runner [#1107](https://github.com/GoogleContainerTools/skaffold/pull/1107)

Bug fixes:

* Improve Kaniko builder [#1168](https://github.com/GoogleContainerTools/skaffold/pull/1168)
* Use os.SameFile() to check for mvnw working-dir echo bug [#1167](https://github.com/GoogleContainerTools/skaffold/pull/1167)
* Fix kaniko default behaviour [#1139](https://github.com/GoogleContainerTools/skaffold/pull/1139)

Updates:

* Change SkaffoldOption Labeller to not include a comma in the label value [#1169](https://github.com/GoogleContainerTools/skaffold/pull/1169)
* Remove annoying log [#1163](https://github.com/GoogleContainerTools/skaffold/pull/1163)
* Prepare next version of the config file [#1146](https://github.com/GoogleContainerTools/skaffold/pull/1146)
* Improve error handling for `completion` command [#1206](https://github.com/GoogleContainerTools/skaffold/pull/1206)
* Jib sample [#1147](https://github.com/GoogleContainerTools/skaffold/pull/1147)
* Node.js example with dependency handling and hot-reload [#1148](https://github.com/GoogleContainerTools/skaffold/pull/1148)

Huge thank you for this release towards our contributors:
- Balint Pato
- Brian de Alwis
- Cedric Kring
- David Gageot
- Geert-Johan Riemer
- Martino Fornasa
- Matt Rickard
- Nick Kubala
- Priya Wadhwa
- foo0x29a
- varunkashyap


# v0.16.0 Release - 10/11/2018

New Features:
Expand Down
8 changes: 7 additions & 1 deletion examples/README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
== Examples
:icons: font

To run any of the examples, replace `k8s-project` with your GCP project ID.
To run the examples, you either have to manually replace the image repositories in the examples from gcr.io/k8s-skaffold to yours or you can point skaffold to your default image repository in one of the four ways:

* flag: `skaffold dev --default-repo <myrepo>`
* env var: `SKAFFOLD_DEFAULT_REPO=<myrepo> skaffold dev`
* global skaffold config (one time): `skaffold config set --global default-repo <myrepo>`
* skaffold config for current kubectl context: `skaffold config set default-repo <myrepo>`
These examples are made to work with the latest release of skaffold.

If you are running skaffold at HEAD or have built it from source, please use the examples at integration/examples.
Expand Down
6 changes: 6 additions & 0 deletions examples/acr/Dockerfile
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
34 changes: 34 additions & 0 deletions examples/acr/README.adoc
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::[]
8 changes: 8 additions & 0 deletions examples/acr/k8s-pod.yaml
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
13 changes: 13 additions & 0 deletions examples/acr/main.go
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)
}
}
10 changes: 10 additions & 0 deletions examples/acr/skaffold.yaml
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-*
16 changes: 14 additions & 2 deletions examples/annotated-skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ build:
# project: projectname # selects which gradle project to build

# This next section is where you'll put your specific builder configuration.
# Valid builders are `local`, `googleCloudBuild` and `kaniko`.
# Valid builders are `local`, `googleCloudBuild`, `kaniko`, and `acr`.
# Defaults to `local: {}`

# Pushing the images can be skipped. If no value is specified, it'll default to
Expand Down Expand Up @@ -120,6 +120,19 @@ build:
# namespace: default
# timeout: 20m

# Docker artifacts can be built on an Azure Container Registry.
# If Azure CLI is configured properly, you're logged in and have access to the registry,
# you can use:
#
# acr: {}
#
# otherwise you need to provide the credentials manually
# acr:
# subscriptionId: SUBSCRIPTION_ID
# tenantId: TENANT_ID
# clientId: CLIENT_ID
# clientSecret: CLIENT_SECRET

# The deploy section has all the information needed to deploy. Along with build:
# it is a required section.
deploy:
Expand Down Expand Up @@ -189,4 +202,3 @@ profiles:
build:
googleCloudBuild:
projectId: k8s-skaffold

16 changes: 16 additions & 0 deletions examples/nodejs/README.adoc
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`


2 changes: 2 additions & 0 deletions examples/nodejs/backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*.swp
2 changes: 2 additions & 0 deletions examples/nodejs/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
*.swp
7 changes: 7 additions & 0 deletions examples/nodejs/backend/Dockerfile
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
7 changes: 7 additions & 0 deletions examples/nodejs/backend/index.js
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}!`))
10 changes: 10 additions & 0 deletions examples/nodejs/backend/k8s/pod.yaml
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
Loading

0 comments on commit 77a98b7

Please sign in to comment.