Coder Social home page Coder Social logo

helm-charts's Introduction

Vector Helm Charts

Official Helm charts for Vector. Currently supported:

How to use the Vector Helm Repository

You need to add this repository to your Helm repositories:

helm repo add vector https://helm.vector.dev
helm repo update

Releasing

Charts are packaged and released with cr when the develop branch is merged into master.

To make releasing easier two scripts are utilized in the steps below.

  1. $ .github/release-vector-version.sh

    • This queries vectordotdev/vector for the latest release and updates the vector chart's default image.
    • This is convenient when updating the chart after a Vector release.
  2. Commit the changes generated from step 1. This needs to be a conventional commit.

    • E.g. "feat(vector): Bump Vector to v0.29.0"
  3. $ .github/release-changelog.sh

    • This pulls the current vector chart version and uses git-cliff to update the CHANGELOG.md. Run this to generate the final commit merged into develop before merging develop into master.
    • This script requires yq and git-cliff to be installed.
  4. Commit the changes generated from step 1. This needs to be a conventional commit.

    • E.g. "feat(vector): Regenerate CHANGELOG"

helm-charts's People

Contributors

alexanderldavis avatar andresperezl avatar androothechen avatar anisimovdk avatar aryanap avatar avihaisam avatar cybergrind avatar dannylongeuay avatar dependabot[bot] avatar dm3ch avatar dsmith3197 avatar enicholson125 avatar goedelsoup-clari avatar jendler avatar jonathanlking avatar jszwedko avatar kevinburkesegment avatar ludwighansson avatar minebaev avatar nabokihms avatar namm2 avatar nascd avatar neuronull avatar r0b3r4 avatar sam-mcbr avatar sipr-octo avatar spencergilbert avatar tacy-octo avatar tombokombo avatar yasumoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

helm-charts's Issues

Add values.schema.json to our Helm charts

@MOZGIII commented on Fri Nov 27 2020

Helm now supports values.schema.json to aid users by validating their custom values.yaml files against the chart-provided schema.

See https://helm.sh/docs/topics/charts/

We don't currently ship schemas for our values.yaml files, but we need to start doing that.

Once it's done, we should be able to generate advanced documentation on our website, which is tracked by vectordotdev/vector#5036.


@binarylogic commented on Fri May 14 2021

This issue is blocked by the lack of JSON schema support in cue. If we want our CUE data to be the source of truth, we'll need to translate that data to a values.json and values.json.schema file. Currently, that is not very straightforward given CUE's lack of support for exporting to these formats, making this issue's cost outweigh the value.

Additionally, command line tools for achieving this require heavy runtimes (javascript and python) that we do not want to introduce into our runtime.


@spencergilbert commented on Fri May 14 2021

cuelang/cue#929 <- cue issue for exporting support

Support maxUnavailable as a percentage in the vector-agent Helm Chart

@sidewinder12s commented on Mon Jul 26 2021

Current Vector Version

master

Use-cases

Support maxUnavailable as a percentage in the vector-agent Helm Chart. Right now it only supports integers.

Attempted Solutions

Tried to set a percentage, does not work.

Proposal

Update the maxUnavailable parameter to support percentages (most likely just need to ensure we use a string) or remove it and just make the entire rolling update config values that users pass in.

References

Could do something similar to what the aws-vpc-cni plugin has done: https://github.com/aws/eks-charts/blob/master/stable/aws-vpc-cni/templates/daemonset.yaml#L9

Problem HaProxy and aggregator

When vector agent tries to send log via HaProxy to aggregator I getting problem.

 WARN sink{component_kind="sink" component_id=aggregator_sink component_type=vector 
component_name=aggregator_sink}:request{request_id=304}: vector::sinks::util::retries: Retrying after error. error=Request failed: status: Internal, message: "protocol error: received message with invalid compression flag: 60 (valid flags are 0 and 1) while receiving response with status: 502 Bad Gateway", details: [], metadata: MetadataMap { headers: {"content-length": "107", "cache-control": "no-cache", "content-type": "text/html"} }

