mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +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():
|
def close_old_port():
|
||||||
config = hookenv.config()
|
config = hookenv.config()
|
||||||
old_port = config.previous('port')
|
old_port = config.previous('port')
|
||||||
|
if not old_port:
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
hookenv.close_port(old_port)
|
hookenv.close_port(old_port)
|
||||||
except CalledProcessError:
|
except CalledProcessError:
|
||||||
|
Loading…
Reference in New Issue
Block a user