mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #44681 from wwwtyro/rye/disable-upstream-docker
Automatic merge from submit-queue (batch tested with PRs 44722, 44704, 44681, 44494, 39732) prevent installation of docker from upstream **What this PR does / why we need it**: Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm. ```
This commit is contained in:
commit
5cbe7b69fb
@ -12,6 +12,9 @@ includes:
|
||||
- 'interface:kubernetes-cni'
|
||||
- 'interface:kube-dns'
|
||||
- 'interface:kube-control'
|
||||
config:
|
||||
deletes:
|
||||
- install_from_upstream
|
||||
options:
|
||||
basic:
|
||||
packages:
|
||||
|
@ -39,7 +39,6 @@ from charmhelpers.core import hookenv, unitdata
|
||||
from charmhelpers.core.host import service_stop, service_restart
|
||||
from charmhelpers.contrib.charmsupport import nrpe
|
||||
|
||||
|
||||
# Override the default nagios shortname regex to allow periods, which we
|
||||
# need because our bin names contain them (e.g. 'snap.foo.daemon'). The
|
||||
# default regex in charmhelpers doesn't allow periods, but nagios itself does.
|
||||
@ -54,6 +53,10 @@ db = unitdata.kv()
|
||||
|
||||
@hook('upgrade-charm')
|
||||
def upgrade_charm():
|
||||
# Trigger removal of PPA docker installation if it was previously set.
|
||||
set_state('config.changed.install_from_upstream')
|
||||
hookenv.atexit(remove_state, 'config.changed.install_from_upstream')
|
||||
|
||||
cleanup_pre_snap_services()
|
||||
check_resources_for_upgrade_needed()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user