Haproxy config: https://pastebin.com/uR4ZCXDC
agent config

 sinks:
    aggregator_sink:
      type: vector
      inputs: ["kubernetes_logs"]
      address: vector-haproxy:6000
      version: "2"

aggregator config

 sources:
      vector:
        address: 0.0.0.0:6000
        type: vector
        version: "2"

logs haproxy

::ffff:10.0.1.139:39978 [18/Oct/2021:15:58:22.990] vector vector/srv1 1001/0/0/-1/1001 502 209 - - PH-- 3/3/0/0/0 0/0 "POST http://vector-haproxy:6000/vector.Vector/PushEvents HTTP/2.0"
::ffff:10.0.3.92:50390 [18/Oct/2021:15:58:23.634] vector vector/srv1 400/0/1/-1/400 502 209 - - PH-- 3/3/0/0/0 0/0 "POST http://vector-haproxy:6000/vector.Vector/PushEvents HTTP/2.0"
::ffff:10.0.3.92:50390 [18/Oct/2021:15:58:24.034] vector vector/srv1 124/0/0/-1/124 502 209 - - PH-- 3/3/0/0/0 0/0 "POST http://vector-haproxy:6000/vector.Vector/PushEvents HTTP/2.0"

Missing options from original charts

Only in old-aggregator/templates/: secret.yaml
diff old-aggregator/templates/statefulset.yaml vector-aggregator/templates/statefulset.yaml
47,49d46
<             {{- with .Values.args }}
<             {{- toYaml . | nindent 12 }}
<             {{- end }}
60,67d56
<           {{- if .Values.livenessProbe }}
<           livenessProbe:
<             {{- toYaml .Values.livenessProbe | trim | nindent 12 }}
<           {{- end }}
<           {{- if .Values.readinessProbe }}
<           readinessProbe:
<             {{- toYaml .Values.readinessProbe | trim | nindent 12 }}
<           {{- end }}
86,92d74
<       {{- if .Values.dnsPolicy }}
<       dnsPolicy: {{ .Values.dnsPolicy | quote }}
<       {{- end }}
<       {{- if .Values.dnsConfig }}
<       dnsConfig:
<         {{- toYaml .Values.dnsConfig | trim | nindent 8 }}
<       {{- end }}

and

diff old-agent/templates/daemonset.yaml vector-agent/templates/daemonset.yaml
51,53d50
<             {{- with .Values.args }}
<             {{- toYaml . | nindent 12 }}
<             {{- end }}
80,87d76
<           {{- if .Values.livenessProbe }}
<           livenessProbe:
<             {{- toYaml .Values.livenessProbe | trim | nindent 12 }}
<           {{- end }}
<           {{- if .Values.readinessProbe }}
<           readinessProbe:
<             {{- toYaml .Values.readinessProbe | trim | nindent 12 }}
<           {{- end }}
126,132d114
<       {{- if .Values.dnsPolicy }}
<       dnsPolicy: {{ .Values.dnsPolicy | quote }}
<       {{- end }}
<       {{- if .Values.dnsConfig }}
<       dnsConfig:
<         {{- toYaml .Values.dnsConfig | trim | nindent 8 }}
<       {{- end }}
Only in old-agent/templates/: secret.yaml

PDB predefines both MaxUnavailable and MinAvailable

The values.yaml sets both to 1, leading to issues if you turn on PDBs
vector-aggregator False Helm install failed: PodDisruptionBudget.policy "vector" is invalid: spec: Invalid value: policy.PodDisruptionBudgetSpec{MinAvailable:(intstr.IntOrString)(0xc057dbcbc0), Selector:(v1.LabelSelector)(0xc057dbcbe0), MaxUnavailable:(*intstr.IntOrString)(0xc057dbcba0)}: minAvailable and maxUnavailable cannot be both set 136m

Represent Kubernetes values.yaml schema as cue data

@binarylogic commented on Sun Nov 15 2020

As part of documenting Kubernetes, we need to expose the various fields allowed in the values.yml. This should be encoded in our cue data in the same way that our components document their configuration.


@MOZGIII commented on Fri Nov 27 2020

Helm supports values.schema.json now: https://helm.sh/docs/topics/charts/
I think we should focus on that instead first, and then use the JSON Schama in .cue files to extract the data. It should be possible to do. I created an issue #5253.


