Skip to content

docs(code-samples): fix JSON syntax, docker build context, and Prometheus scheme#1244

Open
ekline[bot] wants to merge 1 commit into
mainfrom
docs/code-samples/fix-json-docker-prometheus
Open

docs(code-samples): fix JSON syntax, docker build context, and Prometheus scheme#1244
ekline[bot] wants to merge 1 commit into
mainfrom
docs/code-samples/fix-json-docker-prometheus

Conversation

@ekline
Copy link
Copy Markdown
Contributor

@ekline ekline Bot commented May 12, 2026

Summary

This PR fixes factual inaccuracies in documentation code samples, verified against the current API and SDK signatures. Cosmetic and stylistic changes are intentionally out of scope.

Scan summary: 145 doc files scanned across all content directories. 3 files with High findings, 3 files fixed, 0 deferred.

Fixes

File Finding Fix
reference/okteto-manifest.mdx Trailing comma in JSON array — invalid JSON syntax Removed the trailing comma
admin/custom-installer-image.mdx docker build missing required build context Added . build context
admin/okteto-insights.mdx Prometheus scheme http on port 443 — endpoint is TLS-terminated Changed to scheme https

Style improvements from automated review were also applied: descriptive inline link text, banned word removal, terminology fixes, and typo corrections.

Test plan

  • Verify yarn build passes with no broken links
  • Confirm JSON block in okteto-manifest.mdx renders correctly
  • Confirm docker build command is copy-pasteable
  • Confirm Prometheus config works against an Okteto instance

…heus scheme

Fix three factual inaccuracies in documentation code samples:

- reference/okteto-manifest.mdx: remove trailing comma in JSON array
  (invalid JSON syntax that causes parse errors)
- admin/custom-installer-image.mdx: add missing build context (`.`) to
  `docker build` command (command fails without it)
- admin/okteto-insights.mdx: change Prometheus scraper scheme from `http`
  to `https` (endpoint is TLS-terminated behind NGINX Ingress)

Also applies style improvements from automated review: replaces
"available here" link patterns with descriptive inline links, removes
banned words, fixes terminology capitalization, and corrects typos.

Signed-off-by: ekline[bot] <202747777+ekline[bot]@users.noreply.github.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for okteto-docs ready!

Name Link
🔨 Latest commit 576e69d
🔍 Latest deploy log https://app.netlify.com/projects/okteto-docs/deploys/6a037d5d7ef6640008532ccc
😎 Deploy Preview https://deploy-preview-1244--okteto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

"https://raw.githubusercontent.com/okteto/okteto/master/schema.json": [
"okteto.yml",
"okteto.yaml",
"okteto.yaml"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Finding: Trailing comma after "okteto.yaml" made this invalid JSON. While VS Code's settings.json uses JSONC (which tolerates trailing commas), the code fence is labeled json and would fail in any strict JSON parser.

Source: JSON specification (RFC 8259) — arrays must not have trailing commas.


```bash
docker build -t REGISTRY/REPOSITORY:TAG
docker build -t REGISTRY/REPOSITORY:TAG .
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Finding: docker build -t REGISTRY/REPOSITORY:TAG was missing the required build context argument. Without it, Docker exits with: "docker build requires exactly 1 argument".

Source: Docker CLI reference — docker build requires a PATH or URL as the build context.

scrape_timeout: 30s

scheme: http
scheme: https
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Finding: Prometheus scraper was configured with scheme: http targeting port 443. The Okteto API endpoint is TLS-terminated behind NGINX Ingress (confirmed via app/backend/cmd/api.go and the Helm chart's ingress TLS configuration). Prometheus would fail with a TLS handshake error when attempting plain HTTP against an HTTPS endpoint.

Source: Okteto Helm chart config (OKTETO_INGRESS_TLS_SECRET_NAME) and backend API server registration at /metrics.

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.

0 participants