Skip to content

Charms should write configuration files to standardized directories #1397

@dariofaccin

Description

@dariofaccin

Context

Currently, Charmed Kubeflow charms do not follow a common pattern in writing configuration files to the filesystem.
For instance, notebooks operator writes to /etc/config:
https://github.com/canonical/notebook-operators/blob/9e74713c6d9cd8d5189318784900934655cda49e/charms/jupyter-ui/src/charm.py#L75
Instead, admission webhook writes to /etc/webhook/certs: https://github.com/canonical/admission-webhook-operator/blob/a539fa48cc7146ce2e8c3ff79b7ea3fab4aa9e93/src/charm.py#L37
The same behaviour applies to other charms.

Proposal

Since rocks have the Pebble path /var/lib/pebble/default created with permissions 777, we could leverage this path to read/write configuration files whenever possible and configure the workload appropriately.

What needs to get done

  1. Define a common path pattern for workload configuration files
  2. Apply solution to main and track branches of the charms
  3. Update rocks to remove the useless permissions introduced by install

Step (3) can be done in future, as it won't directly impact the charm.

Definition of Done

  1. Configuration file path pattern is defined
  2. Charms are updated
  3. Rocks are updated and integrated

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions