Skip to content

Commit

Permalink
SC-4784 Add support for custom mount for logagent (helm#13984)
Browse files Browse the repository at this point in the history
Signed-off-by: Alen Komljen <alen.komljen@live.com>
  • Loading branch information
komljen authored and eyenx committed May 28, 2019
1 parent a13efd1 commit 24bd1eb
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 24 deletions.
2 changes: 1 addition & 1 deletion stable/sematext-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: "1.0"
version: 1.0.5
version: 1.0.6
description: Helm chart for deploying Sematext Agent to Kubernetes
keywords:
- sematext
Expand Down
47 changes: 24 additions & 23 deletions stable/sematext-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,30 @@ The command removes all the Kubernetes components associated with the chart and

The following table lists the configuration parameters of the `sematext-agent` chart and default values.

| Parameter | Description | Default |
|-------------------------------|--------------------------------------|-------------------------------------------|
| `containerToken` | Sematext Container token | `Nil` Provide your Container token |
| `logseneToken` | Sematext Logsene token | `Nil` Provide your Logsene token |
| `region` | Sematext region | `US` Sematext US or EU region |
| `agent.image.repository` | The image repository | `sematext/agent` |
| `agent.image.tag` | The image tag | `latest` |
| `agent.image.pullPolicy` | Image pull policy | `Always` |
| `agent.service.port` | Service port | `80` |
| `agent.service.type` | Service type | `ClusterIP` |
| `agent.resources` | Agent resources | `{}` |
| `logagent.image.repository` | The image repository | `sematext/logagent` |
| `logagent.image.tag` | The image tag | `latest` |
| `logagent.image.pullPolicy` | Image pull policy | `Always` |
| `logagent.resources` | Logagent resources | `{}` |
| `customUrl.serverBaseUrl` | Custom Base URL | `Nil` |
| `customUrl.logsReceiverUrl` | Custom Logsene receiver URL | `Nil` |
| `customUrl.eventsRecieverUrl` | Custom Event receiver URL | `Nil` |
| `serviceAccount.create` | Create a service account | `true` |
| `serviceAccount.name` | Service account name | `Nil` Defaults to chart name |
| `rbac.create` | RBAC enabled | `true` |
| `tolerations` | Tolerations | `[]` |
| `nodeSelector` | Node selector | `{}` |
| Parameter | Description | Default |
|----------------------------------|-----------------------------------|-------------------------------------------|
| `containerToken` | Sematext Container token | `Nil` Provide your Container token |
| `logseneToken` | Sematext Logsene token | `Nil` Provide your Logsene token |
| `region` | Sematext region | `US` Sematext US or EU region |
| `agent.image.repository` | The image repository | `sematext/agent` |
| `agent.image.tag` | The image tag | `latest` |
| `agent.image.pullPolicy` | Image pull policy | `Always` |
| `agent.service.port` | Service port | `80` |
| `agent.service.type` | Service type | `ClusterIP` |
| `agent.resources` | Agent resources | `{}` |
| `logagent.image.repository` | The image repository | `sematext/logagent` |
| `logagent.image.tag` | The image tag | `latest` |
| `logagent.image.pullPolicy` | Image pull policy | `Always` |
| `logagent.resources` | Logagent resources | `{}` |
| `logagent.extraHostVolumeMounts` | Extra mounts | `{}` |
| `customUrl.serverBaseUrl` | Custom Base URL | `Nil` |
| `customUrl.logsReceiverUrl` | Custom Logsene receiver URL | `Nil` |
| `customUrl.eventsRecieverUrl` | Custom Event receiver URL | `Nil` |
| `serviceAccount.create` | Create a service account | `true` |
| `serviceAccount.name` | Service account name | `Nil` Defaults to chart name |
| `rbac.create` | RBAC enabled | `true` |
| `tolerations` | Tolerations | `[]` |
| `nodeSelector` | Node selector | `{}` |

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

Expand Down
13 changes: 13 additions & 0 deletions stable/sematext-agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ spec:
volumeMounts:
- name: docker-sock
mountPath: /var/run/docker.sock
{{- if .Values.logagent.extraHostVolumeMounts }}
{{- range $_, $mount := .Values.logagent.extraHostVolumeMounts }}
- name: {{ $mount.name }}
mountPath: {{ $mount.mountPath }}
{{- end }}
{{- end }}
resources:
{{ toYaml .Values.logagent.resources | indent 12 }}
{{- end }}
Expand All @@ -140,6 +146,13 @@ spec:
- name: lib
hostPath:
path: /host/usr/lib
{{- if .Values.logagent.extraHostVolumeMounts }}
{{- range $_, $mount := .Values.logagent.extraHostVolumeMounts }}
- name: {{ $mount.name }}
hostPath:
path: {{ $mount.hostPath }}
{{- end }}
{{- end }}
- name: autodisco-template
configMap:
name: {{ template "sematext-agent.fullname" . }}-agent-autodisco
Expand Down
4 changes: 4 additions & 0 deletions stable/sematext-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ logagent:
LOGSENE_BULK_SIZE: "1000"
LOGSENE_LOG_INTERVAL: "10000"
resources: {}
extraHostVolumeMounts: {}
# - name: <mountName>
# hostPath: <hostPath>
# mountPath: <mountPath>

rbac:
# Specifies whether RBAC resources should be created
Expand Down

0 comments on commit 24bd1eb

Please sign in to comment.