diff --git a/deployer/hub.py b/deployer/hub.py index 842faa2ea2..5d99f3dc0e 100644 --- a/deployer/hub.py +++ b/deployer/hub.py @@ -42,8 +42,6 @@ def auth(self): yield from self.auth_gcp() elif self.spec['provider'] == 'aws': yield from self.auth_aws() - elif self.spec['provider'] == 'kubeconfig': - yield from self.auth_kubeconfig() else: raise ValueError(f'Provider {self.spec["provider"]} not supported') @@ -125,23 +123,6 @@ def deploy_support(self): ]) print("Done!") - def auth_kubeconfig(self): - """ - Context manager for authenticating with just a kubeconfig file - - For the duration of the contextmanager, we: - 1. Decrypt the file specified in kubeconfig.file with sops - 2. Set `KUBECONFIG` env var to our decrypted file path, so applications - we call (primarily helm) will use that as config - """ - config = self.spec['kubeconfig'] - config_path = config['file'] - - with decrypt_file(config_path) as decrypted_key_path: - # FIXME: Unset this after our yield - os.environ['KUBECONFIG'] = decrypted_key_path - yield - def auth_aws(self): """ Reads `aws` nested config and temporarily sets environment variables