fix lint errors from merge: duplicate def, shadowed import, empty f-string
- deployment_create.py: remove duplicate create_registry_secret signature - deploy_k8s.py: rename loop var 'config' to 'svc_config' (shadowed import) - deploy_k8s.py: remove f-prefix from string without placeholders - deploy_k8s.py: suppress pre-existing C901 on _create_volume_data Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>pull/740/head
parent
549ac8c01d
commit
5bf96112d3
|
|
@ -583,7 +583,6 @@ def _generate_and_store_secrets(
|
||||||
def create_registry_secret(
|
def create_registry_secret(
|
||||||
spec: Spec, deployment_name: str, namespace: str = "default"
|
spec: Spec, deployment_name: str, namespace: str = "default"
|
||||||
) -> Optional[str]:
|
) -> Optional[str]:
|
||||||
def create_registry_secret(spec: Spec, deployment_name: str, namespace: str = "default") -> Optional[str]:
|
|
||||||
"""Create K8s docker-registry secret from spec + environment.
|
"""Create K8s docker-registry secret from spec + environment.
|
||||||
|
|
||||||
Reads registry configuration from spec.yml and creates a Kubernetes
|
Reads registry configuration from spec.yml and creates a Kubernetes
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ class K8sDeployer(Deployer):
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
_check_delete_exception(e)
|
_check_delete_exception(e)
|
||||||
|
|
||||||
def _create_volume_data(self):
|
def _create_volume_data(self): # noqa: C901
|
||||||
# Create the host-path-mounted PVs for this deployment
|
# Create the host-path-mounted PVs for this deployment
|
||||||
pvs = self.cluster_info.get_pvs()
|
pvs = self.cluster_info.get_pvs()
|
||||||
for pv in pvs:
|
for pv in pvs:
|
||||||
|
|
@ -460,15 +460,15 @@ class K8sDeployer(Deployer):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# Create Endpoints for selector-mode services
|
# Create Endpoints for selector-mode services
|
||||||
for name, config in ext_services.items():
|
for name, svc_config in ext_services.items():
|
||||||
if "selector" not in config or "namespace" not in config:
|
if "selector" not in svc_config or "namespace" not in svc_config:
|
||||||
continue
|
continue
|
||||||
if opts.o.dry_run:
|
if opts.o.dry_run:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
target_ns = config["namespace"]
|
target_ns = svc_config["namespace"]
|
||||||
selector = config["selector"]
|
selector = svc_config["selector"]
|
||||||
port = config.get("port", 443)
|
port = svc_config.get("port", 443)
|
||||||
|
|
||||||
# Build label selector string from dict
|
# Build label selector string from dict
|
||||||
label_selector = ",".join(f"{k}={v}" for k, v in selector.items())
|
label_selector = ",".join(f"{k}={v}" for k, v in selector.items())
|
||||||
|
|
@ -535,7 +535,7 @@ class K8sDeployer(Deployer):
|
||||||
if not ca_secret:
|
if not ca_secret:
|
||||||
return
|
return
|
||||||
if opts.o.dry_run:
|
if opts.o.dry_run:
|
||||||
print(f"Dry run: would create CA certificate secret")
|
print("Dry run: would create CA certificate secret")
|
||||||
return
|
return
|
||||||
|
|
||||||
secret_name = ca_secret.metadata.name
|
secret_name = ca_secret.metadata.name
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue