Privileged interfaces request: upgrade-cdk (personal-files)

To make the review of your request easier, please use the following template to provide all the required details and also include any other information that may be relevant.


  • Snap name: upgrade-cdk
  • Description: upgrade-cdk automates the CDK (Charmed Distribution of Kubernetes) upgrade workflow using the Jubilant library.
  • snapcraft: https://github.com/canonical/upgrade-cdk/blob/main/snap/snapcraft.yaml
  • upstream: https://github.com/canonical/upgrade-cdk (Private to Canonical)
  • upstream-relation: I am the upstream author and maintainer
  • Requested interfaces: personal-files (two plugs)
  • Justification for interface juju-data:
    • The snap wraps the juju CLI (via juju-bin content interface) to automate Kubernetes cluster upgrades
    • Juju must read controller credentials and CA certs from ~/.local/share/juju to connect to controllers
    • Write access is needed because juju creates advisory cookie lock files in ~/.local/share/juju/cookies/ on every API call
  • Justification for interfacekube-config:
    • Read-only access to ~/.kube for the Kubernetes Python client to query node/pod health during upgrades
    • This is the standard kubeconfig location; .kube is a hidden directory excluded from the home interface
  • Access is minimal: kube-config is read-only; juju-data write access is scoped to exactly ~/.local/share/juju (not broader home access)

This request has been added to the queue for review by the @reviewers team.

Hey @canonikamal

The request sounds reasonable to me, just a couple of comments:

  • If write access is only needed for cookie lock files, write access should be narrowed to the minimal necessary. Thus, one read access interface for ~/.local/share/juju and a different write access interface for ~/.local/share/juju/cookies/
  • personal-files interfaces names needs to be update to match the usual name convention. That is dot-local-share-juju, dot-local-share-juju-cookies and dot-kube

Thanks

Hey @jslarraz

New revision(#6) pushed after aligning the interfaces as suggested in your last comment.

Please review and approve.

Thanks & regards

Hi @canonikamal!

Given the snap’s functionality this is a +1 (#voteFor) from my side too!

+2 for, 0 against granting upgrade-cdk auto-connection to content and personal-files interfaces. This is now live :slight_smile:

Thanks a lot to @yomonokio @jslarraz and anyone else who reviewed and went through the request.

1 Like