Skip to content

Commit

Permalink
Merge branch 'main' into documentation/879-to-import-a-subset-of-k8s-…
Browse files Browse the repository at this point in the history
…logs
  • Loading branch information
BeElectronicSakshi authored Aug 22, 2024
2 parents 9a20e23 + b2fd641 commit 96cd059
Show file tree
Hide file tree
Showing 401 changed files with 14,037 additions and 2,445 deletions.
22 changes: 13 additions & 9 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name: Setup
description: sets up helm lint and testing environment
inputs:
create-kind-cluster: # id of input
description: 'Whether or not to create a kind cluster during setup'
create-kind-cluster: # id of input
description: "Whether or not to create a kind cluster during setup"
required: true
default: "false"
helm-version:
description: "The helm version to be used when setting up"
required: false
default: "v3.9.4"
runs:
using: "composite"
steps:
- name: Set up Helm
uses: azure/setup-helm@v3.5
uses: azure/setup-helm@v4.2.0
with:
version: v3.9.0
version: ${{ inputs.helm-version }}

- uses: actions/setup-python@v4
with:
Expand All @@ -29,8 +33,8 @@ runs:
- name: Add Dependencies
shell: bash
run: |
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add jaeger https://jaegertracing.github.io/helm-charts
helm repo add opensearch https://opensearch-project.github.io/helm-charts
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add jaeger https://jaegertracing.github.io/helm-charts
helm repo add opensearch https://opensearch-project.github.io/helm-charts
2 changes: 2 additions & 0 deletions .github/kind-1.24.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: dual
nodes:
- role: control-plane
image: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/kube-stack-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ jobs:
uses: ./.github/actions/setup
with:
create-kind-cluster: "true"
helm-version: "v3.11.3"

# We'll need this eventually, but for now leave it commented.
# - name: Install cert-manager
# run: |
# kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml
# kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager
# kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager
- name: Install cert-manager
run: |
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml
kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager
kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager
- name: Run chart-testing (install)
run: ct install --charts charts/opentelemetry-kube-stack
- name: Run Helm Install
run: |
helm dep build charts/opentelemetry-kube-stack
helm install opentelemetry-kube-stack charts/opentelemetry-kube-stack
1 change: 1 addition & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
uses: ./.github/actions/setup
with:
create-kind-cluster: "false"
helm-version: "v3.11.3"

- name: Run chart-testing (lint)
run: "ct lint --target-branch main
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/operator-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
git clone -b v"$appVersion" --single-branch https://github.com/open-telemetry/opentelemetry-operator.git ./opentelemetry-operator
- name: Install chainsaw
uses: kyverno/[email protected].4
uses: kyverno/[email protected].8

- name: Install metrics-server
run: |
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Run e2e tests
working-directory: ./opentelemetry-operator
# see https://github.com/open-telemetry/opentelemetry-helm-charts/issues/1180 for flaky test
run: chainsaw test --test-dir ./tests/e2e --exclude-test-regex "chainsaw/multiple-configmaps"
run: chainsaw test --test-dir ./tests/e2e --exclude-test-regex "chainsaw/multiple-configmaps" --exclude-test-regex "chainsaw/smoke-pod-dns-config"

operator-test-no-certmanager:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
git clone -b v"$appVersion" --single-branch https://github.com/open-telemetry/opentelemetry-operator.git ./opentelemetry-operator
- name: Install chainsaw
uses: kyverno/[email protected].4
uses: kyverno/[email protected].8

- name: Install metrics-server
run: |
Expand All @@ -117,4 +117,4 @@ jobs:
- name: Run e2e tests
working-directory: ./opentelemetry-operator
# see https://github.com/open-telemetry/opentelemetry-helm-charts/issues/1180 for flaky test
run: chainsaw test --test-dir ./tests/e2e --exclude-test-regex "chainsaw/multiple-configmaps"
run: chainsaw test --test-dir ./tests/e2e --exclude-test-regex "chainsaw/multiple-configmaps" --exclude-test-regex "chainsaw/smoke-pod-dns-config"
29 changes: 17 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@ OPERATOR_APP_VERSION ?= "$(shell cat ./charts/opentelemetry-operator/Chart.yaml
.PHONY: generate-examples
generate-examples:
for chart_name in $(CHARTS); do \
helm dependency build charts/$${chart_name}; \
EXAMPLES_DIR=charts/$${chart_name}/examples; \
EXAMPLES=$$(find $${EXAMPLES_DIR} -type d -maxdepth 1 -mindepth 1 -exec basename \{\} \;); \
for example in $${EXAMPLES}; do \
echo "Generating example: $${example}"; \
VALUES=$$(find $${EXAMPLES_DIR}/$${example} -name *values.yaml); \
rm -rf "$${EXAMPLES_DIR}/$${example}/rendered"; \
for value in $${VALUES}; do \
helm dependency build charts/$${chart_name}; \
helm template example charts/$${chart_name} --namespace default --values $${value} --output-dir "$${EXAMPLES_DIR}/$${example}/rendered"; \
mv $${EXAMPLES_DIR}/$${example}/rendered/$${chart_name}/templates/* "$${EXAMPLES_DIR}/$${example}/rendered"; \
SUBCHARTS_DIR=$${EXAMPLES_DIR}/$${example}/rendered/$${chart_name}/charts; \
SUBCHARTS=$$(find $${SUBCHARTS_DIR} -type d -maxdepth 1 -mindepth 1 -exec basename \{\} \;); \
for subchart in $${SUBCHARTS}; do \
mkdir -p "$${EXAMPLES_DIR}/$${example}/rendered/$${subchart}"; \
mv $${SUBCHARTS_DIR}/$${subchart}/templates/* "$${EXAMPLES_DIR}/$${example}/rendered/$${subchart}"; \
done; \
if [ -d "$${SUBCHARTS_DIR}" ]; then \
SUBCHARTS=$$(find $${SUBCHARTS_DIR} -type d -maxdepth 1 -mindepth 1 -exec basename \{\} \;); \
for subchart in $${SUBCHARTS}; do \
mkdir -p "$${EXAMPLES_DIR}/$${example}/rendered/$${subchart}"; \
mv $${SUBCHARTS_DIR}/$${subchart}/templates/* "$${EXAMPLES_DIR}/$${example}/rendered/$${subchart}"; \
done; \
fi; \
rm -rf $${EXAMPLES_DIR}/$${example}/rendered/$${chart_name}; \
done; \
done; \
Expand All @@ -46,6 +49,7 @@ check-examples:
if diff -r "$${EXAMPLES_DIR}/$${example}/rendered" "${TMP_DIRECTORY}/$${example}/$${chart_name}/templates" > /dev/null; then \
echo "Passed $${example}"; \
else \
diff -r "$${EXAMPLES_DIR}/$${example}/rendered" "${TMP_DIRECTORY}/$${example}/$${chart_name}/templates"; \
echo "Failed $${example}. run 'make generate-examples' to re-render the example with the latest $${example}/values.yaml"; \
rm -rf ${TMP_DIRECTORY}; \
exit 1; \
Expand All @@ -56,16 +60,16 @@ check-examples:

.PHONY: update-operator-crds
update-operator-crds:
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opampbridges.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_opampbridges.yaml)

.PHONY: check-operator-crds
check-operator-crds:
mkdir -p ${TMP_DIRECTORY}/crds
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opampbridges.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/community/manifests/opentelemetry.io_opampbridges.yaml)
if diff ${TMP_DIRECTORY}/crds ./charts/opentelemetry-operator/conf/crds > /dev/null; then \
echo "Passed"; \
rm -rf ${TMP_DIRECTORY}; \
Expand All @@ -82,5 +86,6 @@ define get-crd
@sed -i "s/opentelemetry-operator-system/{{ .Release.Namespace }}/g" $(1)
@sed -i 's/opentelemetry-operator-webhook-service/{{ template "opentelemetry-operator.fullname" . }}-webhook/g' $(1)
@sed -i '1s/^/{{- if .Values.crds.create }}\n/' $(1)
@sed -i 's#\(.*\)path: /convert#&\n\1port: {{ .Values.admissionWebhooks.servicePort }}#' $(1)
@echo '{{- end }}' >> $(1)
endef
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Emeritus Approvers:
Maintainers ([@open-telemetry/helm-maintainers](https://github.com/orgs/open-telemetry/teams/helm-maintainers)):

- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk
- [Jacob Aronoff](https://github.com/jaronoff97), Lightstep
- [Tyler Helmuth](https://github.com/TylerHelmuth), Honeycomb

Emeritus Maintainers:
Expand Down
5 changes: 3 additions & 2 deletions charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.93.3
version: 0.102.1
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand All @@ -9,6 +9,7 @@ sources:
- https://github.com/open-telemetry/opentelemetry-collector-contrib
maintainers:
- name: dmitryax
- name: jaronoff97
- name: TylerHelmuth
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
appVersion: 0.102.1
appVersion: 0.107.0
13 changes: 4 additions & 9 deletions charts/opentelemetry-collector/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ These upgrade guidelines only contain instructions for version upgrades which re
If the version you want to upgrade to is not listed here, then there is nothing to do for you.
Just upgrade and enjoy.

## Feature Flags
## 0.97.2 to 0.98.0

### useGOMEMLIMIT

A new flag, `useGOMEMLIMIT` has been added that allows specifying whether or not the chart should use the `GOMEMLIMIT` environment variable or the Memory Ballast Extension.
When enabled, the chart will remove the Memory Ballast Extension from the collector's configuration AND will setup a `GOMEMLIMIT` environment variable that is set to 80%
of the configured `resources.limits.memory`. If no `resources.limits.memory` are set when `useGOMEMLIMIT` is enabled then a `GOMEMLIMIT` environment variable WILL NOT be
created but the Memory Ballast Extension will still be removed.
> [!WARNING]
> Critical content demanding immediate user attention due to potential risks.
Depending on the progress made in [Issue 891](https://github.com/open-telemetry/opentelemetry-helm-charts/issues/891),
the use of `GOMEMLIMIT` may completely replace the Memory Ballast Extension in the future.
The deprecated memory ballast extension has been removed from the default config. If you depend on this component you must manually configure `config.exentions` and `config.service.extensions` to include the memory ballast extension. Setting `useGOMEMLIMIT` to `false` will no longer keep the memory ballast extension in the rendered collector config.

## 0.88.0 to 0.89.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.93.3
helm.sh/chart: opentelemetry-collector-0.102.1
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.102.1"
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm

data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.93.3
helm.sh/chart: opentelemetry-collector-0.102.1
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.102.1"
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm

data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.93.3
helm.sh/chart: opentelemetry-collector-0.102.1
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.102.1"
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm

spec:
Expand All @@ -23,7 +23,7 @@ spec:
template:
metadata:
annotations:
checksum/config: f1c8c67d823932ab369e0e3284ebfe7763446d7af037aed7c7c7a3a3ab5d7e96
checksum/config: 6ca4f8927489af6d1b6ef3af9e2921147dff5f71bd661dd51c33fbc027cae9ae

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand All @@ -43,7 +43,7 @@ spec:
- --config=/conf/relay.yaml
securityContext:
{}
image: "otel/opentelemetry-collector-k8s:0.102.1"
image: "otel/opentelemetry-collector-k8s:0.107.0"
imagePullPolicy: IfNotPresent
ports:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.93.3
helm.sh/chart: opentelemetry-collector-0.102.1
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.102.1"
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm

spec:
Expand All @@ -25,7 +25,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 753d31810a0a1ab3a69b9f1f78bb692c23fd5b10e0cc3c4029fb5bf9fc9080e7
checksum/config: e4935d38fe18c9388e403cee58fa4656e34eb3c1c2168feb0ee5f492a0cfd677

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand All @@ -45,7 +45,7 @@ spec:
- --config=/conf/relay.yaml
securityContext:
{}
image: "otel/opentelemetry-collector-k8s:0.102.1"
image: "otel/opentelemetry-collector-k8s:0.107.0"
imagePullPolicy: IfNotPresent
ports:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.93.3
helm.sh/chart: opentelemetry-collector-0.102.1
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.102.1"
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm

component: standalone-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.93.3
helm.sh/chart: opentelemetry-collector-0.102.1
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.102.1"
app.kubernetes.io/version: "0.107.0"
app.kubernetes.io/managed-by: Helm
Loading

0 comments on commit 96cd059

Please sign in to comment.