@binarylogic commented on Fri May 14 2021

See vectordotdev/vector#5253 (comment)

Update vector-agent helm chart to allow Deployment instead of DaemonSet

@aliusmiles commented on Thu Jun 24 2021

Current Vector Version

0.14.0

Use-cases

Vector agent reading AWS ALB logs from S3 bucket and pushing them to Loki.

Attempted Solutions

vector-agent running as scalable Deployment instead of DaemonSet.

Proposal

Right now Helm chart for vector-agent uses DaemonSet and is rather hardcoded for only one role: collecting container logs from k8s nodes. In my case Promtail is already doing that so I want to use Vector to only get LB logs from s3 bucket into Loki. I've already tested that locally with minimal effort and minimal config, which is just awesome (especially out-of-the-box parse_aws_alb_log transformer) :-) But when it got to deployment I've realized official chart won't suite my case at all: it's possible to add custom config and disable default sources and sinks, but running vector as DaemonSet for that just doesn't make sense.

I imagine this might be quite common case - using vector for collecting logs from sources other than container logs or even running multiple agents - one for container logs as daemon, another for s3 logs as single replica, others for something else as auto-scalable deployment.

I remember seeing some chart with had templates for both DaemonSet and Deployment, controlled by variable like deploymentType: daemonset|deployment. Would be nice to have something like this in vector-agent chart. Should be relatively simple to introduce additional variable and template, although some extra changes might be needed, for example: Deployment for collecting logs from s3 does not really need /var/log mounted from k8s node, but still might need volume for data-dir, if type is set to Deployment then optionally add hpa, etc.

I believe such feature would add much more flexibility to official chart and allow it to be used in more scenarios. If anybody is interested I can try to draft a PR for that.


@spencergilbert commented on Thu Jun 24 2021

Hey! I think your use case would be suited for our vector-aggregator chart. We're currently working on getting it ready to leave beta, but it's definitely usable in it's current state.

Had you seen that chart yet?


@aliusmiles commented on Thu Jun 24 2021

Just checked it out, I should be able to use it for my case, thanks! Just need to disable default sources/sinks/service and add custom config. I have actually saw that chart earlier but haven't looked inside as I was under impression that it can only aggregate data from vector agents.

The only thing that it's a StatefulSet, so no hpa. Doesn't matter for me but if someone needs to get a lot of logs from s3 or other source, I believe deployment with hpa would've been better.

Possible solution: just add yet another chart for 'vector-forwarder' or something? :) basically vector-agent without host volumes but with deployment and hpa? Though I'm not sure how much demanded that would be, maybe leave this issue open for a while to see if there will be any upvotes?

My personal case should be solved with aggregator chart I think, will try tomorrow. Thanks for the suggestion!


@spencergilbert commented on Thu Jun 24 2021

👍 @aliusmiles that's definitely a good point. At risk of supporting too many charts that are similar but a little different it would be nice to support HPAs. We did originally choose StatefulSet for the persistent volumes.

I'm happy to leave this open to see if there's general interest in a more "ephemeral, but scalable" strategy. Or maybe HPAs will support StatefulSets one day 😄


@aliusmiles commented on Fri Jun 25 2021

aggregator chart worked quite nicely for me, thanks!

One minor suggestion: maybe wrap headless-service template in the same condition as service? Since I've disabled default source, I don't have service in my deployment but chart still deployed headless service with no ports. Not a big issue but still.

Also, is there any issue or something to keep track on when vector-aggregator chart will be by fully released?

P.S. Here's my configs in case someone get interested:

Configs

values.yaml

replicas: 1

image:
  tag: "0.14.0-alpine"

nameOverride: "vector"

serviceAccount:
  create: true
  annotations:
    eks.amazonaws.com/role-arn: IRSA_ROLE_ARN

tolerations: []

storage:
  mode: managedPersistentVolumeClaim
  managedPersistentVolumeClaim:
    size: 10Gi

vectorApi:
  enabled: false
vectorSource:
  enabled: false
internalMetricsSource:
  enabled: false
prometheusSink:
  enabled: false

