aws-observability / helm-charts

The AWS Observability Helm Charts repository contains Helm charts to provide easy mechanisms to setup the CloudWatch Agent and other collection agents to collect telemetry data such as metrics, logs and traces to send to AWS monitoring services.
Apache License 2.0
10 stars 17 forks source link

Lack of flexibility to install addons specific to your OS #116

Open raelyz opened 1 month ago

raelyz commented 1 month ago
{{- if .Values.agent.enabled }}
{{- $clusterName := .Values.clusterName | required ".Values.clusterName is required." -}}
{{- $region := .Values.region | required ".Values.region is required." -}}
{{- $config := `{"logs":{"metrics_collected":{"application_signals":{}}},"traces":{"traces_collected":{"application_signals":{}}}}` | fromJson -}}
apiVersion: cloudwatch.aws.amazon.com/v1alpha1
kind: AmazonCloudWatchAgent
metadata:
  name: {{ template "cloudwatch-agent.name" . }}-windows
  namespace: {{ .Release.Namespace }}
spec:
  podSecurityContext:
    windowsOptions:
      runAsUserName: "NT AUTHORITY\\System"
  image: {{ template "cloudwatch-agent.image" . }}
  mode: daemonset
  serviceAccount: {{ template "cloudwatch-agent.serviceAccountName" . }}
  nodeSelector:
    kubernetes.io/os: windows
  config: {{ include "cloudwatch-agent.modify-config" (merge (dict "Config" $config) .) }}
  {{- with .Values.agent.resources }}
  resources: {{- toYaml . | nindent 4}}
  {{- end }}
  env:
    - name: K8S_NODE_NAME
      valueFrom:
        fieldRef:
          fieldPath: spec.nodeName
    - name: HOST_IP
      valueFrom:
        fieldRef:
          fieldPath: status.hostIP
    - name: HOST_NAME
      valueFrom:
        fieldRef:
          fieldPath: spec.nodeName
    - name: K8S_NAMESPACE
      valueFrom:
        fieldRef:
          fieldPath: metadata.namespace
  {{- with .Values.tolerations }}
  tolerations: {{- toYaml . | nindent 2}}
  {{- end }}
{{- end }}

If i'm not wrong all the daemonsets are enabled through the agent.enabled flag, this causes my helm installation on EKS to include a lot of bloat.

Is this intentional? I only wanted to install those relevant for Linux for example but I get the windows CRDs installed to my cluster as an unintended side effect.