Skip to content

[charm-lib] Inconsistent and missing docstrings for constructor parameters in v2.ingress #640

Description

@jananisenthilkumar291

Description

There is currently a lack of documentation for the constructor parameters in the charms.traefik_k8s.v2.ingress library (e.g., IngressPerAppRequirer / IngressPerUnitRequirer). Several arguments are either missing from the docstrings entirely or lack sufficient explanation, forcing charm authors to read the library's internal implementation to understand how to use them.

Specific Concerns

  • Inconsistent Docstrings: The constructor methods do not document all accepted parameters.
  • Unexplained Arguments: Key arguments are undocumented. For example, strip_prefix is available as a parameter but has no explanation regarding what it does, how it interacts with Traefik's routing modes, or its default behavior.
  • traefik expects to be deployed with --trust. App enters error state(showing its not handled well) when deployed without --trust. This is not documented.

Expected Behavior

The constructor docstrings should explicitly list:

  • Every accepted parameter.
  • The expected type.
  • A brief description of what the parameter does and its impact on the Ingress relation.
  • Default values (if applicable).

Actual Behavior

Developers must guess the purpose of parameters like strip_prefix or dig into the underlying library code/Traefik documentation to deduce their behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions