Skip to content

Remove statefulness from charm configuration #166

Description

@dariofaccin

Context

The charm should avoid to be stateful whenever possible.
In particular, configuration files should not be part of a PVC.
This can be achieved with the following steps.

Rock

The underlying rock needs to be modified so that the configuration path is owned by _daemon_:

mlmd:
  override-build:
    ...
    # make config dir
    mkdir -p $CRAFT_PART_INSTALL/config

non-root-user:
  plugin: nil
  override-prime: |
    craftctl default
    install -d -o 584792 -g 584792 -m 770 \
      config

Charm

In the metadata.yaml any storage and mounts reference needs to be removed.
In the charm, any check on storage availability needs to be removed.
Unit tests might to be updated to remove harness.attach_storage() call if present.

What needs to get done

  1. Update rock
  2. Update charm
  3. Backport change

Definition of Done

  1. Rock is updated
  2. Charm is updated
  3. New rock is integrated
  4. Tests are passing
  5. Change is backported

Activity

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

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