Skip to content

Commit

Permalink
feat(honeycomb): Add support for secrets provider (#356)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?

Using an external secrets provider.

## Short description of the changes

Adds ability to specify additional volume mounts for the agents
container and additional volumes for the pod spec. Also allows
specification of the key used for the secret.

---------

Co-authored-by: Jamie Danielson <jamiedanielson@honeycomb.io>
  • Loading branch information
martin308 and JamieDanielson committed Apr 9, 2024
1 parent 1e04050 commit 916c61e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/honeycomb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: honeycomb
description: Honeycomb Kubernetes Agent
version: 1.8.3
version: 1.9.0
appVersion: 2.7.2
keywords:
- observability
Expand Down
5 changes: 3 additions & 2 deletions charts/honeycomb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ See [docs](https://github.com/honeycombio/honeycomb-kubernetes-agent/blob/master
The [values.yaml](./values.yaml) file contains information about all configuration
options for this chart.

The only requirement is a Honeycomb API Key. This can be provided either by setting `honeycomb.apiKey` or by setting `honeycomb.existingSecret` to the name of an existing opaque secret resource with your API Key specified in the `api-key` field.
The only requirement is a Honeycomb API Key. This can be provided either by setting `honeycomb.apiKey` or by setting `honeycomb.existingSecret` to the name of an existing opaque secret resource with your API Key specified in the `honeycomb.existingSecretKey` value.

You can obtain your API Key by going to your Account profile page inside of your Honeycomb instance.

Expand All @@ -80,7 +80,8 @@ The following table lists the configurable parameters of the Honeycomb chart, an
|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|
| `honeycomb.apiKey` | Honeycomb API Key | `YOUR_API_KEY` |
| `honeycomb.apiHost` | API URL to sent events to | `https://api.honeycomb.io` |
| `honeycomb.existingSecret` | Name of an existing secret resource to use containing your API Key in the `api-key` field | `nil` |
| `honeycomb.existingSecret` | Name of an existing secret resource to use containing your Honeycomb API Key | `nil` |
| `honeycomb.existingSecretKey` | Name of the key in your existing secret above that contains the Honeycomb API Key | `api-key` |
| `watchers` | An array of `watchers` configuration snippets for the log agent ([docs](https://github.com/honeycombio/honeycomb-kubernetes-agent/blob/master/docs/configuration-reference.md)). Set this to an empty array `[]` to disable log collection. | kube-controller-manager, kube-scheduler |
| `verbosity` | Agent log level | `info` |
| `splitLogging` | Send all log levels to stdout instead of stderr | `false` |
Expand Down
8 changes: 7 additions & 1 deletion charts/honeycomb/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
{{- else }}
name: {{ include "honeycomb.fullname" . }}
{{- end }}
key: api-key
key: {{ .Values.honeycomb.existingSecretKey | default "api-key" }}
- name: NODE_NAME
valueFrom:
fieldRef:
Expand All @@ -78,6 +78,9 @@ spec:
- name: varlibdockercontainers
mountPath: "/var/lib/docker/containers"
readOnly: true
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
volumes:
- name: config
Expand All @@ -92,6 +95,9 @@ spec:
- name: varlibdockercontainers
hostPath:
path: "/var/lib/docker/containers"
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/honeycomb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ honeycomb:
apiHost: https://api.honeycomb.io/
# Specify the name of an existing secret resource containing your Honeycomb API KEY instead of having a secret resource created
existingSecret: ""
# The key in the existing secret containing the Honeycomb API key (defaults to 'api-key').
existingSecretKey: ""

watchers:
- dataset: kubernetes-logs
Expand Down Expand Up @@ -130,3 +132,7 @@ serviceAccount:
name: ""
# Annotations to add to the service account
annotations: {}

extraVolumes: []

extraVolumeMounts: []

0 comments on commit 916c61e

Please sign in to comment.