k8s: make context optional

The Kubernetes driver can optionally use the credentials inside
the pod which means that context should be optional.

Change-Id: Iaf42cd03bd4a92e36133fd2ec7157869f8747d6b
changes/30/682130/1
Mohammed Naser 3 years ago
parent fa7cc4d219
commit 67bdd85425
  1. 2
      nodepool/driver/kubernetes/config.py

@ -85,7 +85,7 @@ class KubernetesProviderConfig(ProviderConfig):
def load(self, config):
self.launch_retries = int(self.provider.get('launch-retries', 3))
self.context = self.provider['context']
self.context = self.provider.get('context')
for pool in self.provider.get('pools', []):
pp = KubernetesPool()
pp.load(pool, config)

Loading…
Cancel
Save