Skip to content

fix(api): add support for missing insecure and debug options - #1646

Merged
traefiker merged 20 commits into
traefik:masterfrom
zalbiraw:fix/1611-api-config-mapping
Feb 13, 2026
Merged

fix(api): add support for missing insecure and debug options#1646
traefiker merged 20 commits into
traefik:masterfrom
zalbiraw:fix/1611-api-config-mapping

Conversation

@zalbiraw

@zalbiraw zalbiraw commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Closes #1611.

Description

This PR addresses issue #1611 by allowing more flexible configuration of the API section.

Changes

  • Implemented generic mapping of values to CLI arguments using the helper.
  • Added explicit validation for and (must be boolean).
  • Preserved existing validation for dependency on .
  • Handled to ensure it is omitted when empty (preserving default behavior) but correctly mapped when set.
  • Added regression tests in covering default behavior, generic mapping, and validation failures.

Verification

  • Verified manually with .
  • Added unit tests passing with requires at least 1 arg(s), only received 0.

Comment thread traefik/templates/_podtemplate.tpl Outdated
@mloiseleur mloiseleur changed the title Fix: Map API options to CLI args (#1611) fix(api): map all API options to CLI args Feb 4, 2026
@mloiseleur mloiseleur changed the title fix(api): map all API options to CLI args fix(api): add support for all missing api options Feb 4, 2026
@mloiseleur mloiseleur changed the title fix(api): add support for all missing api options fix(api): add support for missing insecure and debug options Feb 4, 2026

@mloiseleur mloiseleur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @zalbiraw 👍
Can you add those options in the values.yaml and re-generate the schema?
You'll need also to add # @schema additionalProperties: false on api: so it will fail when user makes a typo.

@zalbiraw
zalbiraw force-pushed the fix/1611-api-config-mapping branch from 4014b83 to de3e9e0 Compare February 4, 2026 12:40
@zalbiraw
zalbiraw force-pushed the fix/1611-api-config-mapping branch from de3e9e0 to 82d712c Compare February 4, 2026 12:47
@zalbiraw
zalbiraw force-pushed the fix/1611-api-config-mapping branch from 82d712c to 90fc9ca Compare February 4, 2026 12:48
Comment thread traefik/values.yaml Outdated
Comment thread traefik/values.yaml Outdated
zalbiraw and others added 3 commits February 4, 2026 08:09
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
@mloiseleur

Copy link
Copy Markdown
Member

@zalbiraw Just run make docs, commit/push and the CI will go green.

Comment thread traefik/tests/api_test.yaml Outdated
Comment thread traefik/tests/deployment-config_test.yaml Outdated
Comment thread traefik/values.yaml Outdated
@mloiseleur

mloiseleur commented Feb 4, 2026

Copy link
Copy Markdown
Member

@zalbiraw For completeness, I added a test to check for typo failure with 2166eb4

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
zalbiraw and others added 4 commits February 12, 2026 12:07
Comment thread traefik/templates/_podtemplate.tpl Outdated
@traefiker
traefiker merged commit 412fbd1 into traefik:master Feb 13, 2026
2 checks passed
@zalbiraw
zalbiraw deleted the fix/1611-api-config-mapping branch February 13, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to configure metrics.prometheus.enabled and api.insecure

4 participants