haproxy:
  enabled: false

sources:
  s3_alb_logs:
    type: "aws_s3"
    region: "AWS_REGION"
    compression: "gzip"
    sqs:
      queue_url: "SQS_QUEUE_URL"

transforms:
  alb_logs:
    type: "remap"
    inputs:
      - "s3_alb_logs"
    source: " . = parse_aws_alb_log!(.message)"

sinks:
  loki:
    type: "loki"
    inputs:
      - "alb_logs"
    endpoint: "http://loki:3100"
    encoding:
      codec: "json"
    labels:
      forwarder: "vector"
      event: "{{ event_field }}"
      source: "alb_logs"

helmfile.yaml

repositories:
  - name: timberio
    url: git+https://github.com/timberio/vector@distribution/helm?ref=master

releases:
  - name: vector
    chart: timberio/vector-aggregator
    namespace: monitoring
    values:
      - envs/{{ .Environment.Name }}/values/vector.yaml

@spencergilbert commented on Fri Jun 25 2021

@aliusmiles thanks! I'll take a look at that and open an issue based on what I find.

I don't have a hard date for that yet, but it's one of our largest focuses. We'll definitely do a blog post/highlight/tweet/etc when it happens :)

Templating error with loki labels

Hello, tried to deploy vector with helm using recommended values for label, still fails with "failed to find function file". Sample values:

role: Agent
customConfig:
  data_dir: "/vector-data-dir"
  sinks:
    prometheus:
      address: "0.0.0.0:9090"
      inputs: ["internal_metrics", "host_metrics"]
      type: "prometheus"
    loki:
      inputs: ["kubernetes_logs"]
      type: "loki"
      endpoint: "https://loki-ingress"
      auth:
        strategy: basic
        user: loki
        password: loki
      remove_timestamp: true
      tenant_id: kube
      encoding: json
      labels:
        forwarder: "vector"
        file: |
          {{ file }}
        stream: |
          {{ stream }}
        source_type: |
          {{ source_type }}
        k8s_pod_namespace: |
          {{ kubernetes.pod_namespace }}
        k8s_pod_name: |
          {{ kubernetes.pod_name }}
        k8s_pod_uid: |
          {{ kubernetes.pod_uid }}
        k8s_pod_ip: |
          {{ kubernetes.pod_ip }}
        k8s_pod_ips: |
          {{ kubernetes.pod_ips }}
        k8s_pod_node_name: |
          {{ kubernetes.pod_node_name }}
        k8s_app: |
          {{ kubernetes.pod_labels.app }}
        k8s_kubernetes_io_instance: |
          {{ kubernetes.pod_labels.app\.kubernetes\.io/instance}}
        k8s_kubernetes_io_component: |
          {{ kubernetes.pod_labels.app\.kubernetes\.io/component }}
        k8s_kubernetes_io_name: |
          {{ kubernetes.pod_labels.app\.kubernetes\.io/name }}
        k8s_container_name: |
          {{ kubernetes.container_name }}
        k8s_container_image: |
          {{ kubernetes.container_image }}
  sources:
    kubernetes_logs:
      type: "kubernetes_logs"
    host_metrics:
      type: "host_metrics"
    internal_metrics:
      type: "internal_metrics"

additionalLabels removed from podMonitor

Prometheus requires that the podMonitor opt-in to the namespace for metrics. This is no longer possible without using commonLabels which applies the label to all resources and adds unnecessary clutter.

Vector aggregator chart update fails

I'm using vector-aggregator chart with helmfile and update fails with:

Error: UPGRADE FAILED: cannot patch "vector" with kind StatefulSet: StatefulSet.apps "vector" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden

helmfile diff (reducted):

monitoring, vector, StatefulSet (apps) has changed:
  # Source: vector-aggregator/templates/statefulset.yaml
  apiVersion: apps/v1
  kind: StatefulSet
  metadata:
    name: vector
    labels:
