Skip to content

Add installation script for the OTel Kube Stack Helm Chart - #294

Draft
cyrille-leclerc wants to merge 26 commits into
mainfrom
cyrille-leclerc/kube-stack-install-script
Draft

Add installation script for the OTel Kube Stack Helm Chart#294
cyrille-leclerc wants to merge 26 commits into
mainfrom
cyrille-leclerc/kube-stack-install-script

Conversation

@cyrille-leclerc

Copy link
Copy Markdown
Contributor

What does this PR do?

Add an installation script

Motivation

@cyrille-leclerc
cyrille-leclerc requested a review from a team as a code owner July 31, 2026 14:40
@cyrille-leclerc
cyrille-leclerc requested a review from mx-psi July 31, 2026 14:40
@cyrille-leclerc cyrille-leclerc changed the title Cyrille leclerc/kube stack install script Add installation script for the OTel Kube Stack Helm Chart Jul 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a2db7a8bc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread guides/kubernetes/configuration/kube-stack/values.yaml
Comment thread guides/kubernetes/configuration/opentelemetry-kube-stack/install Outdated
Comment thread guides/kubernetes/configuration/kube-stack/values.yaml
Comment thread guides/kubernetes/configuration/opentelemetry-kube-stack/uninstall
@cyrille-leclerc

Copy link
Copy Markdown
Contributor Author

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33c8c47ec3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

read -p "Datadog Site (eg: 'datadoghq.eu'): " DD_SITE
[[ -z "$DD_SITE" ]] && error "Datadog Site cannot be empty"

read -p "Datadog API Key (eg: '1234...'): " DD_API_KEY

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Hide the API key prompt

When the interactive setup path is used, this prompt echoes the Datadog API key to the terminal as it is typed, so the secret can be exposed in screen recordings, shared terminals, or scrollback. Use a silent read for this credential prompt before creating the Kubernetes secret.

Useful? React with 👍 / 👎.

Comment thread guides/kubernetes/configuration/opentelemetry-kube-stack/install
@cyrille-leclerc

Copy link
Copy Markdown
Contributor Author

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18c21c6e9b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +79 to +83
kubectl create secret generic datadog-secret \
--namespace opentelemetry-operator-system \
--from-literal="api-key=$DD_API_KEY" \
--from-literal="dd-site=${DD_SITE:-datadoghq.com}" \
|| echo "WARNING: Could not create secret 'datadog-secret' (may already exist or insufficient permissions). Continuing..."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace the Datadog secret on reruns

When the install script is rerun after the user fixes or rotates DD_API_KEY/DD_SITE, this kubectl create secret generic step is only a create operation (kubectl docs); if datadog-secret already exists, the command fails and the || echo path continues, so the Helm upgrade keeps using the old secret and telemetry is exported with stale credentials. Generate the Secret with --dry-run=client -o yaml | kubectl apply -f -, or delete/replace it before continuing.

Useful? React with 👍 / 👎.

Comment on lines +24 to +26
kubectl delete crd --namespace opentelemetry-operator-system opentelemetrycollectors.opentelemetry.io
kubectl delete crd --namespace opentelemetry-operator-system instrumentations.opentelemetry.io
kubectl delete crd --namespace opentelemetry-operator-system opampbridges.opentelemetry.io No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make CRD cleanup opt-in

When this example is uninstalled from a cluster that also uses the OpenTelemetry Operator for another namespace or Helm release, these deletes are cluster-wide because Kubernetes documents CRDs as non-namespaced (CRD docs); the --namespace flag does not limit the blast radius, so this can remove the API definitions and custom resources for unrelated OpenTelemetry workloads. Leave CRDs in place by default or gate this behind an explicit destructive cleanup option.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 576e7b410a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


echo "Installing cert-manager (if not already installed)..."

helm repo add jetstack https://charts.jetstack.io

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make Helm repo setup idempotent

If the installer is rerun on a workstation where jetstack or open-telemetry has already been added, this unguarded helm repo add can abort the script under set -e before it reaches the idempotent secret apply and helm upgrade --install; Helm documents that existing repo names error in Helm 3.3.2+ and that --force-update is the overwrite path (https://helm.sh/docs/v3/faq/troubleshooting/#helm-repo-add-fails-when-it-used-to-work). Add --force-update or tolerate the already-present repo for both repo additions.

Useful? React with 👍 / 👎.

Comment thread guides/kubernetes/configuration/opentelemetry-kube-stack/install
@cyrille-leclerc
cyrille-leclerc marked this pull request as draft August 4, 2026 13:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52dd7f3a47

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

# Load environment variables from .env file if it exists
[[ -f "$SCRIPT_DIR/.env" ]] && source "$SCRIPT_DIR/.env"

if [[ ! -f "$SCRIPT_DIR/.env" ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor pre-set credentials before prompting

When the installer is run with DD_API_KEY/DD_SITE already exported but no .env file exists, this condition still forces the interactive read path because it only checks for the file. That makes common non-interactive usage such as CI or DD_API_KEY=... DD_SITE=... ./install block or abort under set -e; gate the prompts on the required variables being missing instead of on .env alone.

Useful? React with 👍 / 👎.

@cyrille-leclerc

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants