Skip to content

Commit

Permalink
add kubernetes example
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspernissen committed Jan 16, 2019
1 parent 9681991 commit ad98b90
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ FROM scratch
ENTRYPOINT [ "/humio_exporter" ]
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /tmp/humio_exporter /
COPY queries.yaml /
COPY examples/queries.yaml /
53 changes: 53 additions & 0 deletions examples/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: humio-exporter
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
app: humio-exporter
template:
metadata:
name: humio-exporter
labels:
app: humio-exporter
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '9534'
spec:
volumes:
- name: config
configMap:
name: humio-exporter-config
containers:
- name: humio-exporter
image: quay.io/lunarway/humio_exporter:v0.0.1
args: ["--humio.api-token", "$(HUMIO_API_TOKEN)",
"--humio.url", "http://humio-log.logging:8080",
"--config", "/etc/humio_exporter/queries.yaml",
"--log.level", "debug"]
env:
- name: HUMIO_API_TOKEN
valueFrom:
secretKeyRef:
key: humio.api-token
name: humio-exporter
livenessProbe:
httpGet:
path: /healthz
port: 9534
readinessProbe:
httpGet:
path: /ready
port: 9534
initialDelaySeconds: 5
periodSeconds: 30
failureThreshold: 5
ports:
- name: scrape
containerPort: 9534
volumeMounts:
- name: config
mountPath: /etc/humio_exporter
File renamed without changes.
7 changes: 7 additions & 0 deletions examples/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: humio-exporter
namespace: monitoring
data:
humio.api-token: <api-token>

0 comments on commit ad98b90

Please sign in to comment.