-     helm.sh/chart: vector-aggregator-0.16.1
+     helm.sh/chart: vector-aggregator-0.17.0
      app.kubernetes.io/name: vector
      app.kubernetes.io/instance: vector
      app.kubernetes.io/version: "0.16.1"
      app.kubernetes.io/managed-by: Helm
      app.kubernetes.io/part-of: vector
  spec:
    ...
    volumeClaimTemplates:
      # Vector will store it's data here.
      - metadata:
          name: data-dir
          labels:
-           helm.sh/chart: vector-aggregator-0.16.1
+           helm.sh/chart: vector-aggregator-0.17.0
            app.kubernetes.io/name: vector
            app.kubernetes.io/instance: vector
            app.kubernetes.io/version: "0.16.1"
            app.kubernetes.io/managed-by: Helm
            app.kubernetes.io/part-of: vector

Reason: {{- include "libvector.labels" $ | nindent 10 }} in sts template which comes from vector-shared

Looks like the only solution is to remove chart version from volumeClamTempalte's labels, please check this issue

vector chart: improve comments on customConfig

Would be nice to have example config for customConfig in values.yaml, commented out like dnsConfig or livenessProbe or perhaps some mention in comment above that customConfig's value is basically vector's config in yaml :)

P.S. That new chart is just awesome!

Move static pod Label into podLabels default value of vault-agent helm chart

@sidewinder12s commented on Mon Jul 26 2021

Current Vector Version

master

Use-cases

I'd like Vector to collect it's own logs for shipment when using the vector-agent helm chart.

Attempted Solutions

This is set statically within the Chart where it cannot be overridden without forking.

Proposal

Move vector.dev/exclude: "true" Daemonset Label into podLabels as a default value.

This keeps the existing behavior but will allow users to override/extend if desired.


@spencergilbert commented on Mon Aug 16 2021

I think our preferred method of self collection would be enabling the internal_logs source which should better avoid any looping (collecting messaging vector writes to stdout and continuing to do so, nesting deeper and deeper into a message key).

@sidewinder12s I think this source would better fit the use case


Ref fluent/fluent-bit#1140

DRY template usage in vector chart

Nit, it seems like these are all the same besides the prefix. I might suggest pulling out the calculation of the pod name somewhere where it can be shared (if possible).

Originally posted by @jszwedko in #24 (comment)

There are several places where an additional helper can improve readability, or reduce duplication. All implementations should be cleaned up prior to an official release.

Haproxy configuration for proxy `vector` is not usable

Two bugs in one

  • The current default haproxy configuration of the proxy named vector is not usable.
  • Currently the default values vectorSource.enabled: true and vectorSource.listenPort: 9000 are flagged as "deprecated", but still they would break the haproxy config for an hypothetical user with haproxy.enabled: true and who happened to choose randomly 9000 as a port in service.ports.

Examples

example 1

This in the values.yaml:

vectorSource:
  enabled: true
  listenPort: 9000

service:
  ports:
    - name: agent
      port: 9000
      protocol: TCP
      targetPort: 9000

haproxy:
  enabled: true

Would create two frontend binding on the same port 9000 in haproxy config:

frontend vector
  bind :::9000 proto h2
  mode http
  [...]

backend vector
  mode http
  [...] (backend proto h2)

frontend agent
  bind :::9000
  (default/implied: mode tcp)
  [...]

backend agent
  (default/implied: mode tcp)
  [...] (backend proto tcp)

Haproxy starts, but the requests ends randomly in one or the other frontend, making it an erratic loadbalancer.

example 2

This configuration looks fine at a first glance:

# I only have one source/port to expose: fluent (no vector source)
service:
  ports:
    - name: fluent
      port: 9000
      protocol: TCP
      targetPort: 9000

haproxy:
  enabled: true

But it would create a conflict in haproxy (see above), messing up with the unrelated fluent source. This config just needs a vectorSource.enabled: false, but maybe we could document this somewhere. Most users would assume that a vectorSource "deprecated" option won't mess with their loadbalancing config, and the errors are hard to catch, since haproxy actually do starts. The only way to understand why we're missing some logs is to read thoughtfully the haproxy logs.

Detailed explanation

This part relies on values from the deprecated vectorSource from here in values.yaml.

I assume that in the past, this block was used to generate:

  • a source vector configuration for the vector instance
  • the kubernetes service with the port from vectorSource.listenPort (default 9000)
  • the haproxy proxy configuration vector (frontend and backend), with mode http

