Skip to content

Commit

Permalink
Fix Docs: Change Imagepull policy to IfNotpresent / Add loki-canary b…
Browse files Browse the repository at this point in the history
…ase manifests (#1073)
  • Loading branch information
flouthoc authored and rfratto committed Sep 26, 2019
1 parent 0024540 commit 1f0b7cc
Showing 1 changed file with 83 additions and 1 deletion.
84 changes: 83 additions & 1 deletion docs/operations/loki-canary.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $ docker pull grafana/loki-canary:v0.2.0
To run on Kubernetes, you can do something simple like:

`kubectl run loki-canary --generator=run-pod/v1
--image=grafana/loki-canary:latest --restart=Never --image-pull-policy=Never
--image=grafana/loki-canary:latest --restart=Never --image-pull-policy=IfNotPresent
--labels=name=loki-canary -- -addr=loki:3100`

Or you can do something more complex like deploy it as a DaemonSet, there is a
Expand Down Expand Up @@ -97,6 +97,88 @@ loki_canary {
}
}
```
#### Examples

Standalone Pod Implementation of loki-canary

```
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: loki-canary
name: loki-canary
name: loki-canary
spec:
containers:
- args:
- -addr=loki:3100
image: grafana/loki-canary:latest
imagePullPolicy: IfNotPresent
name: loki-canary
resources: {}
---
apiVersion: v1
kind: Service
metadata:
name: loki-canary
labels:
app: loki-canary
spec:
type: ClusterIP
selector:
app: loki-canary
ports:
- name: metrics
protocol: TCP
port: 3500
targetPort: 3500
```

DeamonSet Implementation of loki-canary

```
---
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
labels:
app: loki-canary
name: loki-canary
name: loki-canary
spec:
template:
metadata:
name: loki-canary
labels:
app: loki-canary
spec:
containers:
- args:
- -addr=loki:3100
image: grafana/loki-canary:latest
imagePullPolicy: IfNotPresent
name: loki-canary
resources: {}
---
apiVersion: v1
kind: Service
metadata:
name: loki-canary
labels:
app: loki-canary
spec:
type: ClusterIP
selector:
app: loki-canary
ports:
- name: metrics
protocol: TCP
port: 3500
targetPort: 3500
```


### From Source

Expand Down

0 comments on commit 1f0b7cc

Please sign in to comment.