diff --git a/stable/sysdig/Chart.yaml b/stable/sysdig/Chart.yaml new file mode 100755 index 0000000000..9c67229901 --- /dev/null +++ b/stable/sysdig/Chart.yaml @@ -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 diff --git a/stable/sysdig/README.md b/stable/sysdig/README.md new file mode 100644 index 0000000000..5fd695104c --- /dev/null +++ b/stable/sysdig/README.md @@ -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) diff --git a/stable/sysdig/templates/NOTES.txt b/stable/sysdig/templates/NOTES.txt new file mode 100644 index 0000000000..316ef59659 --- /dev/null +++ b/stable/sysdig/templates/NOTES.txt @@ -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 }} diff --git a/stable/sysdig/templates/_helpers.tpl b/stable/sysdig/templates/_helpers.tpl new file mode 100644 index 0000000000..234480de71 --- /dev/null +++ b/stable/sysdig/templates/_helpers.tpl @@ -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 -}} diff --git a/stable/sysdig/templates/daemonset.yaml b/stable/sysdig/templates/daemonset.yaml new file mode 100644 index 0000000000..3ace329ede --- /dev/null +++ b/stable/sysdig/templates/daemonset.yaml @@ -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 }} diff --git a/stable/sysdig/templates/secrets.yaml b/stable/sysdig/templates/secrets.yaml new file mode 100644 index 0000000000..063a26e818 --- /dev/null +++ b/stable/sysdig/templates/secrets.yaml @@ -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 }} diff --git a/stable/sysdig/values.yaml b/stable/sysdig/values.yaml new file mode 100644 index 0000000000..06291d1813 --- /dev/null +++ b/stable/sysdig/values.yaml @@ -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