Now, the haproxy vector proxy config is still generated (that is, as long as vectorSource.enabled is true), however we configure the vector source in customConfig instead (here), and since no kubernetes service is generated automatically anymore, we need to populate service as well in order for our source to be reachable on its port.

As a result, when configuring a vector source, the generic haproxy proxy config is generated as well (looping over the service values)

This generic proxy configuration has different options compared to the default vector one (default mode tcp instead of mode http + proto h2. See also this PR for context). If we want a proper HTTP config for a vector sink <-> source communitation, we have no other choice but to override the whole haproxy config here.

Keeping the haproxy vector proxy configuration and use the port from vectorSource.listenPort is not an option due to how the chart works currently. We would need to define a service in service.ports with a port equal to values.vectorSource.listenPort, but then we would end up with two frontend binding on the same port: one at the default vector proxy level and one at the proxy generated iteratively for each elements in service.ports. While not an invalid configuration from haproxy POV (it will start), this would be make for a non sensical configuration: connecting randomly to different frontends.

Maybe we can think of a way to provide a default sane haproxy block config for a basic vector sink <-> source configuration. We could also document that this config works only for vector sink/source in v2 (gRPC over HTTP2). It should be easy to enable for new users, while not preventing users from overriding it.

Would anyone be interested in a PR to change this part or the chart ? Or was there a plan to drop this default haproxy vector proxy configuration ?

Add option to add array of ca files via helm chart

@asafdl commented on Wed Jun 09 2021

Current Vector Version

vector 0.13.1 (v0.13.1 x86_64-unknown-linux-gnu 2021-04-29)

Use-cases

Add multiple CA files for tls requests

Attempted Solutions

tls.ca_file allows to enter path to file or a string certificate, if I have multiple files there's no way to load them all from chart

Proposal

instead of reading a path or string, it should be reading an array

Add ingress to vector chart

Needed to create an AWS ALB

ex:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: vector
  annotations:
    alb.ingress.kubernetes.io/scheme: internal
    alb.ingress.kubernetes.io/healthcheck-port: '8686'
    alb.ingress.kubernetes.io/healthcheck-path: /health
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 8080}]'
    alb.ingress.kubernetes.io/target-type: ip
    kubernetes.io/ingress.class: alb
spec:
  rules:
    - host: vector.demo.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: vector
                port:
                  name: datadog-agents

vector chart: vector-headless service is still created when service.enable=false

headless service is still created when service is disabled in values.

service-headless' template condition is set to {{- if or (eq .Values.role "Aggregator") (eq .Values.role "Stateless-Aggregator") -}}

while service's template has {{- if and .Values.service.enabled }}

Possible solution:

{{- if and .Values.service.enabled (or (eq .Values.role "Aggregator") (eq .Values.role "Stateless-Aggregator")) -}}

Use case for having service completely disabled:

using Vector for getting AWS ALB logs from S3 bucket to Loki or any other pull configuration.

Allow running "vector validate" over Helm-managed vector config

@MOZGIII commented on Mon Sep 21 2020

We have a vector validate command that's very useful during the development of the config file.

On the other hand, we have a Helm chart, that can manage the config such that users only have to fill in the relevant parts of the config. The resulting config is generated from templated and either passed directly into the Kubernetes API, or exposed as a ConfigMap YAML file. This makes it very difficult to apply vector validate during the development phase of the config.

Investigate ways to allow running the vector validate when using the Helm chart, to allow checking the config validity before deployment. For when people run it locally, or use at CI.

Related: #3828.


@MOZGIII commented on Mon Sep 21 2020

Currently, the most promising way of doing this is https://helm.sh/docs/topics/charts_hooks/, to be used similar to https://helm.sh/docs/topics/chart_tests/.

Add Helm chart(s) to deploy full observability stacks with Vector into Kubernetes

@MOZGIII commented on Thu Jul 09 2020

We can offer Helm chart (or charts) to deploy the full observability stack into k8s:

vector +

  • loki + grafana
  • elasticsearch + grafana
  • elasticsearch + kibana

