├── .gitignore ├── NOTICE ├── charts └── adot-exporter-for-eks-on-ec2 │ ├── .helmignore │ ├── documentation │ ├── helm_chart_test_doc.pdf │ ├── screenshots │ │ ├── Amp_dash.png │ │ └── Cloudwatch_dash.png │ ├── deploy_collector_as_sidecar.md │ └── metrics_to_cloudwatch_amp.md │ ├── templates │ ├── NOTES.txt │ └── adot-collector │ │ ├── sidecarnamespace.yaml │ │ ├── namespace.yaml │ │ ├── serviceaccount.yaml │ │ ├── clusterrolebinding.yaml │ │ ├── clusterrole.yaml │ │ ├── sidecar.yaml │ │ ├── daemonset.yaml │ │ ├── _helpers.tpl │ │ └── configmap.yaml │ ├── Chart.yaml │ ├── Makefile │ ├── scripts │ ├── lint-charts.sh │ ├── validate-charts.sh │ └── install-tools.sh │ ├── README.md │ ├── values.yaml │ └── values.schema.json ├── CODE_OF_CONDUCT.md ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── general-issue.md │ └── bug_report.md ├── pull_request_template.md └── workflows │ ├── release.yaml │ └── stale-bot.yml ├── CONTRIBUTING.md ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | #IDE 2 | .idea 3 | 4 | #build folder 5 | build/ 6 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/.helmignore: -------------------------------------------------------------------------------- 1 | # Ignore documentations folder 2 | documentation/ 3 | 4 | # Ignore scripts folder 5 | scripts/ 6 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/documentation/helm_chart_test_doc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-observability/aws-otel-helm-charts/HEAD/charts/adot-exporter-for-eks-on-ec2/documentation/helm_chart_test_doc.pdf -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/documentation/screenshots/Amp_dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-observability/aws-otel-helm-charts/HEAD/charts/adot-exporter-for-eks-on-ec2/documentation/screenshots/Amp_dash.png -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/documentation/screenshots/Cloudwatch_dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-observability/aws-otel-helm-charts/HEAD/charts/adot-exporter-for-eks-on-ec2/documentation/screenshots/Cloudwatch_dash.png -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Thank you for installing {{ .Chart.Name }}. 2 | 3 | Your release is named {{ .Release.Name }}. 4 | 5 | To learn more about the release, try: 6 | 7 | $ helm status {{ .Release.Name }} 8 | $ helm get all {{ .Release.Name }} -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | 2 | ##################################################### 3 | # 4 | # List of approvers for this repository 5 | # 6 | ##################################################### 7 | # 8 | # Learn about CODEOWNERS file format: 9 | # https://help.github.com/en/articles/about-code-owners 10 | # 11 | 12 | * @aws-observability/adot-collector-maintainers 13 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/sidecarnamespace.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.adotCollector.sidecar.enabled }} 2 | # Specify namespace for ADOT Collector as a Sidecar. 3 | apiVersion: v1 4 | kind: Namespace 5 | metadata: 6 | name: {{ include "adotCollector.sidecar.namespace" . }} 7 | labels: 8 | name: {{ include "adotCollector.sidecar.namespace" . }} 9 | {{- include "adotCollector.daemonSet.labels" . | indent 4 }} 10 | {{- end }} 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/general-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: General Issue 3 | about: Open a general issue in the aws-observability/aws-otel-helm-charts repo 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/namespace.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.adotCollector.daemonSet.enabled .Values.adotCollector.daemonSet.createNamespace }} 2 | # Specify namespace for ADOT Collector as a DaemonSet. 3 | apiVersion: v1 4 | kind: Namespace 5 | metadata: 6 | name: {{ include "adotCollector.daemonSet.namespace" . }} 7 | labels: 8 | name: {{ include "adotCollector.daemonSet.namespace" . }} 9 | {{- include "adotCollector.daemonSet.labels" . | indent 4 }} 10 | {{- end }} 11 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | **Description:** 2 | 4 | 5 | **Link to tracking Issue:** 6 | 7 | **Testing:** 8 | 9 | **Documentation:** 10 | 11 | 12 | 13 | By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. 14 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: adot-exporter-for-eks-on-ec2 3 | description: A Helm chart for collecting metrics using ADOT Collector to send to AWS monitoring services. 4 | type: application 5 | version: 0.22.0 6 | appVersion: "0.37.0" 7 | kubeVersion: ">=1.19.0-0" 8 | maintainers: 9 | - name: Bryan Aguilar 10 | email: bryaag@amazon.com 11 | home: https://github.com/aws-observability/aws-otel-helm-charts/adot-exporter-for-eks-on-ec2 12 | sources: 13 | - https://github.com/aws-observability/aws-otel-helm-charts/adot-exporter-for-eks-on-ec2 14 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.adotCollector.daemonSet.enabled .Values.adotCollector.daemonSet.serviceAccount.create -}} 2 | # Service account provides identity information for a user to be able to authenticate processes running in a pod. 3 | apiVersion: v1 4 | kind: ServiceAccount 5 | metadata: 6 | name: {{ .Values.adotCollector.daemonSet.serviceAccount.name }} 7 | namespace: {{ include "adotCollector.daemonSet.namespace" . }} 8 | {{- with .Values.adotCollector.daemonSet.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end -}} 13 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/Makefile: -------------------------------------------------------------------------------- 1 | # Source Code from: https://github.com/aws/eks-charts 2 | # Run `make install-tools`, then `make all` for chart validation test and lint 3 | REPO_ROOT ?= $(shell git rev-parse --show-toplevel) 4 | 5 | .PHONY:all 6 | all: validate lint 7 | 8 | install-tools: 9 | ${REPO_ROOT}/charts/adot-exporter-for-eks-on-ec2/scripts/install-tools.sh 10 | 11 | .PHONY: validate 12 | validate: 13 | ${REPO_ROOT}/charts/adot-exporter-for-eks-on-ec2/scripts/validate-charts.sh 14 | 15 | .PHONY: lint 16 | lint: 17 | ${REPO_ROOT}/charts/adot-exporter-for-eks-on-ec2/scripts/lint-charts.sh 18 | 19 | .PHONY: clean 20 | clean: 21 | rm -rf ${REPO_ROOT}/build/ 22 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/scripts/lint-charts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | ROOT_PROJECT=$(git rev-parse --show-toplevel) 5 | BUILD_DIR="${ROOT_PROJECT}/build" 6 | TOOLS_DIR="${BUILD_DIR}/tools" 7 | CHART_DIR="${ROOT_PROJECT}/charts/adot-exporter-for-eks-on-ec2" 8 | export PATH="${TOOLS_DIR}:${PATH}" 9 | 10 | FAILED_V3=() 11 | 12 | echo "Linting chart ${CHART_DIR} with Helm v3" 13 | helmv3 lint ${CHART_DIR}/ || FAILED_V3+=("${CHART_DIR}") 14 | 15 | if [[ "${#FAILED_V3[@]}" -eq 0 ]]; then 16 | echo "All charts passed linting!" 17 | exit 0 18 | else 19 | echo "Helm v3:" 20 | for chart in "${FAILED_V3[@]}"; do 21 | printf "%40s ❌\n" "$chart" 22 | done 23 | fi 24 | 25 | # Source Code from: https://github.com/aws/eks-charts 26 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/scripts/validate-charts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | ROOT_PROJECT=$(git rev-parse --show-toplevel) 5 | BUILD_DIR="${ROOT_PROJECT}/build" 6 | TOOLS_DIR="${BUILD_DIR}/tools" 7 | CHART_DIR="${ROOT_PROJECT}/charts/adot-exporter-for-eks-on-ec2" 8 | export PATH="${TOOLS_DIR}:${PATH}" 9 | 10 | FAILED_V3=() 11 | 12 | echo "Chart validation ${CHART_DIR} with Helm v3" 13 | helmv3 template ${CHART_DIR} | kubeval || FAILED_V3+=("${CHART_DIR}") 14 | 15 | if [[ "${#FAILED_V3[@]}" -eq 0 ]]; then 16 | echo "All charts passed validation tests!" 17 | exit 0 18 | else 19 | echo "Helm v3:" 20 | for chart in "${FAILED_V3[@]}"; do 21 | printf "%40s ❌\n" "$chart" 22 | done 23 | fi 24 | 25 | # Source Code from: https://github.com/aws/eks-charts 26 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release Charts 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Configure Git 18 | run: | 19 | git config user.name "$GITHUB_ACTOR" 20 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 21 | 22 | - name: Install Helm 23 | uses: azure/setup-helm@v1 24 | with: 25 | version: v3.7.1 26 | 27 | - name: Run chart-releaser 28 | uses: helm/chart-releaser-action@v1.4.0 29 | env: 30 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 31 | CR_SKIP_EXISTING: true 32 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.adotCollector.daemonSet.enabled }} 2 | # ClusterRoleBinding for ADOT Collector as a DaemonSet references and grants permissions defined in ClusterRole to service accounts/users/groups in subjects. 3 | kind: ClusterRoleBinding 4 | apiVersion: rbac.authorization.k8s.io/v1 5 | metadata: 6 | name: {{ .Values.adotCollector.daemonSet.clusterRoleBindingName }} 7 | labels: 8 | {{- include "adotCollector.daemonSet.labels" . | indent 4 }} 9 | subjects: 10 | - kind: ServiceAccount 11 | name: {{ .Values.adotCollector.daemonSet.serviceAccount.name }} 12 | namespace: {{ include "adotCollector.daemonSet.namespace" . }} 13 | roleRef: 14 | kind: ClusterRole 15 | name: {{ .Values.adotCollector.daemonSet.clusterRoleName }} 16 | apiGroup: rbac.authorization.k8s.io 17 | {{- end }} 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | **Describe the bug** 12 | A clear and concise description of what the bug is. 13 | 14 | **Steps to reproduce** 15 | If possible, provide a recipe for reproducing the error. 16 | 17 | **What did you expect to see?** 18 | A clear and concise description of what you expected to see. 19 | 20 | **What did you see instead?** 21 | A clear and concise description of what you saw instead. 22 | 23 | **Environment** 24 | Describe any aspect of your environment relevant to the problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/scripts/install-tools.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') 5 | ARCH=$([[ $(uname -m) = "x86_64" ]] && echo 'amd64' || echo 'arm64') 6 | ROOT_PROJECT=$(git rev-parse --show-toplevel) 7 | BUILD_DIR="${ROOT_PROJECT}/build" 8 | TMP_DIR="${BUILD_DIR}/tmp" 9 | TOOLS_DIR="${BUILD_DIR}/tools" 10 | mkdir -p "${TOOLS_DIR}" 11 | export PATH="${TOOLS_DIR}:${PATH}" 12 | 13 | HELM_VERSION_TAG=$(curl -sSL https://github.com/helm/helm/releases/latest | sed -n '//,$p' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1) 14 | HELM_VERSION=v${HELM_VERSION_TAG} 15 | 16 | ## Install kubeval 17 | mkdir -p "${TMP_DIR}/kubeval" 18 | curl -sSL https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-${PLATFORM}-${ARCH}.tar.gz | tar xz -C "${TMP_DIR}/kubeval" 19 | mv "${TMP_DIR}/kubeval/kubeval" "${TOOLS_DIR}/kubeval" 20 | 21 | ## Install helm v3 22 | mkdir -p "${TMP_DIR}/helmv3" 23 | curl -sSL https://get.helm.sh/helm-${HELM_VERSION}-${PLATFORM}-${ARCH}.tar.gz | tar xz -C "${TMP_DIR}/helmv3" 24 | mv "${TMP_DIR}/helmv3/${PLATFORM}-${ARCH}/helm" "${TOOLS_DIR}/helmv3" 25 | rm -rf "${PLATFORM}-${ARCH}" 26 | 27 | ## Remove TMP directory 28 | rm -rf ${TMP_DIR} 29 | 30 | # Source Code from: https://github.com/aws/eks-charts 31 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.adotCollector.daemonSet.enabled }} 2 | # ClusterRole for ADOT Collector as a DaemonSet contains rules, and defines and grants permissions to specified resources/endpoints. 3 | kind: ClusterRole 4 | apiVersion: rbac.authorization.k8s.io/v1 5 | metadata: 6 | name: {{ .Values.adotCollector.daemonSet.clusterRoleName }} 7 | labels: 8 | {{- include "adotCollector.daemonSet.labels" . | indent 4 }} 9 | rules: 10 | - apiGroups: [""] 11 | resources: ["pods", "nodes", "endpoints"] 12 | verbs: ["list", "watch"] 13 | - apiGroups: ["apps"] 14 | resources: ["replicasets"] 15 | verbs: ["list", "watch"] 16 | - apiGroups: ["batch"] 17 | resources: ["jobs"] 18 | verbs: ["list", "watch"] 19 | - apiGroups: [""] 20 | resources: ["nodes/proxy"] 21 | verbs: ["get"] 22 | - apiGroups: [""] 23 | resources: ["nodes/stats", "configmaps", "events"] 24 | verbs: ["create", "get"] 25 | - apiGroups: [""] 26 | resources: ["configmaps"] 27 | resourceNames: ["adot-container-insight-clusterleader", "otel-container-insight-clusterleader"] 28 | verbs: ["get","update"] 29 | - apiGroups: ["coordination.k8s.io"] 30 | resources: ["leases"] 31 | resourceNames: ["otel-container-insight-clusterleader"] 32 | verbs: ["get", "update", "create"] 33 | - apiGroups: ["coordination.k8s.io"] 34 | resources: ["leases"] 35 | verbs: ["get", "create"] 36 | {{- end }} 37 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/sidecar.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.adotCollector.sidecar.enabled }} 2 | # ADOT Collector as a Sidecar for deployment. 3 | apiVersion: apps/v1 4 | kind: Deployment 5 | metadata: 6 | name: {{ .Values.adotCollector.sidecar.name }} 7 | namespace: {{ .Values.adotCollector.sidecar.namespace }} 8 | labels: 9 | name: {{ .Values.adotCollector.sidecar.name }} 10 | {{- include "adotCollector.daemonSet.labels" . | indent 4 }} 11 | spec: 12 | replicas: {{ .Values.adotCollector.sidecar.replicas }} 13 | selector: 14 | matchLabels: 15 | name: {{ .Values.adotCollector.sidecar.name }} 16 | template: 17 | metadata: 18 | labels: 19 | name: {{ .Values.adotCollector.sidecar.name }} 20 | {{- include "adotCollector.daemonSet.labels" . | indent 8 }} 21 | spec: 22 | containers: 23 | - name: "{{ .Values.adotCollector.sidecar.image.name }}" 24 | image: "{{ .Values.adotCollector.sidecar.image.repository }}:{{ .Values.adotCollector.sidecar.image.tag }}" 25 | imagePullPolicy: {{ .Values.adotCollector.sidecar.image.pullPolicy }} 26 | - name: "{{ .Values.adotCollector.image.name }}" 27 | image: "{{ .Values.adotCollector.image.repository }}:{{ .Values.adotCollector.image.tag }}" 28 | env: 29 | - name: AWS_REGION 30 | value: {{ .Values.awsRegion }} 31 | imagePullPolicy: {{ .Values.adotCollector.image.sidecarPullPolicy }} 32 | resources: 33 | {{- toYaml .Values.adotCollector.sidecar.resources | nindent 12 }} 34 | {{- end }} 35 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/documentation/deploy_collector_as_sidecar.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Deploy ADOT Collector as a Sidecar 4 | 5 | A sidecar is a microservice design pattern where a companion service runs next to your primary microservice, augmenting its abilities or intercepting resources it is utilizing. The sidecar pattern would be the best fit for a single application monitoring. 6 | 7 | In order to deploy the ADOT Collector in Sidecar mode using the Helm chart, 1) update sidecar.yaml and values.yaml files in the Helm chart with the application configurations and 2) include the use of --set flag in the helm install command from [Install Chart](https://github.com/aws-observability/aws-otel-helm-charts/tree/main/charts/adot-exporter-for-eks-on-ec2#install-chart). 8 | Please refer to the installation documentation to ensure your helm chart is configured to send metrics and logs to the platform of your choice. 9 | 10 | 11 | ```console 12 | $ helm install \ 13 | [RELEASE_NAME] [REPO_NAME]/adot-exporter-for-eks-on-ec2 \ 14 | --set clusterName=[CLUSTER_NAME] --set awsRegion=[AWS_REGION] \ 15 | --set adotCollector.daemonSet.enabled=false \ 16 | --set adotCollector.sidecar.enabled=true 17 | ``` 18 | The use of `--set` flag with `enabled=true` or `enabled=false` can switch on/off the specified deployment mode. The command set enabled=false for ADOT Collector as DaemonSet and enabled=true to deploy ADOT Collector as Sidecar. You can also check whether your applications are successfully deployed by executing the following command. 19 | 20 | ```console 21 | 22 | $ kubectl get pods --all-namespaces 23 | 24 | NAMESPACE NAME READY STATUS RESTARTS AGE 25 | AGEadot-sidecar-namespace adot-sidecar-658dc9ffbb-w9zv2 2/2 Running 0 18s 26 | amazon-cloudwatch fluent-bit-9dcql 1/1 Running 0 18s 27 | amazon-cloudwatch fluent-bit-wqhmd 1/1 Running 0 18s 28 | ``` 29 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/daemonset.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.adotCollector.daemonSet.enabled }} 2 | # ADOT Collector as a DaemonSet for deployment. 3 | apiVersion: apps/v1 4 | kind: DaemonSet 5 | metadata: 6 | name: {{ .Values.adotCollector.daemonSet.daemonSetName }} 7 | namespace: {{ .Values.adotCollector.daemonSet.namespace }} 8 | labels: 9 | {{- include "adotCollector.daemonSet.labels" . | indent 4 }} 10 | spec: 11 | selector: 12 | matchLabels: 13 | name: {{ .Values.adotCollector.daemonSet.daemonSetName }} 14 | {{- include "adotCollector.daemonSet.selectorLabels" . | indent 6 }} 15 | template: 16 | metadata: 17 | labels: 18 | name: {{ .Values.adotCollector.daemonSet.daemonSetName }} 19 | {{- include "adotCollector.daemonSet.labels" . | indent 8 }} 20 | annotations: 21 | checksum/config: {{ include (print $.Template.BasePath "/adot-collector/configmap.yaml") . | sha256sum }} 22 | spec: 23 | containers: 24 | - name: {{ .Values.adotCollector.daemonSet.containersName }} 25 | image: "{{ .Values.adotCollector.image.repository }}:{{ .Values.adotCollector.image.tag }}" 26 | imagePullPolicy: {{ .Values.adotCollector.image.daemonSetPullPolicy }} 27 | env: 28 | {{- toYaml .Values.adotCollector.daemonSet.env | nindent 12}} 29 | command: 30 | {{- toYaml .Values.adotCollector.daemonSet.command | nindent 12}} 31 | volumeMounts: 32 | {{- toYaml .Values.adotCollector.daemonSet.volumeMounts | nindent 12 }} 33 | resources: 34 | {{- toYaml .Values.adotCollector.daemonSet.resources | nindent 12 }} 35 | volumes: 36 | {{- toYaml .Values.adotCollector.daemonSet.volumes | nindent 10 }} 37 | serviceAccountName: {{ .Values.adotCollector.daemonSet.serviceAccount.name }} 38 | tolerations: 39 | {{- toYaml .Values.adotCollector.daemonSet.tolerations | nindent 8 }} 40 | {{- end }} 41 | -------------------------------------------------------------------------------- /.github/workflows/stale-bot.yml: -------------------------------------------------------------------------------- 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). 4 | # You may not use this file except in compliance with the License. 5 | # A copy of the License is located at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # or in the "license" file accompanying this file. This file is distributed 10 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | # express or implied. See the License for the specific language governing 12 | # permissions and limitations under the License. 13 | 14 | name: 'Close stale issues and PR' 15 | on: 16 | schedule: 17 | - cron: '0 20 * * SUN' # every Sunday at 20 am UTC: PST 0:00 AM " 18 | 19 | 20 | jobs: 21 | stale-close: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - name: Mark the issues/pr 25 | uses: actions/stale@v6 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} #Github workflow will add a temporary token when executing the workflow 28 | with: 29 | #Github stale actions: https://github.com/actions/stale 30 | #Message 31 | stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled' 32 | stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.' 33 | close-issue-message: 'This issue was closed because it has been marked as stale for 30 days with no activity.' 34 | #Labels 35 | stale-issue-label: stale #Mark the issue as closing-soon if staling for 60 days 36 | stale-pr-label: stale #Mark the pr as no-pr-activity if staling for 30 days 37 | #Days required 38 | days-before-issue-stale: 90 #Mark the issues as after 90 days 39 | days-before-pr-stale: 60 #Mark the PR as stale after 60 days 40 | days-before-issue-close: 30 #Close the issue if the issue has been marked as stale for 30 days 41 | days-before-pr-close: -1 #Never close down the PR and keep the label stale on the PR 42 | #Optionals 43 | enable-statistics: true #Show the statistics of what have done so far 44 | operations-per-run: 100 #Max number of operations per run 45 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* chart specific names and labels that may be re-used in the chart */}} 3 | {{/* 4 | Expand the name of the chart. 5 | */}} 6 | {{- define "adotCollector.daemonSet.name" -}} 7 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 8 | {{- end -}} 9 | 10 | {{/* 11 | Create a default fully qualified app name. 12 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 13 | If release name contains chart name it will be used as a full name. 14 | */}} 15 | {{- define "adotCollector.daemonSet.fullname" -}} 16 | {{- if .Values.fullnameOverride -}} 17 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 18 | {{- else -}} 19 | {{- $name := default .Chart.Name .Values.nameOverride -}} 20 | {{- if contains $name .Release.Name -}} 21 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 22 | {{- else -}} 23 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 24 | {{- end -}} 25 | {{- end -}} 26 | {{- end -}} 27 | 28 | {{/* 29 | Create chart name and version as used by the chart label. 30 | */}} 31 | {{- define "adotCollector.daemonSet.chart" -}} 32 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 33 | {{- end -}} 34 | 35 | {{/* 36 | Common labels 37 | */}} 38 | {{- define "adotCollector.daemonSet.labels" }} 39 | helm.sh/chart: {{ include "adotCollector.daemonSet.chart" . }} 40 | {{- include "adotCollector.daemonSet.selectorLabels" . }} 41 | {{- if .Chart.AppVersion }} 42 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 43 | {{- end }} 44 | app.kubernetes.io/component: opentelemetry 45 | app.kubernetes.io/part-of: {{ template "adotCollector.daemonSet.name" . }} 46 | app.kubernetes.io/managed-by: {{ .Release.Service }} 47 | {{- if .Values.additionalLabels }} 48 | {{ toYaml .Values.additionalLabels }} 49 | {{- end }} 50 | {{- end }} 51 | 52 | {{/* 53 | Selector labels 54 | */}} 55 | {{- define "adotCollector.daemonSet.selectorLabels" }} 56 | app.kubernetes.io/name: {{ include "adotCollector.daemonSet.name" . }} 57 | app.kubernetes.io/instance: {{ .Release.Name }} 58 | {{- end }} 59 | 60 | {{/* 61 | Create the name of the service account to use 62 | */}} 63 | {{- define "adotCollector.daemonSet.serviceAccountName" -}} 64 | {{ default (include "adotCollector.daemonSet.fullname" .) .Values.adotCollector.daemonSet.serviceAccount.name }} 65 | {{- end -}} 66 | 67 | 68 | {{/* 69 | Allow the release namespace to be overridden for multi-namespace deployments in combined charts. 70 | */}} 71 | {{- define "adotCollector.daemonSet.namespace" -}} 72 | {{- if .Values.global -}} 73 | {{- if .Values.global.namespaceOverride -}} 74 | {{- .Values.global.namespaceOverride -}} 75 | {{- else -}} 76 | {{- .Values.adotCollector.daemonSet.namespace -}} 77 | {{- end -}} 78 | {{- else -}} 79 | {{- .Values.adotCollector.daemonSet.namespace -}} 80 | {{- end -}} 81 | {{- end -}} 82 | 83 | 84 | {{/* 85 | Allow the release namespace to be overridden for multi-namespace deployments in combined charts. 86 | */}} 87 | {{- define "adotCollector.sidecar.namespace" -}} 88 | {{- if .Values.global -}} 89 | {{- if .Values.global.namespaceOverride -}} 90 | {{- .Values.global.namespaceOverride -}} 91 | {{- else -}} 92 | {{- .Values.adotCollector.sidecar.namespace -}} 93 | {{- end -}} 94 | {{- else -}} 95 | {{- .Values.adotCollector.sidecar.namespace -}} 96 | {{- end -}} 97 | {{- end -}} 98 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/templates/adot-collector/configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.adotCollector.daemonSet.enabled }} 2 | # ConfigMap for ADOT Collector as a DaemonSet with the specified configurations, including configured values from values.yaml. 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: {{ .Values.adotCollector.daemonSet.configMap.name }} 7 | namespace: {{ .Values.adotCollector.daemonSet.namespace }} 8 | labels: 9 | app: {{ .Values.adotCollector.daemonSet.configMap.app }} 10 | component: {{ .Values.adotCollector.daemonSet.configMap.component }} 11 | {{- include "adotCollector.daemonSet.labels" . | indent 4 }} 12 | data: 13 | adot-config: | 14 | extensions: 15 | health_check: {{ .Values.adotCollector.daemonSet.extensions.healthCheck }} 16 | sigv4auth: 17 | region: {{ .Values.awsRegion }} 18 | receivers: 19 | awscontainerinsightreceiver: 20 | collection_interval: {{ .Values.adotCollector.daemonSet.cwreceivers.collectionInterval }} 21 | container_orchestrator: {{ .Values.adotCollector.daemonSet.cwreceivers.containerOrchestrator }} 22 | add_service_as_attribute: {{ .Values.adotCollector.daemonSet.cwreceivers.addServiceAsAttribute }} 23 | prefer_full_pod_name: {{ .Values.adotCollector.daemonSet.cwreceivers.preferFullPodName }} 24 | add_full_pod_name_metric_label: {{ .Values.adotCollector.daemonSet.cwreceivers.addFullPodNameMetricLabel }} 25 | prometheus: 26 | config: 27 | global: 28 | scrape_interval: {{ .Values.adotCollector.daemonSet.ampreceivers.scrapeInterval }} 29 | scrape_timeout: {{ .Values.adotCollector.daemonSet.ampreceivers.scrapeTimeout }} 30 | scrape_configs: 31 | {{ .Values.adotCollector.daemonSet.ampreceivers.scrapeConfigs | nindent 12 }} 32 | processors: 33 | batch/metrics: 34 | timeout: {{ .Values.adotCollector.daemonSet.processors.timeout }} 35 | exporters: 36 | awsemf: 37 | namespace: {{ .Values.adotCollector.daemonSet.cwexporters.namespace }} 38 | log_group_name: '/aws/containerinsights/{{ .Values.clusterName }}/performance' 39 | log_stream_name: {{ .Values.adotCollector.daemonSet.cwexporters.logStreamName }} 40 | region: {{ .Values.awsRegion }} 41 | resource_to_telemetry_conversion: 42 | enabled: {{ .Values.adotCollector.daemonSet.cwexporters.enabled }} 43 | dimension_rollup_option: {{ .Values.adotCollector.daemonSet.cwexporters.dimensionRollupOption }} 44 | parse_json_encoded_attr_values: {{- range .Values.adotCollector.daemonSet.cwexporters.parseJsonEncodedAttrValues }} 45 | - {{.}}{{- end }} 46 | metric_declarations: 47 | {{ .Values.adotCollector.daemonSet.metricDeclarations | nindent 10 }} 48 | prometheusremotewrite: 49 | namespace: {{ .Values.adotCollector.daemonSet.ampexporters.namespace }} 50 | endpoint: {{ .Values.adotCollector.daemonSet.ampexporters.endpoint }} 51 | resource_to_telemetry_conversion: 52 | enabled: {{ .Values.adotCollector.daemonSet.ampexporters.resourcetootel }} 53 | auth: 54 | authenticator: {{ .Values.adotCollector.daemonSet.ampexporters.authenticator }} 55 | 56 | service: 57 | pipelines: 58 | metrics: 59 | receivers: {{- range .Values.adotCollector.daemonSet.service.metrics.receivers }} 60 | - {{.}} {{- end }} 61 | processors: {{- range .Values.adotCollector.daemonSet.service.metrics.processors }} 62 | - {{.}} {{- end }} 63 | exporters: {{- range .Values.adotCollector.daemonSet.service.metrics.exporters }} 64 | - {{.}} {{- end }} 65 | extensions: {{- range .Values.adotCollector.daemonSet.service.extensions }} 66 | - {{.}} {{- end }} 67 | {{- end }} 68 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional 4 | documentation, we greatly value feedback and contributions from our community. 5 | 6 | While we value any contributions and do our best to get back to you with questions in a timely manner, please note that we're releasing new versions not on a fixed schedule. In other words, we review (and merge) contributions on a best-effort basis. 7 | 8 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary 9 | information to effectively respond to your bug report or contribution. 10 | 11 | 12 | ## Reporting Bugs/Feature Requests 13 | 14 | We welcome you to use the [GitHub issue tracker](https://github.com/aws-observability/aws-otel-helm-charts/issues) to report bugs or suggest features. 15 | 16 | When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already 17 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: 18 | 19 | * A reproducible test case or series of steps 20 | * The version of our code being used 21 | * Any modifications you've made relevant to the bug 22 | * Anything unusual about your environment or deployment 23 | 24 | 25 | ## Contributing via Pull Requests 26 | Contributions via [pull requests](https://github.com/aws-observability/aws-otel-helm-charts/pulls) are much appreciated. Before sending us a pull request, please ensure that: 27 | 28 | 1. You are working against the latest source on the *main* branch. 29 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 30 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. 31 | 32 | To send us a pull request, please: 33 | 34 | 1. Fork the repository. 35 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. 36 | 3. Ensure local tests pass. 37 | 4. Commit to your fork using clear commit messages. 38 | 5. Send us a pull request, answering any default questions in the pull request interface. 39 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. 40 | 41 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and 42 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 43 | 44 | 45 | ## Finding contributions to work on 46 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. 47 | 48 | 49 | ## Code of Conduct 50 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 51 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 52 | opensource-codeofconduct@amazon.com with any additional questions or comments. 53 | 54 | 55 | ## Security issue notifications 56 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public Github issue. 57 | 58 | 59 | ## Licensing 60 | 61 | See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. 62 | 63 | We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes. 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AWS Distro for OpenTelemetry Helm Charts 2 | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) 3 | 4 | 5 | ### :warning: Warning: ADOT Helm Charts is deprecated and the recommended way for users who use EKS on EC2 and want to ingest metrics is using the [ADOT EKS add-on](https://aws-otel.github.io/docs/getting-started/adot-eks-add-on), a wrapper around the OpenTelemetry Operator. By using the respective custom resource configuration you can run it, for example, as a `Deployment` or a `Daemonset`. For details, see this [example of how to use the add-on to ingest metrics into Amazon Managed Service for Prometheus](https://aws-otel.github.io/docs/getting-started/adot-eks-add-on/config-amp). 6 | 7 | 8 | ## Introduction 9 | This AWS Distro for OpenTelemetry (ADOT) Helm Charts repository contains [Helm](https://helm.sh/) charts to provide easy mechanisms to setup the ADOT Collector and other collection agents to collect telemetry data such as metrics, logs and traces to send to AWS monitoring services. 10 | 11 | This repository contains a [Helm](https://helm.sh/) chart to provide easy to operate, end-to-end [AWS Elastic Kubernetes Service](https://aws.amazon.com/eks/) (EKS) on [AWS Elastic Compute Cloud](https://aws.amazon.com/ec2/) (EC2) monitoring with [AWS Distro for OpenTelemetry(ADOT) Collector](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-EKS-otel.html) for metrics. This Helm chart is useful for customers who use EKS on EC2 and want to collect metrics to send to Amazon CloudWatch Container Insights and Amazon Managed Service for Prometheus(AMP). 12 | 13 | ## Getting Started 14 | 15 | [Helm](https://helm.sh/) must be installed to use the chart. Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. 16 | 17 | Once Helm is set up properly, add this repo as follows: 18 | ```console 19 | $ helm repo add aws-observability https://aws-observability.github.io/aws-otel-helm-charts 20 | $ helm search repo aws-observability # Run this command in order to see the charts. 21 | ``` 22 | 23 | ### :warning: Warning: Fluent Bit and Fargate logging templates are deprecated and were removed from the Helm chart on December 30th, 2022 (>= 0.11.0) 24 | 25 | There is planned work in the upstream OpenTelemetry repositories to stabilize logs, and so that means that our Helm Chart will have to be updated to reflect these eventual changes. The changes required for our Helm Chart include: 26 | 27 | * Removing the [Fluent Bit logging templates](https://github.com/aws-observability/aws-otel-helm-charts/tree/main/charts/adot-exporter-for-eks-on-ec2/templates/aws-for-fluent-bit) 28 | * Removing the [Fargate logging templates](https://github.com/aws-observability/aws-otel-helm-charts/tree/main/charts/adot-exporter-for-eks-on-ec2/templates/aws-fargate-logging) 29 | 30 | Therefore, we recommend revising any code that utilizes these templates by December 30th, 2022 or continue to use the version of the Helm Chart that pre-dates December 30th (<= 0.10.0), 2022 to avoid any issues. As an alternative, you can also make use of the [`aws-for-fluent-bit`](https://github.com/aws/eks-charts/tree/master/stable/aws-for-fluent-bit) Helm Chart ([more details](https://github.com/aws-observability/aws-otel-helm-charts/issues/88)). 31 | 32 | Once logs are stabilized upstream and implemented, a new version of the Helm Chart will be released and users may upgrade to this instance instead. Thank you for your cooperation. 33 | 34 | 35 | ## Contributing 36 | 37 | See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. 38 | 39 | > NOTE: we're currently not accepting new PRs as we're evaluating our priorities concerning the ADOT Helm Charts. We plan to update this repo with a concrete timeline with the new policy by end of March 2023. 40 | 41 | ## License 42 | 43 | This project is licensed under the Apache 2.0 License. 44 | 45 | ## ADOT Roadmap 46 | 47 | You can track upcoming features and enhancements for ADOT on its [roadmap](https://github.com/orgs/aws-observability/projects/4). 48 | 49 | ## Support 50 | 51 | Please note that as per policy, we're providing support via GitHub on a best effort basis. However, if you have AWS Enterprise Support you can create a ticket and we will provide direct support within the respective SLAs. 52 | 53 | ## Security issue notifications 54 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. 55 | 56 | ## Maintainers 57 | 58 | - [Anthony Mirabella](https://github.com/Aneurysm9) 59 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/documentation/metrics_to_cloudwatch_amp.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Offload EKS cluster (on EC2) metrics to Amazon CloudWatch and/or Amazon Managed Prometheus(AMP) 4 | 5 | ## Install Chart 6 | 7 | The helm chart provides flexibility to offload mertrics into target platform(CloudWatch, AMP) of your choice. Here are the possible deployment options - 8 | * Offload metrics to Amazon Managed Prometheus(AMP) 9 | * Offload metrics to Amazon CloudWatch 10 | * Offload metrics to both Amazon Managed Prometheus(AMP) and Amazon CloudWatch 11 | 12 | The above-mentioned deployment modes are explained in-detail in the following sections. 13 | 14 | ### Default Mode (Offload metrics to only Amazon Managed Prometheus) 15 | 16 | By default, the helm chart is configured to offload metrics data to the Amazon Managed Prometheus(AMP) workspace only. You need update the `values.yaml` file to add the Remote Write Endpoint URL and the region for your AMP workspace. By default, the region is set to `us-west-2`. By default, only the `prometheus` receiver and `prometheusremotewrite` exporter is included to be able to send metrics to AMP. 17 | 18 | ```console 19 | helm install \ 20 | [RELEASE_NAME] [REPO_NAME]/adot-exporter-for-eks-on-ec2 \ 21 | --set clusterName=[CLUSTER_NAME] --set awsRegion=[AWS_REGION] 22 | ``` 23 | `CLUSTER_NAME` and `AWS_REGION` must be specified with your own EKS cluster and the region. You can find these values by executing following command. 24 | 25 | ```console 26 | $ kubectl config current-context 27 | 28 | [IAM_User_Name]@[CLUSTER_NAME].[AWS_REGION].eksctl.io 29 | ``` 30 | 31 | To verify the installation is successful, you can execute the following command. 32 | 33 | ```console 34 | $ kubectl get pods --all-namespaces 35 | 36 | NAMESPACE NAME READY STATUS RESTARTS AGE 37 | amazon-metrics adot-collector-daemonset-jlhvs 1/1 Running 0 5s 38 | amazon-metrics adot-collector-daemonset-ph7xs 1/1 Running 0 5s 39 | ``` 40 | If you see these two running pods, two for ADOT Collector as [DaemonSets](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) within the specified 41 | namespaces, they are successfully deployed. 42 | 43 | 44 | ### Offload metrics to Amazon CloudWatch 45 | 46 | To offload metrics to CloudWatch, you need to disable the AMP pipeline and enable the CloudWatch pipeline. You can either update the `values.yaml` to change the values of the following variable `exporters` and then run the `helm install` command as above. Only include the `awscontainerinsightreceiver` receiver and `awsemf` exporter to send metrics to CloudWatch Container Insights. 47 | 48 | ```console 49 | helm install \ 50 | [RELEASE_NAME] [REPO_NAME]/adot-exporter-for-eks-on-ec2 \ 51 | --set clusterName=[CLUSTER_NAME] --set awsRegion=[AWS_REGION] \ 52 | --set adotCollector.daemonSet.service.metrics.receivers={awscontainerinsightreceiver} 53 | --set adotCollector.daemonSet.service.metrics.exporters={awsemf} 54 | ``` 55 | 56 | To verify the installation is successful, you can execute the following command. 57 | 58 | ```console 59 | $ kubectl get pods --all-namespaces 60 | 61 | NAMESPACE NAME READY STATUS RESTARTS AGE 62 | amazon-metrics adot-collector-daemonset-jlhvs 1/1 Running 0 5s 63 | amazon-metrics adot-collector-daemonset-ph7xs 1/1 Running 0 5s 64 | amazon-cloudwatch fluent-bit-16rrn 1/1 Running 0 5s 65 | amazon-cloudwatch fluent-bit-ksj6f 1/1 Running 0 5s 66 | ``` 67 | If you see these four running pods, two for ADOT Collector and two for Fluent Bit as [DaemonSets](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) within the specified 68 | namespaces, they are successfully deployed. 69 | 70 | 71 | ### Offload metrics to both CloudWatch and Amazon Managed Prometheus(AMP) 72 | 73 | To send metrics to CloudWatch and AMP, you need to enable the CloudWatch pipeline. You can either update the `values.yaml` to change the values of the following variable `exporters` and then run the `helm install` command as above. Include both `prometheus`, `awscontainerinsightreceiver` as receivers, `awsemf`,`prometheusremotewrite` exporter to send metrics to both CloudWatch and AMP. 74 | 75 | ```console 76 | helm install \ 77 | [RELEASE_NAME] [REPO_NAME]/adot-exporter-for-eks-on-ec2 \ 78 | --set clusterName=[CLUSTER_NAME] --set awsRegion=[AWS_REGION] \ 79 | --set adotCollector.daemonSet.service.metrics.receivers={prometheus,awscontainerinsightreceiver} 80 | --set adotCollector.daemonSet.service.metrics.exporters={prometheusremotewrite,awsemf} 81 | ``` 82 | 83 | To verify the installation is successful, you can execute the following command. 84 | 85 | ```console 86 | $ kubectl get pods --all-namespaces 87 | 88 | NAMESPACE NAME READY STATUS RESTARTS AGE 89 | amazon-metrics adot-collector-daemonset-jlhvs 1/1 Running 0 5s 90 | amazon-metrics adot-collector-daemonset-ph7xs 1/1 Running 0 5s 91 | amazon-cloudwatch fluent-bit-16rrn 1/1 Running 0 5s 92 | amazon-cloudwatch fluent-bit-ksj6f 1/1 Running 0 5s 93 | ``` 94 | If you see these four running pods, two for ADOT Collector and two for Fluent Bit as [DaemonSets](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) within the specified 95 | namespaces, they are successfully deployed. 96 | 97 | 98 | ## Verify the Helm chart works as expected 99 | 100 | Run chart validation test and lint from MakeFile. 101 | 102 | ```console 103 | $ cd adot-exporter-for-eks-on-ec2 104 | $ make install-tools # required initially 105 | $ make all # to run chart validation test and lint 106 | ``` 107 | 108 | ## Verify the metrics are sent to Amazon CloudWatch 109 | 110 | * Open Amazon CloudWatch console 111 | * Select "Logs → Log groups" on the left navigation bar. 112 | * Check if following four log groups exist (performance log group will take longer than others). 113 | 114 | 115 | ```console 116 | /aws/containerinsights/[CLUSTER_NAME]/application 117 | /aws/containerinsights/[CLUSTER_NAME]/dataplane 118 | /aws/containerinsights/[CLUSTER_NAME]/host 119 | /aws/containerinsights/[CLUSTER_NAME]/performance 120 | ``` 121 | 122 | ![alt text](screenshots/Cloudwatch_dash.png?raw=true "CW Metrics") 123 | 124 | 125 | ## Verify the metrics are sent to Amazon Managed Service for Prometheus(AMP) 126 | 127 | Connect to Amazon Managed Service for Grafana to visualize metrics stored in AMP. Please see the following [document](https://docs.aws.amazon.com/grafana/latest/userguide/AMP-adding-AWS-config.html) to setup the Grafana environment. 128 | 129 | ![alt text](screenshots/Amp_dash.png?raw=true "Amp Metrics") 130 | 131 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/README.md: -------------------------------------------------------------------------------- 1 | # ADOT Helm chart for EKS on EC2 metrics and logs to Amazon CloudWatch Container Insights 2 | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) 3 | 4 | This [Helm](https://helm.sh/) chart provides easy to use [AWS Elastic Kubernetes Service](https://aws.amazon.com/eks/) (EKS) on [AWS Elastic Compute Cloud](https://aws.amazon.com/ec2/) (EC2) monitoring with [AWS Distro for OpenTelemetry(ADOT) Collector](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-EKS-otel.html) for metrics. Therefore, the Helm chart is useful for customers who use EKS on EC2 and want to collect metrics from clusters. The metrics will be sent to Amazon CloudWatch Container Insights and [Amazon Managed Service for Prometheus](https://aws.amazon.com/prometheus/?trk=f6e79447-9b4c-4310-8415-1a76de2de47f&sc_channel=ps&sc_campaign=acquisition&sc_medium=ACQ-P|PS-GO|Non-Brand|Desktop|SU|Management%20Tools|Solution|US|EN|DSA&ef_id=CjwKCAiAg6yRBhBNEiwAeVyL0KLIKHm3fznhVURTI6T-WBvANCmqo3r0-pYp_U82lIDDMmXRXDk0DBoCohQQAvD_BwE:G:s&s_kwcid=AL!4422!3!579408286031!!!g!!) (AMP). 5 | 6 | The Helm chart configured in this repository deploys the ADOT Collector as [DaemonSets](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) and is ready to collect metrics and logs and send them to Amazon CloudWatch Container Insights and AMP. 7 | 8 | ## :warning: Warning: Fluent Bit and Fargate logging templates are deprecated and were removed from the Helm chart on December 30th, 2022 (>= 0.11.0) 9 | 10 | There is planned work in the upstream OpenTelemetry repositories to stabilize logs, and so that means that our Helm Chart will have to be updated to reflect these eventual changes. The changes required for our Helm Chart include: 11 | 12 | * Removing the [Fluent Bit logging templates](https://github.com/aws-observability/aws-otel-helm-charts/tree/main/charts/adot-exporter-for-eks-on-ec2/templates/aws-for-fluent-bit) 13 | * Removing the [Fargate logging templates](https://github.com/aws-observability/aws-otel-helm-charts/tree/main/charts/adot-exporter-for-eks-on-ec2/templates/aws-fargate-logging) 14 | 15 | Therefore, we recommend revising any code that utilizes these templates by December 30th, 2022 or continue to use the version of the Helm Chart that pre-dates December 30th (<= 0.10.0), 2022 to avoid any issues. As an alternative, you can also make use of the [`aws-for-fluent-bit`](https://github.com/aws/eks-charts/tree/master/stable/aws-for-fluent-bit) Helm Chart ([more details](https://github.com/aws-observability/aws-otel-helm-charts/issues/88)). 16 | 17 | Once logs are stabilized upstream and implemented, a new version of the Helm Chart will be released and users may upgrade to this instance instead. Thank you for your cooperation. 18 | 19 | ## Helm Chart Structure 20 | ```console 21 | adot-exporter-for-eks-on-ec2/ 22 | |-- scripts/ 23 | | |-- install-tools.sh 24 | | |-- lint-charts.sh 25 | | |-- validate-charts.sh 26 | |-- templates/ 27 | | |-- NOTES.txt 28 | | |-- adot-collector/ 29 | | | |-- _helpers.tpl 30 | | | |-- clusterrole.yaml 31 | | | |-- clusterrolebinding.yaml 32 | | | |-- configmap.yaml 33 | | | |-- daemonset.yaml 34 | | | |-- namespace.yaml 35 | | | |-- serviceaccount.yaml 36 | | | |-- sidecar.yaml 37 | | | |-- sidecarnamespace.yaml 38 | |-- documentation 39 | | |-- metrics_to_CloudWatch_AMP.md 40 | | |-- deploy_collector_as_sidcar.md 41 | | |-- aws_logging_on_Fargate.md 42 | |-- Chart.yaml 43 | |-- values.schema.json 44 | |-- values.yaml 45 | |-- Makefile 46 | |-- README.md 47 | ``` 48 | 49 | `templates` folder contains one subfolders, `aws-otel-collector`, and this subfolder contains template files that will be evaluated with the default values configured in `values.yaml.` 50 | 51 | `script` folder contains shell script files to run chart validation and lint tests with [Helm Lint](https://helm.sh/docs/helm/helm_lint/) and [Kubeval](https://kubeval.instrumenta.dev/). 52 | 53 | `values.yaml` file stores parameterized template defaults in the Helm chart. Using this file, we can provide more flexibility to our users to expose configuration that can be overriden at installation and upgrade time. 54 | 55 | `values.schema.json` file contains schemas of each values in values.yaml. It defines each values’ type, required keys, and constraints. 56 | 57 | `_helpers.tpl` files are used to define GO template helpers to create name variables. 58 | 59 | ## Prerequisites 60 | 61 | The following prerequisites need to be set up in order to install this Helm chart. 62 | 63 | - Your EKS Cluster on EC2 64 | - [Amazon CloudWatch Container Insights prerequisites](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-prerequisites.html) 65 | - Using the above instructions, please attach the ‘prometheusremotewriteacess’ policy to the nodes. 66 | - Your working [Amazon Managed Service for Prometheus(AMP) workspace](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html). 67 | - [Amazon Managed Service for Grafana](https://aws.amazon.com/grafana/) is the go-to platform for visualizing AMP data. 68 | - [Helm v3+](https://helm.sh/docs/helm/helm_install/) 69 | 70 | ## Get Repository Information 71 | 72 | [Helm](https://helm.sh/) must be installed to use the chart. Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. 73 | 74 | Once Helm is set up properly, add this repo as follows: 75 | ```console 76 | $ helm repo add [REPO_NAME] https://aws-observability.github.io/aws-otel-helm-charts 77 | $ helm search repo [REPO_NAME] # Run this command in order to see the charts. 78 | ``` 79 | 80 | ## Configuration 81 | To see all configurable options with detailed comments: 82 | 83 | ```console 84 | $ helm show values [REPO_NAME]/adot-exporter-for-eks-on-ec2 85 | ``` 86 | 87 | By changing values in `values.yaml`, you are able to customize the chart to use your preferred configuration. 88 | 89 | Following options are some useful configurations that can be applied to this Helm chart. 90 | 91 | ### Documentation 92 | 93 | Please follow the links to get more details for specific use cases and deployment of the collector. 94 | 95 | * To send metrics to CloudWatch and Amazon Managed Service for Prometheus(AMP) and logs to CloudWatch. Click [here](documentation/metrics_to_cloudwatch_amp.md). 96 | * To deploy the Adot Collector as a Sidecar. Click [here](documentation/deploy_collector_as_sidecar.md). 97 | * To deploy EKS on AWS Fargate. Click [here](documentation/aws_logging_on_fargate.md). 98 | * The various scenarios under which the Helm chart was tested has been documented [here](documentation/helm_chart_test_doc.pdf). 99 | 100 | 101 | ### Deploy ADOT Collector as Deployment and StatefulSet 102 | 103 | Deploying ADOT Collector as Deployment and StatefulSet mode requires installing ADOT Operator. See [OpenTelemetry Operator Helm Chart](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator) for detailed explanation. 104 | 105 | ## Uninstall Chart 106 | 107 | The following command uninstalls the chart. 108 | This will remove all the Kubernetes components associated with the chart and deletes the release. 109 | 110 | ```console 111 | $ helm uninstall [RELEASE_NAME] 112 | ``` 113 | 114 | ## Upgrade Chart 115 | 116 | ```console 117 | $ helm upgrade [RELEASE_NAME] [REPO_NAME]/adot-exporter-for-eks-on-ec2 118 | ``` 119 | 120 | ## Contributing 121 | 122 | See [CONTRIBUTING.md](../../CONTRIBUTING.md). 123 | 124 | ## Contributors 125 | 126 | [Hyunuk Lim](https://github.com/hyunuk) 127 | 128 | [James Park](https://github.com/JamesJHPark) 129 | 130 | [Ruthvik Ravindra](https://github.com/ruthvik17) 131 | 132 | ## Other useful links 133 | 134 | [Using AWS Distro for OpenTelemetry](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-EKS-otel.html) 135 | 136 | [Learn more about OpenTelemetry](https://opentelemetry.io/docs/) 137 | 138 | ## Questions 139 | 140 | To learn more about how to use AWS Distro for OpenTelemetry to collect data for your observability solution, check out the hands-on [AWS Observability workshop](https://observability.workshop.aws/en/adot.html). For any questions and issues, please feel free to reach out via [AWS OTeL Community](https://github.com/aws-observability/aws-otel-community/issues). 141 | 142 | 143 | ## License 144 | 145 | Apache 2.0 License. 146 | 147 | ## Support Plan 148 | 149 | Our team plans to fully support the code we plan to release in this repo. 150 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/values.yaml: -------------------------------------------------------------------------------- 1 | nameOverride: "" 2 | fullnameOverride: "" 3 | global: 4 | namespaceOverride: "" 5 | awsRegion: "" 6 | clusterName: "" 7 | 8 | # -- Additional labels to add into metadata 9 | additionalLabels: {} 10 | # app: adot 11 | 12 | serviceAccount: 13 | create: true 14 | annotations: {} 15 | name: "" 16 | 17 | adotCollector: 18 | image: 19 | name: "aws-otel-collector" 20 | repository: "amazon/aws-otel-collector" 21 | tag: "v0.37.0" 22 | daemonSetPullPolicy: "IfNotPresent" 23 | sidecarPullPolicy: "Always" 24 | daemonSet: 25 | enabled: true 26 | daemonSetName: "adot-collector-daemonset" 27 | createNamespace: true 28 | namespace: "amazon-metrics" 29 | namespaceOverride: "" 30 | serviceAccount: 31 | create: true 32 | name: "adot-collector-sa" 33 | annotations: {} 34 | clusterRoleName: "adot-collector-role" 35 | clusterRoleBindingName: "adot-collector-role-binding" 36 | configMap: 37 | name: "adot-conf" 38 | app: "opentelemetry" 39 | component: "adot-conf" 40 | containersName: "adot-collector-container" 41 | env: 42 | - name: "K8S_NODE_NAME" 43 | valueFrom: 44 | fieldRef: 45 | fieldPath: "spec.nodeName" 46 | - name: "HOST_IP" 47 | valueFrom: 48 | fieldRef: 49 | fieldPath: "status.hostIP" 50 | - name: "K8S_POD_NAME" 51 | valueFrom: 52 | fieldRef: 53 | fieldPath: "metadata.name" 54 | - name: "HOST_NAME" 55 | valueFrom: 56 | fieldRef: 57 | fieldPath: "spec.nodeName" 58 | - name: "K8S_NAMESPACE" 59 | valueFrom: 60 | fieldRef: 61 | fieldPath: "metadata.namespace" 62 | command: 63 | - "/awscollector" 64 | - "--config=/conf/adot-config.yaml" 65 | resources: 66 | limits: 67 | cpu: "200m" 68 | memory: "200Mi" 69 | requests: 70 | cpu: "200m" 71 | memory: "200Mi" 72 | tolerations: [] 73 | volumes: 74 | - configMap: 75 | name: "adot-conf" 76 | items: 77 | - key: "adot-config" 78 | path: "adot-config.yaml" 79 | name: "adot-config-vol" 80 | - name: "rootfs" 81 | hostPath: 82 | path: "/" 83 | - name: "dockersock" 84 | hostPath: 85 | path: "/var/run/docker.sock" 86 | - name: "varlibdocker" 87 | hostPath: 88 | path: "/var/lib/docker" 89 | - name: "containerdsock" 90 | hostPath: 91 | path: "/run/containerd/containerd.sock" 92 | - name: "sys" 93 | hostPath: 94 | path: "/sys" 95 | - name: "devdisk" 96 | hostPath: 97 | path: "/dev/disk/" 98 | volumeMounts: 99 | - name: "rootfs" 100 | mountPath: "/rootfs" 101 | readOnly: true 102 | - name: "dockersock" 103 | mountPath: "/var/run/docker.sock" 104 | readOnly: true 105 | - name: "varlibdocker" 106 | mountPath: "/var/lib/docker" 107 | readOnly: true 108 | - name: "containerdsock" 109 | mountPath: "/run/containerd/containerd.sock" 110 | readOnly: true 111 | - name: "sys" 112 | mountPath: "/sys" 113 | readOnly: true 114 | - name: "devdisk" 115 | mountPath: "/dev/disk" 116 | readOnly: true 117 | - name: "adot-config-vol" 118 | mountPath: "/conf" 119 | extensions: 120 | healthCheck: "" 121 | sigv4auth: 122 | region: "" 123 | cwreceivers: 124 | collectionInterval: "" 125 | containerOrchestrator: "" 126 | addServiceAsAttribute: "" 127 | preferFullPodName: "" 128 | addFullPodNameMetricLabel: "" 129 | processors: 130 | timeout: 60s 131 | cwexporters: 132 | namespace: "ContainerInsights" 133 | logGroupName: "" 134 | logStreamName: "InputNodeName" 135 | enabled: true 136 | dimensionRollupOption: "NoDimensionRollup" 137 | parseJsonEncodedAttrValues: ["Sources", "kubernetes"] 138 | metricDeclarations: | 139 | # node metrics 140 | - dimensions: [[NodeName, InstanceId, ClusterName]] 141 | metric_name_selectors: 142 | - node_cpu_utilization 143 | - node_memory_utilization 144 | - node_network_total_bytes 145 | - node_cpu_reserved_capacity 146 | - node_memory_reserved_capacity 147 | - node_number_of_running_pods 148 | - node_number_of_running_containers 149 | - dimensions: [[ClusterName]] 150 | metric_name_selectors: 151 | - node_cpu_utilization 152 | - node_memory_utilization 153 | - node_network_total_bytes 154 | - node_cpu_reserved_capacity 155 | - node_memory_reserved_capacity 156 | - node_number_of_running_pods 157 | - node_number_of_running_containers 158 | - node_cpu_usage_total 159 | - node_cpu_limit 160 | - node_memory_working_set 161 | - node_memory_limit 162 | # pod metrics 163 | - dimensions: [[PodName, Namespace, ClusterName], [Service, Namespace, ClusterName], [Namespace, ClusterName], [ClusterName]] 164 | metric_name_selectors: 165 | - pod_cpu_utilization 166 | - pod_memory_utilization 167 | - pod_network_rx_bytes 168 | - pod_network_tx_bytes 169 | - pod_cpu_utilization_over_pod_limit 170 | - pod_memory_utilization_over_pod_limit 171 | - dimensions: [[PodName, Namespace, ClusterName], [ClusterName]] 172 | metric_name_selectors: 173 | - pod_cpu_reserved_capacity 174 | - pod_memory_reserved_capacity 175 | - dimensions: [[PodName, Namespace, ClusterName]] 176 | metric_name_selectors: 177 | - pod_number_of_container_restarts 178 | # cluster metrics 179 | - dimensions: [[ClusterName]] 180 | metric_name_selectors: 181 | - cluster_node_count 182 | - cluster_failed_node_count 183 | # service metrics 184 | - dimensions: [[Service, Namespace, ClusterName], [ClusterName]] 185 | metric_name_selectors: 186 | - service_number_of_running_pods 187 | # node fs metrics 188 | - dimensions: [[NodeName, InstanceId, ClusterName], [ClusterName]] 189 | metric_name_selectors: 190 | - node_filesystem_utilization 191 | # namespace metrics 192 | - dimensions: [[Namespace, ClusterName], [ClusterName]] 193 | metric_name_selectors: 194 | - namespace_number_of_running_pods 195 | ampreceivers: 196 | scrapeInterval: 15s 197 | scrapeTimeout: 10s 198 | scrapeConfigs: | 199 | - job_name: 'k8s_metrics_scrape' 200 | sample_limit: 10000 201 | metrics_path: /metrics 202 | kubernetes_sd_configs: 203 | - role: pod 204 | relabel_configs: 205 | - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] 206 | action: keep 207 | regex: true 208 | - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] 209 | action: replace 210 | regex: (.+) 211 | target_label: __metrics_path__ 212 | - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] 213 | action: replace 214 | regex: ([^:]+)(?::\d+)?;(\d+) 215 | replacement: $$1:$$2 216 | target_label: __address__ 217 | - action: labelmap 218 | regex: __meta_kubernetes_pod_label_(.+) 219 | - source_labels: [__meta_kubernetes_pod_node_name] 220 | action: keep 221 | regex: ${K8S_NODE_NAME} 222 | - source_labels: [__meta_kubernetes_namespace] 223 | action: replace 224 | target_label: K8S_NAMESPACE 225 | - source_labels: [__meta_kubernetes_pod_name] 226 | action: replace 227 | target_label: K8S_POD_NAME 228 | - source_labels: [__meta_kubernetes_pod_container_name] 229 | action: replace 230 | target_label: EKS_Container 231 | 232 | ampexporters: 233 | namespaces: "" 234 | endpoint: "" 235 | resourcetootel: false 236 | authenticator: "sigv4auth" 237 | service: 238 | metrics: 239 | receivers: ["prometheus"] 240 | processors: ["batch/metrics"] 241 | exporters: ["prometheusremotewrite"] 242 | extensions: ["health_check", "sigv4auth"] 243 | 244 | sidecar: 245 | enabled: false 246 | name: "adot-sidecar" 247 | namespace: "adot-sidecar-namespace" 248 | namespaceOverride: "" 249 | regionS3: "" 250 | replicas: 1 251 | image: 252 | name: "" 253 | repository: "" 254 | tag: "" 255 | pullPolicy: "" 256 | resources: 257 | limits: 258 | cpu: "256m" 259 | memory: "512Mi" 260 | requests: 261 | cpu: "32m" 262 | memory: "24Mi" 263 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | -------------------------------------------------------------------------------- /charts/adot-exporter-for-eks-on-ec2/values.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema", 3 | "type": "object", 4 | "properties": { 5 | "nameOverride": { 6 | "type": "string" 7 | }, 8 | "fullnameOverride": { 9 | "type": "string" 10 | }, 11 | "global": { 12 | "type": "object", 13 | "properties": { 14 | "namespaceOverride": { 15 | "type": "string" 16 | } 17 | } 18 | }, 19 | "awsRegion": { 20 | "type": "string" 21 | }, 22 | "clusterName": { 23 | "type": "string" 24 | }, 25 | "serviceAccount": { 26 | "type": "object", 27 | "properties": { 28 | "create": { 29 | "type": "boolean" 30 | }, 31 | "annotations": { 32 | "type": "object" 33 | }, 34 | "name": { 35 | "type": "string" 36 | } 37 | } 38 | }, 39 | "adotCollector": { 40 | "type": "object", 41 | "properties": { 42 | "image": { 43 | "type": "object", 44 | "required": [ 45 | "repository", 46 | "daemonSetPullPolicy", 47 | "sidecarPullPolicy" 48 | ], 49 | "properties": { 50 | "name": { 51 | "type": "string" 52 | }, 53 | "repository": { 54 | "type": "string", 55 | "pattern": "^[a-z0-9\\.\\-_\\/]*$" 56 | }, 57 | "tag": { 58 | "type": "string" 59 | }, 60 | "daemonSetPullPolicy": { 61 | "type": "string", 62 | "pattern": "^(Always|Never|IfNotPresent)$" 63 | }, 64 | "sidecarPullPolicy": { 65 | "type": "string", 66 | "pattern": "^(Always|Never|IfNotPresent)$" 67 | } 68 | } 69 | }, 70 | "daemonSet": { 71 | "type": "object", 72 | "properties": { 73 | "enabled": { 74 | "type": "boolean" 75 | }, 76 | "daemonSetName": { 77 | "type": "string" 78 | }, 79 | "createNamespace": { 80 | "type": "boolean" 81 | }, 82 | "namespace": { 83 | "type": "string" 84 | }, 85 | "namespaceOverride": { 86 | "type": "string" 87 | }, 88 | "serviceAccount": { 89 | "type": "object", 90 | "properties": { 91 | "create": { 92 | "type": "boolean" 93 | }, 94 | "name": { 95 | "type": "string" 96 | }, 97 | "annotations": { 98 | "type": "object" 99 | } 100 | } 101 | }, 102 | "clusterRoleName": { 103 | "type": "string" 104 | }, 105 | "clusterRoleBindingName": { 106 | "type": "string" 107 | }, 108 | "configMap": { 109 | "type": "object", 110 | "properties": { 111 | "name": { 112 | "type": "string" 113 | }, 114 | "app": { 115 | "type": "string" 116 | }, 117 | "component": { 118 | "type": "string" 119 | } 120 | } 121 | }, 122 | "containersName": { 123 | "type": "string" 124 | }, 125 | "env": { 126 | "type": "array", 127 | "items": [ 128 | { 129 | "type": "object", 130 | "properties": { 131 | "name": { 132 | "type": "string" 133 | }, 134 | "valueFrom": { 135 | "type": "object", 136 | "properties": { 137 | "fieldRef": { 138 | "type": "object", 139 | "properties": { 140 | "fieldPath": { 141 | "type": "string" 142 | } 143 | } 144 | } 145 | } 146 | } 147 | } 148 | }, 149 | { 150 | "type": "object", 151 | "properties": { 152 | "name": { 153 | "type": "string" 154 | }, 155 | "valueFrom": { 156 | "type": "object", 157 | "properties": { 158 | "fieldRef": { 159 | "type": "object", 160 | "properties": { 161 | "fieldPath": { 162 | "type": "string" 163 | } 164 | } 165 | } 166 | } 167 | } 168 | } 169 | }, 170 | { 171 | "type": "object", 172 | "properties": { 173 | "name": { 174 | "type": "string" 175 | }, 176 | "valueFrom": { 177 | "type": "object", 178 | "properties": { 179 | "fieldRef": { 180 | "type": "object", 181 | "properties": { 182 | "fieldPath": { 183 | "type": "string" 184 | } 185 | } 186 | } 187 | } 188 | } 189 | } 190 | }, 191 | { 192 | "type": "object", 193 | "properties": { 194 | "name": { 195 | "type": "string" 196 | }, 197 | "valueFrom": { 198 | "type": "object", 199 | "properties": { 200 | "fieldRef": { 201 | "type": "object", 202 | "properties": { 203 | "fieldPath": { 204 | "type": "string" 205 | } 206 | } 207 | } 208 | } 209 | } 210 | } 211 | } 212 | ] 213 | }, 214 | "command": { 215 | "type": "array", 216 | "items": [ 217 | { 218 | "type": "string" 219 | }, 220 | { 221 | "type": "string" 222 | } 223 | ] 224 | }, 225 | "resources": { 226 | "type": "object", 227 | "properties": { 228 | "limits": { 229 | "type": "object", 230 | "properties": { 231 | "cpu": { 232 | "type": "string" 233 | }, 234 | "memory": { 235 | "type": "string" 236 | } 237 | } 238 | }, 239 | "requests": { 240 | "type": "object", 241 | "properties": { 242 | "cpu": { 243 | "type": "string" 244 | }, 245 | "memory": { 246 | "type": "string" 247 | } 248 | } 249 | } 250 | } 251 | }, 252 | "tolerations": { 253 | "type": "array" 254 | }, 255 | "volumes": { 256 | "type": "array", 257 | "items": [ 258 | { 259 | "type": "object", 260 | "properties": { 261 | "configMap": { 262 | "type": "object", 263 | "properties": { 264 | "name": { 265 | "type": "string" 266 | }, 267 | "items": { 268 | "type": "array", 269 | "items": [ 270 | { 271 | "type": "object", 272 | "properties": { 273 | "key": { 274 | "type": "string" 275 | }, 276 | "path": { 277 | "type": "string" 278 | } 279 | } 280 | } 281 | ] 282 | } 283 | } 284 | }, 285 | "name": { 286 | "type": "string" 287 | } 288 | } 289 | }, 290 | { 291 | "type": "object", 292 | "properties": { 293 | "name": { 294 | "type": "string" 295 | }, 296 | "hostPath": { 297 | "type": "object", 298 | "properties": { 299 | "path": { 300 | "type": "string" 301 | } 302 | } 303 | } 304 | } 305 | }, 306 | { 307 | "type": "object", 308 | "properties": { 309 | "name": { 310 | "type": "string" 311 | }, 312 | "hostPath": { 313 | "type": "object", 314 | "properties": { 315 | "path": { 316 | "type": "string" 317 | } 318 | } 319 | } 320 | } 321 | }, 322 | { 323 | "type": "object", 324 | "properties": { 325 | "name": { 326 | "type": "string" 327 | }, 328 | "hostPath": { 329 | "type": "object", 330 | "properties": { 331 | "path": { 332 | "type": "string" 333 | } 334 | } 335 | } 336 | } 337 | }, 338 | { 339 | "type": "object", 340 | "properties": { 341 | "name": { 342 | "type": "string" 343 | }, 344 | "hostPath": { 345 | "type": "object", 346 | "properties": { 347 | "path": { 348 | "type": "string" 349 | } 350 | } 351 | } 352 | } 353 | }, 354 | { 355 | "type": "object", 356 | "properties": { 357 | "name": { 358 | "type": "string" 359 | }, 360 | "hostPath": { 361 | "type": "object", 362 | "properties": { 363 | "path": { 364 | "type": "string" 365 | } 366 | } 367 | } 368 | } 369 | }, 370 | { 371 | "type": "object", 372 | "properties": { 373 | "name": { 374 | "type": "string" 375 | }, 376 | "hostPath": { 377 | "type": "object", 378 | "properties": { 379 | "path": { 380 | "type": "string" 381 | } 382 | } 383 | } 384 | } 385 | } 386 | ] 387 | }, 388 | "volumeMounts": { 389 | "type": "array", 390 | "items": [ 391 | { 392 | "type": "object", 393 | "properties": { 394 | "name": { 395 | "type": "string" 396 | }, 397 | "mountPath": { 398 | "type": "string" 399 | }, 400 | "readOnly": { 401 | "type": "boolean" 402 | } 403 | } 404 | }, 405 | { 406 | "type": "object", 407 | "properties": { 408 | "name": { 409 | "type": "string" 410 | }, 411 | "mountPath": { 412 | "type": "string" 413 | }, 414 | "readOnly": { 415 | "type": "boolean" 416 | } 417 | } 418 | }, 419 | { 420 | "type": "object", 421 | "properties": { 422 | "name": { 423 | "type": "string" 424 | }, 425 | "mountPath": { 426 | "type": "string" 427 | }, 428 | "readOnly": { 429 | "type": "boolean" 430 | } 431 | } 432 | }, 433 | { 434 | "type": "object", 435 | "properties": { 436 | "name": { 437 | "type": "string" 438 | }, 439 | "mountPath": { 440 | "type": "string" 441 | }, 442 | "readOnly": { 443 | "type": "boolean" 444 | } 445 | } 446 | }, 447 | { 448 | "type": "object", 449 | "properties": { 450 | "name": { 451 | "type": "string" 452 | }, 453 | "mountPath": { 454 | "type": "string" 455 | }, 456 | "readOnly": { 457 | "type": "boolean" 458 | } 459 | } 460 | }, 461 | { 462 | "type": "object", 463 | "properties": { 464 | "name": { 465 | "type": "string" 466 | }, 467 | "mountPath": { 468 | "type": "string" 469 | }, 470 | "readOnly": { 471 | "type": "boolean" 472 | } 473 | } 474 | }, 475 | { 476 | "type": "object", 477 | "properties": { 478 | "name": { 479 | "type": "string" 480 | }, 481 | "mountPath": { 482 | "type": "string" 483 | } 484 | } 485 | } 486 | ] 487 | }, 488 | "extensions": { 489 | "type": "object", 490 | "properties": { 491 | "healthCheck": { 492 | "type": "string" 493 | }, 494 | "region": { 495 | "type": "string" 496 | } 497 | } 498 | }, 499 | "receivers": { 500 | "type": "object", 501 | "properties": { 502 | "collectionInterval": { 503 | "type": "string" 504 | }, 505 | "containerOrchestrator": { 506 | "type": "string" 507 | }, 508 | "addServiceAsAttribute": { 509 | "type": "string" 510 | }, 511 | "preferFullPodName": { 512 | "type": "string" 513 | }, 514 | "addFullPodNameMetricLabel": { 515 | "type": "string" 516 | } 517 | } 518 | }, 519 | "processors": { 520 | "type": "object", 521 | "properties": { 522 | "timeout": { 523 | "type": "string" 524 | } 525 | } 526 | }, 527 | "exporters": { 528 | "type": "object", 529 | "properties": { 530 | "namespace": { 531 | "type": "string" 532 | }, 533 | "logGroupName": { 534 | "type": "string" 535 | }, 536 | "logStreamName": { 537 | "type": "string" 538 | }, 539 | "enabled": { 540 | "type": "boolean" 541 | }, 542 | "dimensionRollupOption": { 543 | "type": "string" 544 | }, 545 | "parseJsonEncodedAttrValues": { 546 | "type": "array", 547 | "items": [ 548 | { 549 | "type": "string" 550 | }, 551 | { 552 | "type": "string" 553 | } 554 | ] 555 | } 556 | } 557 | }, 558 | "metricDeclarations": { 559 | "type": "string" 560 | }, 561 | "service": { 562 | "type": "object", 563 | "properties": { 564 | "metrics": { 565 | "type": "object", 566 | "properties": { 567 | "receivers": { 568 | "type": "array", 569 | "items": [ 570 | { 571 | "type": "string" 572 | } 573 | ] 574 | }, 575 | "processors": { 576 | "type": "array", 577 | "items": [ 578 | { 579 | "type": "string" 580 | } 581 | ] 582 | }, 583 | "exporters": { 584 | "type": "array", 585 | "items": [ 586 | { 587 | "type": "string" 588 | } 589 | ] 590 | } 591 | } 592 | }, 593 | "extensions": { 594 | "type": "array", 595 | "items": [ 596 | { 597 | "type": "string" 598 | } 599 | ] 600 | } 601 | } 602 | } 603 | } 604 | }, 605 | "sidecar": { 606 | "type": "object", 607 | "properties": { 608 | "enabled": { 609 | "type": "boolean" 610 | }, 611 | "name": { 612 | "type": "string" 613 | }, 614 | "namespace": { 615 | "type": "string" 616 | }, 617 | "namespaceOverride": { 618 | "type": "string" 619 | }, 620 | "regionS3": { 621 | "type": "string" 622 | }, 623 | "replicas": { 624 | "type": "integer" 625 | }, 626 | "image": { 627 | "type": "object", 628 | "required": [ 629 | "repository", 630 | "pullPolicy" 631 | ], 632 | "properties": { 633 | "name": { 634 | "type": "string" 635 | }, 636 | "repository": { 637 | "type": "string", 638 | "pattern": "^[a-z0-9\\.\\-_\\/]*$" 639 | }, 640 | "tag": { 641 | "type": "string" 642 | }, 643 | "pullPolicy": { 644 | "type": "string", 645 | "pattern": "(^$|^(Always|Never|IfNotPresent))$" 646 | } 647 | } 648 | }, 649 | "otelOtlpEndPointValue": { 650 | "type": "string" 651 | }, 652 | "otelResourceAttributesValue": { 653 | "type": "string" 654 | }, 655 | "resources": { 656 | "type": "object", 657 | "properties": { 658 | "limits": { 659 | "type": "object", 660 | "properties": { 661 | "cpu": { 662 | "type": "string" 663 | }, 664 | "memory": { 665 | "type": "string" 666 | } 667 | } 668 | }, 669 | "requests": { 670 | "type": "object", 671 | "properties": { 672 | "cpu": { 673 | "type": "string" 674 | }, 675 | "memory": { 676 | "type": "string" 677 | } 678 | } 679 | } 680 | } 681 | } 682 | } 683 | } 684 | } 685 | } 686 | } 687 | } 688 | --------------------------------------------------------------------------------