This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a2c5e9
commit 0a9e98a
Showing
8 changed files
with
221 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
description: Scalyr Agent | ||
home: https://www.scalyr.com | ||
icon: https://www.scalyr.com/s2/src/img/logo-reverse.png | ||
keywords: | ||
- monitoring | ||
- alerting | ||
- logging | ||
maintainers: | ||
- email: [email protected] | ||
name: Pierre Ozoux | ||
name: scalyr | ||
sources: | ||
- https://www.scalyr.com/help/install-agent-docker | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Scalyr | ||
|
||
[Scalyr](https://www.scalyr.com/) is a hosted infrastructure logging platform. | ||
|
||
## Introduction | ||
|
||
This chart adds the Scalyr 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 Scalyr API key from your account and run: | ||
|
||
```bash | ||
$ helm install --name my-release \ | ||
--set scalyr.apiKey=YOUR-KEY-HERE stable/scalyr | ||
``` | ||
|
||
After a few minutes, you should see hosts and logs being reported in scalyr. | ||
|
||
> **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 Datadog chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
|-----------------------------|------------------------------------|-------------------------------------------| | ||
| `scalyr.apiKey` | Your Scalyr API key | `Nil` You must provide your own key | | ||
| `scalyr.config.reportContainerMetrics` | Report container metrics. | `false` | | ||
| `image.repository` | The image repository to pull from | `datadog/docker-dd-agent` | | ||
| `image.tag` | The image tag to pull | `latest` | | ||
| `imagePullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `resources.requests.cpu` | CPU resource requests | 128M | | ||
| `resources.limits.cpu` | CPU resource limits | 512Mi | | ||
| `resources.requests.memory` | Memory resource requests | 50m | | ||
| `resources.limits.memory` | Memory resource limits | 256m | | ||
|
||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```bash | ||
$ helm install --name my-release \ | ||
--set scalyr.apiKey=YOUR-KEY-HERE \ | ||
stable/scalyr | ||
``` | ||
|
||
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/scalyr | ||
``` | ||
|
||
> **Tip**: You can use the default [values.yaml](values.yaml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{{- if .Values.scalyr.apiKey -}} | ||
Scalyr agents are spinning up on each node in your cluster. After a few | ||
minutes, you should see your agents starting in your event stream: | ||
|
||
https://www.scalyr.com/logStart | ||
|
||
No further action should be required. | ||
|
||
{{- else -}} | ||
############################################################################## | ||
#### ERROR: You did not set a scalyr.apiKey. #### | ||
############################################################################## | ||
|
||
This deployment will be incomplete until you get your API key from Scalyr. | ||
Once registered you can request an API key at: | ||
|
||
https://www.scalyr.com/ | ||
|
||
Then run: | ||
|
||
helm upgrade {{ .Release.Name }} \ | ||
--set scalyr.apiKey=YOUR-KEY-HERE stable/scalyr | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 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 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
app: {{ template "name" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
data: | ||
agent.json: |- | ||
{ | ||
implicit_metric_monitor: false, | ||
implicit_agent_process_metrics_monitor: false, | ||
import_vars: [ "API_KEY" ], | ||
api_key: "$API_KEY", | ||
monitors: [{ | ||
module: "scalyr_agent.builtin_monitors.docker_monitor", | ||
report_container_metrics: {{ .Values.scalyr.config.reportContainerMetrics }} | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{{- if .Values.scalyr.apiKey }} | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
app: {{ template "name" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: "{{ .Release.Service }}" | ||
release: "{{ .Release.Name }}" | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
name: {{ template "fullname" . }} | ||
spec: | ||
tolerations: | ||
- operator: "Exists" | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
resources: | ||
{{ toYaml .Values.resources | indent 12 }} | ||
ports: | ||
env: | ||
- name: API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ template "fullname" . }} | ||
key: api-key | ||
volumeMounts: | ||
- name: dockersocket | ||
mountPath: /var/scalyr/docker.sock | ||
readOnly: true | ||
- name: configuration | ||
mountPath: /etc/scalyr-agent-2 | ||
volumes: | ||
- name: dockersocket | ||
hostPath: | ||
path: /var/run/docker.sock | ||
- name: configuration | ||
configMap: | ||
name: {{ template "fullname" . }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
app: {{ template "name" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
type: Opaque | ||
data: | ||
api-key: {{ required "A valid .Values.scalyr.apiKey entry required!" .Values.scalyr.apiKey | b64enc | quote }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Default values for scalyr. | ||
image: | ||
repository: scalyr/scalyr-docker-agent | ||
tag: 2.0.27 | ||
pullPolicy: IfNotPresent | ||
|
||
scalyr: | ||
## You'll need to set this to your Scalyr API key before the agent will run. | ||
## ref: https://www.scalyr.com | ||
## | ||
# apiKey: | ||
config: | ||
reportContainerMetrics: false | ||
|
||
# resources: | ||
# requests: | ||
# cpu: 50m | ||
# memory: 128Mi | ||
# limits: | ||
# cpu: 256m | ||
# memory: 512Mi |