This would effectively be a turnkey self-hosted solution to use Vector at K8s.

Motivation

Allow one-command installation of the observability stack.

Technical details

Helm allows installing dependencies. We can create a vector-stack chart in addition to vector chart. This vector-stack will depend on vector chart and charts for loki, grafana, elasticsearch and etc.

All that this vector-stack has to do is to point parts of the stack to each other.
This is fairly trivial thing, should be easy to implement and maintain.


@afoninsky commented on Fri Jul 10 2020

From my experience (and it's only my opinion), vector is a great component for building complex system. I'm not saying that it will be bad in predefined stacks "vector" + "", but having flexible helm chart is something I'd want to see. It can be used as a part of umbrella chart, core component for custom solution or even in discussed stacks.

For example, I maintain own private chart and combine it with tools I need for current task. Features I'm using in it:

  • ability to inject sidecars together with Vector (to create "servicemesh" where vector acts as a transport)
  • init containers support
  • flexible config with the ability to use helm chart variables itself (example - to specify port in k8s service and reuse it in config)
  • mounting of custom volumes (pvc, configmaps, etc...)
  • tunable readiness/liveness for specific needs
  • ingress
    etc.

Yes, it's a tricky thing to build a universal chart. But I've seen some good examples in https://github.com/helm/charts and it's doable.


@MOZGIII commented on Fri Jul 10 2020

Thanks for the input, @afoninsky! This is definitely a good idea. We’re currently reworking the k8s integration, and at the moment we’re focusing on a cluster-wide DaemonSet deployment model. We have a Helm chart for just Vector in progress - vectordotdev/vector#2871.
We will be improving it and adding more flexibility and configuration (Vector as deployment+service, Vector as sidecar) as we go.
I’m looking forward to know what you think about it!


@afoninsky commented on Wed Jul 15 2020

Thank you for the information.

From my point of view, helm is not very suitable for reusing different deployment types (as it works with text templates without knowing context), so it looks more profitable to concentrate on DaemonSet first. Personally I see vector as a custom component in own solution so have no big ideas about separate chart (I think about it more like "envoy for istio" :).

About the rest, please deploy the resulting chart and we (community) will be happy to send pull-requests.

Great job though :)


@MOZGIII commented on Wed Jul 15 2020

vector as a custom component in own solution

@afoninsky you might then be interested in vectordotdev/vector#3018

helm is not very suitable for reusing different deployment types

I agree. It's not yet clear if we'll be reusing the same chart, or split into multiple chars (i.e. vector for DaemonSet in agent deployment model + vector-service for Deployment & Service in a service deployment model).


@MOZGIII commented on Wed Sep 30 2020

@afoninsky you might be interested in taking a look at our design for the next generation of our Helm Charts at #3227.

Update aggregator default configuration

We should upgrade the aggregator default configuration to cover a wider range of common sources. This will improve onboarding and simplify installation/quick start.

We should ensure that overriding these defaults is easy for operators that want granular control of their config.

Only expose a service port once

We should only expose one service port for listening in different modes.

For example, if we have a customConfig listening on a port for both tcp and udp:

sources:                                                                                                                                                                                                                              
  syslog-tcp:                                                                                                                                                                                                                         
    type: syslog                                                                                                                                                                                                                      
    address: 0.0.0.0:514                                                                                                                                                                                                              
    max_length: 102400                                                                                                                                                                                                                
    mode: tcp                                                                                                                                                                                                                         
    shutdown_timeout_secs: 30                                                                                                                                                                                                         
  syslog-udp:                                                                                                                                                                                                                         
    type: syslog                                                                                                                                                                                                                      
    address: 0.0.0.0:514                                                                                                                                                                                                              
    max_length: 102400                                                                                                                                                                                                                
    mode: udp                                                                                                                                                                                                                         
    shutdown_timeout_secs: 30

We receive an error

Error: Service "vector01" is invalid: spec.ports[1]: Duplicate value: core.ServicePort{Name:"", Protocol:"TCP", AppProtocol:(*string)(nil), Port:514, TargetPort:intstr.IntOrString{Type:0, IntVal:0, StrVal:""}, NodePort:0}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.