mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
prevent unsetting of nonexistent previous port in kubeapi-load-balancer charm
This commit is contained in:
parent
ce91f2ab26
commit
7c06da5b0e
@ -54,6 +54,8 @@ def request_server_certificates(tls):
|
||||
def close_old_port():
|
||||
config = hookenv.config()
|
||||
old_port = config.previous('port')
|
||||
if not old_port:
|
||||
return
|
||||
try:
|
||||
hookenv.close_port(old_port)
|
||||
except CalledProcessError:
|
||||
|
Loading…
Reference in New Issue
Block a user