Skip to content

Commit 1d583d0

Browse files
committed
add Josie's notes
1 parent f03e987 commit 1d583d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/warnet/admin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
import subprocess
2+
import subprocess # TODO: use run_command or similar; NOT subprocess
33
from pathlib import Path
44

55
import click
@@ -45,6 +45,7 @@ def get_kubectl_value(jsonpath):
4545

4646
# Get all namespaces that start with "warnet-"
4747
def get_warnet_namespaces():
48+
# TODO: paramaterize with prefix
4849
namespaces = (
4950
subprocess.check_output(
5051
["kubectl", "get", "namespaces", "-o", "jsonpath={.items[*].metadata.name}"]
@@ -130,6 +131,7 @@ def create_kubeconfigs(kubeconfig_dir, token_duration):
130131
# Create a kubeconfig file for the user
131132
kubeconfig_file = os.path.join(kubeconfig_dir, f"{sa}-{namespace}-kubeconfig")
132133

134+
# TODO: move yaml out of python code
133135
kubeconfig_content = f"""apiVersion: v1
134136
kind: Config
135137
clusters:

0 commit comments

Comments
 (0)