Skip to content

Commit

Permalink
Merge pull request #276 from thom311/th/typing-yaml-dump
Browse files Browse the repository at this point in the history
[th/typing-yaml-dump] typing: fix typing annotation for yaml.dump() in extract_microshift_kubeconfig()
  • Loading branch information
bn222 authored Oct 18, 2024
2 parents eb80ac9 + 246be8e commit 2eb8c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extraConfigMicroshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def extract_microshift_kubeconfig(acc: host.Host) -> str:
kubeconfig: Dict[str, Any] = yaml.safe_load(acc.read_file(kubeconfig_path))
kubeconfig["clusters"][0]["cluster"]["insecure-skip-tls-verify"] = True
kubeconfig["clusters"][0]["cluster"]["server"] = f"https://{acc.hostname()}:6443"
to_write = yaml.dump(kubeconfig)
to_write: str = yaml.dump(kubeconfig)
key = "certificate-authority-data"
to_write = to_write.replace(f"{key}:", f"# {key}:")
return to_write
Expand Down

0 comments on commit 2eb8c05

Please sign in to comment.