mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add sumokube to stable (#314)
* Add sumokube to stable * add the suffix of the app/chart to object names
This commit is contained in:
committed by
Lachlan Evenson
parent
44007c50e7
commit
f9e4e6edc5
Executable
+13
@@ -0,0 +1,13 @@
|
||||
name: sumokube
|
||||
version: 0.1.0
|
||||
description: Sumologic Log Collector
|
||||
keywords:
|
||||
- monitoring
|
||||
- logging
|
||||
sources:
|
||||
- https://github.com/SumoLogic/sumologic-collector-docker
|
||||
maintainers:
|
||||
- name: Jason DuMars
|
||||
email: jdumars+github@gmail.com
|
||||
- name: Sean Knox
|
||||
email: knoxville+github@gmail.com
|
||||
@@ -0,0 +1,73 @@
|
||||
#SumoKube 
|
||||
|
||||
[Sumo Logic](https://www.sumologic.com/) is a hosted logging platform.
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart adds the Sumo Logic Collector 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 Sumo Logic Access ID and key from using the instructions found at [Sumo Logic Access Keys](https://help.sumologic.com/Manage/Security/Access_Keys) and run:
|
||||
|
||||
```bash
|
||||
$ helm install --name my-release \
|
||||
--set sumologic.accessId=YOUR-ID-HERE,sumologic.accessKey=YOUR-KEY-HERE stable/sumokube
|
||||
```
|
||||
|
||||
After a few minutes, you should see logs available in Sumo Logic.
|
||||
|
||||
> **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 Sumokube chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|-----------------------------|------------------------------------|-------------------------------------------|
|
||||
| `sumologic.accessId` | Your Sumo Logic access ID key | `Nil` You must provide your own id |
|
||||
| `sumologic.accessKey` | Your Sumo Logic access key | `Nil` You must provide your own key |
|
||||
| `sumologic.collectorName` | Sumo Logic collector name | `kubernetes-collector` |
|
||||
| `sumologic.categoryName` | Source category name | `kubernetes` |
|
||||
| `sumologic.multilineProcessingEnabled` | Enable if working with multi-line messages | `false` |
|
||||
| `sumologic.automaticDateParsing` | Determines if timestamp information is parsed or not | `true` |
|
||||
| `sumologic.forceTimeZone` | Force the Source to use a specific time zone | `false` |
|
||||
| `sumologic.pathExpression` | Path to your container logs | `/var/log/containers/*.log` |
|
||||
| `image.name` | The image repository and name to pull from | `sumologic/collector` |
|
||||
| `image.tag` | The image tag to pull | `latest` |
|
||||
| `imagePullPolicy` | Image pull policy | `IfNotPresent` |
|
||||
| `resources.requests.cpu` | CPU resource requests | 100m |
|
||||
| `resources.limits.cpu` | CPU resource limits | 256m |
|
||||
| `resources.requests.memory` | Memory resource requests | 128Mi |
|
||||
| `resources.limits.memory` | Memory resource limits | 256Mi |
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```bash
|
||||
$ helm install --name my-release \
|
||||
--set sumologic.accessId=YOUR-ID-HERE,sumologic.accessKey=YOUR-KEY-HERE,sumologic.categoryName=my-source-category-name \
|
||||
stable/sumokube
|
||||
```
|
||||
|
||||
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/sumokube
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,23 @@
|
||||
{{- if and .Values.sumologic.accessId .Values.sumologic.accessKey -}}
|
||||
Sumo Logic agents are spinning up on each node in your cluster. After a few
|
||||
minutes, you should see logs available in Sumo Logic.
|
||||
|
||||
No further action should be required.
|
||||
|
||||
{{- else -}}
|
||||
##############################################################################
|
||||
#### ERROR: You did not set a sumologic.accessId or sumologic.accessKey ####
|
||||
##############################################################################
|
||||
|
||||
This deployment will be incomplete until you provide your API access ID and key
|
||||
from Sumo Logic.
|
||||
|
||||
Retrieve your Sumo Logic Access ID and key from using the instructions found at
|
||||
[Sumo Logic Access Keys](https://help.sumologic.com/Manage/Security/Access_Keys)
|
||||
|
||||
Then run:
|
||||
|
||||
helm upgrade {{ .Release.Name }} \
|
||||
--set sumologic.accessId=YOUR-ID-HERE,sumologic.accessKey=YOUR-KEY-HERE stable/sumokube
|
||||
|
||||
{{- end }}
|
||||
@@ -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 -}}
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
metadata:
|
||||
name: "{{ template "fullname" . }}-config-{{.Release.Time.Seconds }}"
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
"helm.sh/created": {{.Release.Time.Seconds | quote }}
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
data:
|
||||
sumo-sources.json: |-
|
||||
{
|
||||
"api.version": "v1",
|
||||
"sources": [
|
||||
{
|
||||
"sourceType" : "LocalFile",
|
||||
"name": "kubernetes-localfile",
|
||||
"pathExpression": {{ default "/var/log/containers/*.log" .Values.sumologic.pathExpression | quote }},
|
||||
"multilineProcessingEnabled": {{ default false .Values.sumologic.multilineProcessingEnabled }},
|
||||
"automaticDateParsing": {{ default true .Values.sumologic.automaticDateParsing }},
|
||||
"category": {{ default "kubernetes" .Values.sumologic.categoryName | quote }},
|
||||
"forceTimeZone": {{ default false .Values.sumologic.forceTimeZone }}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
{{- if and .Values.sumologic.accessId .Values.sumologic.accessKey -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
serviceAccount: {{ template "fullname" . }}
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
image: "{{.Values.image.name}}:{{.Values.image.tag}}"
|
||||
imagePullPolicy: {{.Values.image.pullPolicy}}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: varlog
|
||||
mountPath: /var/log
|
||||
- name: varlibdockercontainers
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
- name: sumo-sources
|
||||
mountPath: /etc/sumologic
|
||||
readOnly: true
|
||||
env:
|
||||
- name: SUMO_ACCESS_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ template "fullname" . }}-secrets-{{.Release.Time.Seconds }}"
|
||||
key: access-id
|
||||
- name: SUMO_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ template "fullname" . }}-secrets-{{.Release.Time.Seconds }}"
|
||||
key: access-key
|
||||
- name: SUMO_COLLECTOR_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ template "fullname" . }}-secrets-{{.Release.Time.Seconds }}"
|
||||
key: collector-name
|
||||
- name: SUMO_SOURCES_JSON
|
||||
value: "/etc/sumologic/sumo-sources.json"
|
||||
volumes:
|
||||
- name: varlog
|
||||
hostPath:
|
||||
path: /var/log
|
||||
- name: varlibdockercontainers
|
||||
hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
- name: sumo-sources
|
||||
configMap:
|
||||
name: "{{ template "fullname" . }}-config-{{.Release.Time.Seconds }}"
|
||||
{{ end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: "{{ template "fullname" . }}-secrets-{{.Release.Time.Seconds }}"
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
"helm.sh/created": {{.Release.Time.Seconds | quote }}
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
type: Opaque
|
||||
data:
|
||||
access-id: {{ default "MISSING" .Values.sumologic.accessId | b64enc | quote }}
|
||||
access-key: {{ default "MISSING" .Values.sumologic.accessKey | b64enc | quote }}
|
||||
collector-name: {{ default "kubernetes" .Values.sumologic.collectorName | b64enc | quote }}
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
@@ -0,0 +1,31 @@
|
||||
# Default values for sumokube.
|
||||
image:
|
||||
name: sumologic/collector
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
sumologic:
|
||||
## You'll need to set this to your Sumologic API access key and access ID
|
||||
## before the agent will run.
|
||||
## ref: https://help.sumologic.com/Manage/Security/Access_Keys
|
||||
##
|
||||
# accessId:
|
||||
# accessKey:
|
||||
|
||||
collectorName: "kubernetes-collector"
|
||||
|
||||
## A full list of configurable JSON source options can be found at:
|
||||
## https://help.sumologic.com/Send_Data/Sources/03Use_JSON_to_Configure_Sources
|
||||
# categoryName: "kubernetes"
|
||||
# multilineProcessingEnabled:
|
||||
# automaticDateParsing:
|
||||
# forceTimeZone:
|
||||
# pathExpression:
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
Reference in New Issue
Block a user