mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #65448 from kwmonroe/bug/lint-fixes
Automatic merge from submit-queue (batch tested with PRs 65156, 65448). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. lint fixes for goal state checks **What this PR does / why we need it**: Lint fixes for long lines introduced in #65187 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: **Special notes for your reviewer**: We could also fix this by setting a longer flake8 line length in something like a local `setup.cfg` **Release note**: ```release-note NONE ```
This commit is contained in:
commit
28b7809d2f
@ -402,7 +402,7 @@ def set_final_status():
|
||||
goal_state = {}
|
||||
|
||||
if not is_state('kube-api-endpoint.available'):
|
||||
if 'relations' in goal_state and 'kube-api-endpoint' in goal_state['relations']:
|
||||
if 'kube-api-endpoint' in goal_state.get('relations', {}):
|
||||
status = 'waiting'
|
||||
else:
|
||||
status = 'blocked'
|
||||
@ -410,7 +410,7 @@ def set_final_status():
|
||||
return
|
||||
|
||||
if not is_state('kube-control.connected'):
|
||||
if 'relations' in goal_state and 'kube-control' in goal_state['relations']:
|
||||
if 'kube-control' in goal_state.get('relations', {}):
|
||||
status = 'waiting'
|
||||
else:
|
||||
status = 'blocked'
|
||||
|
@ -403,8 +403,8 @@ def sdn_changed():
|
||||
@when('kubernetes-worker.config.created')
|
||||
@when_not('kubernetes-worker.ingress.available')
|
||||
def render_and_launch_ingress():
|
||||
''' If configuration has ingress daemon set enabled, launch the ingress load
|
||||
balancer and default http backend. Otherwise attempt deletion. '''
|
||||
''' If configuration has ingress daemon set enabled, launch the ingress
|
||||
load balancer and default http backend. Otherwise attempt deletion. '''
|
||||
config = hookenv.config()
|
||||
# If ingress is enabled, launch the ingress controller
|
||||
if config.get('ingress'):
|
||||
@ -743,7 +743,8 @@ def launch_default_ingress_controller():
|
||||
return
|
||||
|
||||
# Render the ingress daemon set controller manifest
|
||||
context['ssl_chain_completion'] = config.get('ingress-ssl-chain-completion')
|
||||
context['ssl_chain_completion'] = config.get(
|
||||
'ingress-ssl-chain-completion')
|
||||
context['ingress_image'] = config.get('nginx-image')
|
||||
if context['ingress_image'] == "" or context['ingress_image'] == "auto":
|
||||
images = {'amd64': 'quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.15.0', # noqa
|
||||
@ -1016,7 +1017,7 @@ def missing_kube_control():
|
||||
except NotImplementedError:
|
||||
goal_state = {}
|
||||
|
||||
if 'relations' in goal_state and 'kube-control' in goal_state['relations']:
|
||||
if 'kube-control' in goal_state.get('relations', {}):
|
||||
hookenv.status_set(
|
||||
'waiting',
|
||||
'Waiting for kubernetes-master to become ready')
|
||||
|
Loading…
Reference in New Issue
Block a user