update readme, bump docker image tag, other minor fixes

pull/52/head
rimas 2017-07-25 14:26:38 +01:00
parent 237129ba51
commit 3d22b3d170
6 changed files with 172 additions and 47 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v1
name: keel
description: Open source, tool for automating Kubernetes deployment updates. Keel is stateless, robust and lightweight.
version: 0.1.1
appversion: 0.4.0-rc.3
version: 0.1.2
appversion: 0.4.0
keywords:
- kubernetes deployment
- helm release

View File

@ -1,22 +1,117 @@
[![CircleCI](https://circleci.com/gh/rusenask/keel/tree/master.svg?style=shield&circle-token=0239846a42cfa188de531058b9a2116a4b8600d8)](https://circleci.com/gh/rusenask/keel/tree/master)
# Keel - automated Kubernetes deployments for the rest of us
* Website [https://keel.sh](https://keel.sh)
* User Guide [https://keel.sh/user-guide/](https://keel.sh/user-guide/)
Keel is a tool for automating [Kubernetes](https://kubernetes.io/) deployment updates. Keel is stateless, robust and lightweight.
## Install for the first time
Keel provides several key features:
Docker image _polling_ is set by default, we also enabling _Helm provider_ support, so Helm releases
can be upgraded when new Docker image is available:
* __[Kubernetes](https://kubernetes.io/) and [Helm](https://helm.sh) providers__ - Keel has direct integrations with Kubernetes and Helm.
* __No CLI/API__ - tired of `***ctl` for everything? Keel doesn't have one. Gets job done through labels, annotations, charts.
* __Semver policies__ - specify update policy for each deployment/Helm release individually.
* __Automatic [Google Container Registry](https://cloud.google.com/container-registry/) configuration__ - Keel automatically sets up topic and subscriptions for your deployment images by periodically scanning your environment.
* __[Native, DockerHub and Quay webhooks](https://keel.sh/user-guide/triggers/#webhooks) support__ - once webhook is received impacted deployments will be identified and updated.
* __[Polling](https://keel.sh/user-guide/#polling-deployment-example)__ - when webhooks and pubsub aren't available - Keel can still be useful by checking Docker Registry for new tags (if current tag is semver) or same tag SHA digest change (ie: `latest`).
* __Notifications__ - out of the box Keel has Slack and standard webhook notifications, more info [here](https://keel.sh/user-guide/#notifications)
**Note**: For now Keel gets installed into `kube-system` _namespace_ by default as where Helm's `Tiller` is installed.
## Installing the Chart with Kubernetes provider support
Docker image _polling_ and _Kubernetes_ provider are set by default, then Kubernetes _deployments_ can be upgraded when new Docker image is available:
```console
helm upgrade --install keel keel"
```
## Installing the Chart with Helm provider support
Docker image _polling_ is set by default, but we need to enable _Helm provider_ support, then Helm _releases_ can be upgraded when new Docker image is available:
```console
helm upgrade --install keel keel --set helmProvider.enabled="true"
```
### Setting up Helm release to be automatically updated by Keel
Add the following to your app's `values.yaml` file and do `helm upgrade ...`:
## Run upgrades e.g. for docker image change
```console
helm upgrade keel keel --reuse-values --set image.tag="0.4.0"
```
keel:
# keel policy (all/major/minor/patch/force)
policy: all
# trigger type, defaults to events such as pubsub, webhooks
trigger: poll
# polling schedule
pollSchedule: "@every 3m"
# images to track and update
images:
- repository: image.repository # it must be the same names as your app's values
tag: image.tag # it must be the same names as your app's values
```
The same can be applied with `--set` flag without using `values.yaml` file:
```
helm upgrade --install whd webhookdemo --reuse-values \
--set keel.policy="all",keel.trigger="poll",keel.pollSchedule="@every 3m" \
--set keel.images[0].repository="image.repository" \
--set keel.images[0].tag="image.tag"
```
You can read in more details about supported policies, triggers and etc in the [User Guide](https://keel.sh/user-guide/).
Also you should check the [Webhooh demo app](https://github.com/webhookrelay/webhook-demo) and it's chart to have more clear
idea how to set automatic updates.
## Uninstalling the Chart
To uninstall/delete the `keel` deployment:
```console
$ helm delete keel
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Configuration
The following table lists has the main configurable parameters (polling, triggers, notifications, service) of the _Keel_ chart and they apply to both Kubernetes and Helm providers:
| Parameter | Description | Default |
| --------------------------------- | -------------------------------------- | --------------------------------------------------------- |
| `polling.enabled` | Docker registries polling | `true` |
| `helmProvider.enabled` | Enable/disable Helm provider | `false` |
| `gcr.enabled` | Enable/disable GCR Registry | `false` |
| `gcr.projectID` | GCP Project ID GCR belongs to | |
| `gcr.pubsub.enabled` | Enable/disable GCP Pub/Sub trigger | `false` |
| `webhook.enabled` | Enable/disable Webhook Notification | `false` |
| `webhook.endpoint` | Remote webhook endpoint | |
| `slack.enabled` | Enable/disable Slack Notification | `false` |
| `slack.token` | Slack token | |
| `slack.channel` | Slack channel | |
| `service.enable` | Enable/disable Keel service | `false` |
| `service.type` | Keel service type | `LoadBalancer` |
| `service.externalPort` | Keel service port | `9300` |
| `webhookRelay.enabled` | Enable/disable WebhookRelay integration| `false` |
| `webhookRelay.key` | WebhookRelay key | |
| `webhookRelay.secret` | WebhookRelay secret | |
| `webhookRelay.bucket` | WebhookRelay bucket | |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
$ helm install --name keel -f values.yaml keel
```
> **Tip**: You can use the default [values.yaml](values.yaml)

View File

@ -3,3 +3,31 @@
To verify that {{ template "name" . }} has started, run:
kubectl --namespace=kube-system get pods -l "app={{ template "name" . }}"
{{- if .Values.service.enabled }}
2. Get your Keel service URL:
{{- if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace kube-system -w {{ template "name" . }}'
export SERVICE_IP=$(kubectl get svc --namespace kube-system {{ template "name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace kube-system -l "app={{ template "name" . }}" -o jsonpath="{.items[0].metadata.name}")
echo http://127.0.0.1:{{ .Values.service.externalPort }}
kubectl port-forward --namespace kube-system $POD_NAME {{ .Values.service.externalPort }}:{{ .Values.service.externalPort }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace kube-system -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "name" . }})
export NODE_IP=$(kubectl get nodes --namespace kube-system -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT/
{{- end }}
{{- end }}

View File

@ -56,11 +56,11 @@ spec:
value: "{{ .Values.slack.channel }}"
{{- end }}
ports:
- containerPort: {{ .Values.service.internalPort }}
- containerPort: 9300
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.service.internalPort }}
port: 9300
initialDelaySeconds: 30
timeoutSeconds: 10
resources:

View File

@ -1,4 +1,4 @@
{{- if .Values.webhook.enabled }}
{{- if .Values.service.enabled }}
apiVersion: v1
kind: Service
metadata:
@ -13,9 +13,9 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
targetPort: 9300
protocol: TCP
name: {{ .Values.service.name }}
name: keel
selector:
app: {{ template "name" . }}
sessionAffinity: None

View File

@ -4,16 +4,9 @@
image:
repository: karolisr/keel
tag: 0.4.0-rc.3
tag: 0.4.0
pullPolicy: IfNotPresent
# Service gets set only if webhook is enabled
service:
name: ui
type: LoadBalancer
externalPort: 9300
internalPort: 9300
# Polling is enabled by default,
# you can disable it setting value below to false
polling:
@ -31,39 +24,39 @@ gcr:
pubSub:
enabled: false
# Webhook Endpoint
# Webhook Notification
# Remote webhook endpoint for notification delivery
webhook:
enabled: false
endpoint: ""
# Webhook Relay integration
# If you dont want to expose your Keel service, you can use https://webhookrelay.com/
# which can deliver webhooks to your internal Keel service through Keel sidecar container.
webhookRelay:
enabled: false
image:
repository: webhookrelay/webhookrelayd
tag: 0.2.7
pullPolicy: IfNotPresent
# webhookrelay.com credentials
key: ""
secret: ""
bucket: ""
# Slack notification
# Slack Notification
slack:
enabled: false
token: ""
channel: ""
# Resources
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 50m
memory: 64Mi
# Keel service
# Enable to receive webhooks from Docker registries
service:
enabled: false
type: LoadBalancer
externalPort: 9300
# Webhook Relay service
# If you dont want to expose your Keel service, you can use https://webhookrelay.com/
# which can deliver webhooks to your internal Keel service through Keel sidecar container.
webhookRelay:
enabled: false
# webhookrelay.com credentials
key: ""
secret: ""
bucket: ""
# webhookrelay docker image
image:
repository: webhookrelay/webhookrelayd
tag: 0.2.7
pullPolicy: IfNotPresent
# Keel self-update
# uncomment lines below if you want Keel to automaticly
@ -80,5 +73,14 @@ keel:
- repository: image.repository
tag: image.tag
# Resources
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 50m
memory: 64Mi
# NodeSelector
nodeSelector: {}