Merge ~johnsca/layer-snap:feature/lp/1845559/snap-coherence into ~stub/layer-snap:master
Status: | Merged |
---|---|
Merged at revision: | 9bf203fd51d04afc48e67fa40410b8a661726b7e |
Proposed branch: | ~johnsca/layer-snap:feature/lp/1845559/snap-coherence |
Merge into: | ~stub/layer-snap:master |
Diff against target: |
213 lines (+114/-1) 3 files modified
README.md (+14/-0) lib/charms/layer/snap.py (+87/-0) reactive/snap.py (+13/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop | Approve | ||
Review via email: mp+375315@code.launchpad.net |
Commit message
Add support for snap coherence
Add additional functions and flags to create and manage cohort snapshots.
Description of the change
This is in support of k8s snap coherence:
https:/
It has been working well for me as a way to manage snap cohorts amongst k8s applications. When coupled with https:/
$ juju run --unit snap-store-proxy/0 'sudo snap-proxy list-overrides kubectl'
kubectl 1.16/stable amd64 1342 (upstream 1309)
$ juju run --application kubernetes-master 'sudo snap list kubectl'
- Stdout: |
Name Version Rev Tracking Publisher Notes
kubectl 1.16.3-beta.0 1342 1.16 canonical* classic,in-cohort
UnitId: kubernetes-master/1
- Stdout: |
Name Version Rev Tracking Publisher Notes
kubectl 1.16.3-beta.0 1342 1.16 canonical* classic,in-cohort
UnitId: kubernetes-master/0
There's still work to do in the k8s charms and docs, but this is ready for upstream layer-snap consideration.
Code is good.
If create_ cohort_ snapshot and join_cohort_ snapshot are to be part of the public API, they should be documented in README.md; I haven't wired up any documentation generation and snap.py contains a mix of public API and support functions in any case (the line isn't clear, so I guess that makes all the methods public). Minimally would be fine. Some care may be needed to explain expected behavior when the refresh() method is called on snap that is part of a cohort.