Skip to content

Commit

Permalink
added extraContainers option for vector & haproxy pods (#239)
Browse files Browse the repository at this point in the history
* added extraContainers option for vector & haproxy pods

extraContainers allows you to run sidecars containers along with the main container

* +version bump, readme fix

Co-authored-by: Spencer Gilbert <[email protected]>
  • Loading branch information
r0b3r4 and spencergilbert authored Aug 23, 2022
1 parent ef28146 commit 0750512
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/vector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: vector
version: "0.15.1"
version: "0.16.0"
kubeVersion: ">=1.15.0-0"
description: A lightweight, ultra-fast tool for building observability pipelines
type: application
Expand Down
4 changes: 3 additions & 1 deletion charts/vector/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vector

![Version: 0.15.1](https://img.shields.io/badge/Version-0.15.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.23.3-distroless-libc](https://img.shields.io/badge/AppVersion-0.23.3--distroless--libc-informational?style=flat-square)
![Version: 0.16.0](https://img.shields.io/badge/Version-0.16.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.23.3-distroless-libc](https://img.shields.io/badge/AppVersion-0.23.3--distroless--libc-informational?style=flat-square)

[Vector](https://vector.dev/) is a high-performance, end-to-end observability data pipeline that puts you in control of your observability data. Collect, transform, and route all your logs, metrics, and traces to any vendors you want today and any other vendors you may want tomorrow. Vector enables dramatic cost reduction, novel data enrichment, and data security where you need it, not where is most convenient for your vendors.

Expand Down Expand Up @@ -141,6 +141,7 @@ helm install --name <RELEASE_NAME> \
| dnsPolicy | string | `"ClusterFirst"` | Specify DNS policy for Vector Pods # Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy |
| env | list | `[]` | Set environment variables in Vector containers # The examples below leverage examples from secrets.generic and assume no name overrides with a Release name of "vector" |
| existingConfigMaps | list | `[]` | List of existing ConfigMaps for Vector's configuration instead of creating a new one, if used requires dataDir to be set. Additionally, containerPorts and service.ports should be specified based on your supplied configuration # If set, this parameter takes precedence over customConfig and the chart's default configs |
| extraContainers | list | `[]` | Extra Containers to be added to the Vector Pod |
| extraVolumeMounts | list | `[]` | Additional Volume to mount into Vector Containers |
| extraVolumes | list | `[]` | Additional Volumes to use with Vector Pods |
| fullnameOverride | string | `""` | Override the full qualified app name |
Expand Down Expand Up @@ -220,6 +221,7 @@ helm install --name <RELEASE_NAME> \
| haproxy.customConfig | string | `""` | Override HAProxy's default configs, if used **all** options need to be specified. This parameter supports using Helm templates to insert values dynamically # By default this chart will parse Vector's configuration from customConfig to generate HAProxy's config, this generated config # can be overwritten with haproxy.customConfig |
| haproxy.enabled | bool | `false` | If true, create a HAProxy load balancer |
| haproxy.existingConfigMap | string | `""` | Use this existing ConfigMap for HAProxy's configuration instead of creating a new one. Additionally, haproxy.containerPorts and haproxy.service.ports should be specified based on your supplied configuration # If set, this parameter takes precedence over customConfig and the chart's default configs |
| haproxy.extraContainers | list | `[]` | Extra Containers to be added to the HAProxy Pod |
| haproxy.extraVolumeMounts | list | `[]` | Additional Volume to mount into HAProxy Containers |
| haproxy.extraVolumes | list | `[]` | Additional Volumes to use with HAProxy Pods |
| haproxy.image.pullPolicy | string | `"IfNotPresent"` | HAProxy image pullPolicy |
Expand Down
6 changes: 6 additions & 0 deletions charts/vector/ci/extraContainers-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Including extraContainers
## Values file for testing adding extraContainers to Vector Pods.
extraContainers:
- name: sleep
image: busybox
command: ['sh', '-c', "sleep 5"]
7 changes: 7 additions & 0 deletions charts/vector/ci/haproxy-extraContainers-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Including haproxy.extraContainers
## Values file for testing adding extraContainers to HAProxy Pods.
haproxy:
extraContainers:
- name: sleep
image: busybox
command: ['sh', '-c', "sleep 5"]
3 changes: 3 additions & 0 deletions charts/vector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ containers:
mountPath: "/host/sys"
readOnly: true
{{- end }}
{{- with .Values.extraContainers }}
{{ toYaml . | indent 2 }}
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 6 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/vector/templates/haproxy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ spec:
{{- with .Values.haproxy.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.haproxy.extraContainers }}
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: haproxy-config
configMap:
Expand Down
6 changes: 6 additions & 0 deletions charts/vector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ extraVolumeMounts: []
# initContainers -- Init Containers to be added to the Vector Pod
initContainers: []

# extraContainers -- Extra Containers to be added to the Vector Pod
extraContainers: []

## Configuration for Vector's data persistence
persistence:
# persistence.enabled -- If true, create and use PersistentVolumeClaims
Expand Down Expand Up @@ -473,6 +476,9 @@ haproxy:
# haproxy.initContainers -- Init Containers to be added to the HAProxy Pod
initContainers: []

# haproxy.extraContainers -- Extra Containers to be added to the HAProxy Pod
extraContainers: []

## Configure a HorizontalPodAutoscaler for HAProxy
autoscaling:
# haproxy.autoscaling.enabled -- Enabled autoscaling for HAProxy
Expand Down

0 comments on commit 0750512

Please sign in to comment.