Skip to content

Commit

Permalink
First public version of the Sysdig Helm package (helm#735)
Browse files Browse the repository at this point in the history
* First public version of the Sysdig Helm package

* Add default resources values

* Fixes in documentation

* Fix typo

* Modify resource values to recommended ones

* Rename to Sysdig Monitor

* Add missing resources definition

* Add a consistent label set to the daemonset
  • Loading branch information
bencer authored and seanknox committed May 4, 2017
1 parent 78aca2f commit 084d7b5
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 0 deletions.
18 changes: 18 additions & 0 deletions stable/sysdig/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: sysdig
version: 0.2.0
description: Sysdig Monitor Agent.
keywords:
- monitoring
- alerting
- metric
- troubleshooting
home: https://www.sysdig.com/
icon: https://app.sysdigcloud.com/images/changelogs/sysdig_monitor.png
sources:
- https://app.sysdigcloud.com/#/settings/user
- https://github.com/draios/sysdig
maintainers:
- name: Lachlan Evenson
email: lachlan@deis.com
- name: Jorge Salamero
email: jorge.salamero@sysdig.com
63 changes: 63 additions & 0 deletions stable/sysdig/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Sysdig

[Sysdig Monitor](https://www.sysdig.com/) is a container native monitoring and troubleshooting platform.

## Introduction

This chart adds the Sysdig Monitor Agent to all nodes in your cluster via a DaemonSet.

## Prerequisites

- Kubernetes 1.2+ with Beta APIs enabled

## Installing the Chart

To install the chart with the release name `my-release`, retrieve your Sysdig Monitor Access Key from your [Account Settings](https://app.sysdigcloud.com/#/settings/user) and run:

```bash
$ helm install --name my-release \
--set sysdig.AccessKey=YOUR-KEY-HERE stable/sysdig
```

After a few minutes, you should see hosts and containers appearing in Sysdig Monitor.

> **Tip**: List all releases using `helm list`
## Uninstalling the Chart

To uninstall/delete the `my-release` deployment:

```bash
$ helm delete my-release
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following tables lists the configurable parameters of the Sysdig chart and their default values.

| Parameter | Description | Default |
|-----------------------------|------------------------------------|-------------------------------------------|
| `sysdig.AccessKey` | Your Sysdig Monitor Access Key | `Nil` You must provide your own key |
| `sysdig.AgentTags` | String with tags for the agent | Empty |
| `image.repository` | The image repository to pull from | `sysdig/agent` |
| `image.tag` | The image tag to pull | `latest` |
| `image.pullPolicy` | The Image pull policy | `Always` |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

```bash
$ helm install --name my-release \
--set sysdig.AccessKey=YOUR-KEY-HERE,sysdig.AgentTags="role:webserver,location:europe" \
stable/sysdig
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
$ helm install --name my-release -f values.yaml stable/sysdig
```

> **Tip**: You can use the default [values.yaml](values.yaml)
25 changes: 25 additions & 0 deletions stable/sysdig/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.sysdig.AccessKey -}}
Sysdig Monitor agents are spinning up on each node in your cluster. After a few
seconds, you should see your hosts appearing in the Explore tab:

https://app.sysdigcloud.com/#/explore/overview/l:10

No further action should be required.

{{- else -}}
##############################################################################
#### ERROR: You did not set a sysdig.AccessKey. ####
##############################################################################

This deployment will be incomplete until you get your Sysdig Monitor Access Key.
Sing up for a free Sysdig Monitor trial at https://sysdig.com/sign-up/

Once registered you can get your Access Key at:

https://app.sysdigcloud.com/#/settings/user

Then run:

helm upgrade {{ .Release.Name }} \
--set sysdig.AccessKey=YOUR-KEY-HERE stable/sysdig
{{- end }}
16 changes: 16 additions & 0 deletions stable/sysdig/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
{{- end -}}
77 changes: 77 additions & 0 deletions stable/sysdig/templates/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{{- if .Values.sysdig.AccessKey }}
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
template:
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
spec:
volumes:
- name: docker-sock
hostPath:
path: /var/run/docker.sock
- name: dev-vol
hostPath:
path: /dev
- name: proc-vol
hostPath:
path: /proc
- name: boot-vol
hostPath:
path: /boot
- name: modules-vol
hostPath:
path: /lib/modules
- name: usr-vol
hostPath:
path: /usr
hostNetwork: true
hostPID: true
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{ toYaml .Values.resources | indent 12 }}
securityContext:
privileged: true
env:
- name: ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
key: access-key
- name: TAGS
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
key: tags
volumeMounts:
- mountPath: /host/var/run/docker.sock
name: docker-sock
readOnly: false
- mountPath: /host/dev
name: dev-vol
readOnly: false
- mountPath: /host/proc
name: proc-vol
readOnly: true
- mountPath: /host/boot
name: boot-vol
readOnly: true
- mountPath: /host/lib/modules
name: modules-vol
readOnly: true
- mountPath: /host/usr
name: usr-vol
readOnly: true
{{ end }}
13 changes: 13 additions & 0 deletions stable/sysdig/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
access-key : {{ default "MISSING" .Values.sysdig.AccessKey | b64enc | quote }}
tags : {{ default "" .Values.sysdig.AgentTags | b64enc | quote }}
21 changes: 21 additions & 0 deletions stable/sysdig/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Default values for Sysdig Monitor Helm package.

image:
repository: "sysdig/agent"
tag: "latest"
pullPolicy: "Always"

sysdig:
# Required: You need your Sysdig Monitor access key before running agents.
#AccessKey: ""

# Optional: Key-value agent tags following the format "key:val,key2:val2".
AgentTags: ""

resources:
requests:
cpu: 100m
memory: 512Mi
limits:
cpu: 500m
memory: 768Mi

0 comments on commit 084d7b5

Please sign in to comment.