konduktor-nightly 0.1.0.dev20250606105011__py3-none-any.whl → 0.1.0.dev20250608104639__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- konduktor/__init__.py +2 -2
- konduktor/backends/jobset_utils.py +20 -11
- konduktor/cli.py +1 -2
- konduktor/templates/pod.yaml.j2 +13 -0
- {konduktor_nightly-0.1.0.dev20250606105011.dist-info → konduktor_nightly-0.1.0.dev20250608104639.dist-info}/METADATA +1 -1
- {konduktor_nightly-0.1.0.dev20250606105011.dist-info → konduktor_nightly-0.1.0.dev20250608104639.dist-info}/RECORD +9 -9
- {konduktor_nightly-0.1.0.dev20250606105011.dist-info → konduktor_nightly-0.1.0.dev20250608104639.dist-info}/LICENSE +0 -0
- {konduktor_nightly-0.1.0.dev20250606105011.dist-info → konduktor_nightly-0.1.0.dev20250608104639.dist-info}/WHEEL +0 -0
- {konduktor_nightly-0.1.0.dev20250606105011.dist-info → konduktor_nightly-0.1.0.dev20250608104639.dist-info}/entry_points.txt +0 -0
konduktor/__init__.py
CHANGED
@@ -14,7 +14,7 @@ __all__ = [
|
|
14
14
|
]
|
15
15
|
|
16
16
|
# Replaced with the current commit when building the wheels.
|
17
|
-
_KONDUKTOR_COMMIT_SHA = '
|
17
|
+
_KONDUKTOR_COMMIT_SHA = 'b607feee1f4c97beba242d70181c1f72582e52d2'
|
18
18
|
os.makedirs(os.path.expanduser('~/.konduktor'), exist_ok=True)
|
19
19
|
|
20
20
|
|
@@ -48,5 +48,5 @@ def _get_git_commit():
|
|
48
48
|
|
49
49
|
|
50
50
|
__commit__ = _get_git_commit()
|
51
|
-
__version__ = '1.0.0.dev0.1.0.
|
51
|
+
__version__ = '1.0.0.dev0.1.0.dev20250608104639'
|
52
52
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
@@ -41,6 +41,7 @@ JOBSET_USER_LABEL = 'trainy.ai/username'
|
|
41
41
|
JOBSET_ACCELERATOR_LABEL = 'trainy.ai/accelerator'
|
42
42
|
JOBSET_NUM_ACCELERATORS_LABEL = 'trainy.ai/num-accelerators'
|
43
43
|
|
44
|
+
SECRET_BASENAME_LABEL = 'konduktor/basename'
|
44
45
|
|
45
46
|
_JOBSET_METADATA_LABELS = {
|
46
47
|
'jobset_name_label': JOBSET_NAME_LABEL,
|
@@ -141,10 +142,10 @@ def create_pod_spec(task: 'konduktor.Task') -> Dict[str, Any]:
|
|
141
142
|
storage_secrets[store_scheme] = cloud_store._STORE.get_k8s_credential_name()
|
142
143
|
sync_commands.append(cloud_store.make_sync_file_command(src, dst))
|
143
144
|
|
145
|
+
context = kubernetes_utils.get_current_kube_config_context_name()
|
146
|
+
namespace = kubernetes_utils.get_kube_config_context_namespace(context)
|
144
147
|
tailscale_secret = config.get_nested(('tailscale', 'secret_name'), None)
|
145
148
|
if tailscale_secret:
|
146
|
-
context = kubernetes_utils.get_current_kube_config_context_name()
|
147
|
-
namespace = kubernetes_utils.get_kube_config_context_namespace(context)
|
148
149
|
secret_exist, err = kubernetes_utils.check_secret_exists(
|
149
150
|
tailscale_secret, namespace, context
|
150
151
|
)
|
@@ -165,10 +166,6 @@ def create_pod_spec(task: 'konduktor.Task') -> Dict[str, Any]:
|
|
165
166
|
):
|
166
167
|
private_key, public_key = private_key_file.read(), public_key_file.read()
|
167
168
|
user_hash = common_utils.get_user_hash()
|
168
|
-
context = kubernetes_utils.get_current_kube_config_context_name()
|
169
|
-
namespace = kubernetes_utils.get_kube_config_context_namespace(
|
170
|
-
context_name=context
|
171
|
-
)
|
172
169
|
secret_name = f'konduktor-ssh-keys-{user_hash}'
|
173
170
|
ok, result = kubernetes_utils.set_secret(
|
174
171
|
secret_name=secret_name,
|
@@ -187,6 +184,7 @@ def create_pod_spec(task: 'konduktor.Task') -> Dict[str, Any]:
|
|
187
184
|
# Mount the user's secrets
|
188
185
|
git_ssh_secret_name = None
|
189
186
|
env_secret_envs = []
|
187
|
+
default_secrets = []
|
190
188
|
|
191
189
|
context = kubernetes_utils.get_current_kube_config_context_name()
|
192
190
|
namespace = kubernetes_utils.get_kube_config_context_namespace(context)
|
@@ -209,6 +207,10 @@ def create_pod_spec(task: 'konduktor.Task') -> Dict[str, Any]:
|
|
209
207
|
'valueFrom': {'secretKeyRef': {'name': secret_name, 'key': key}},
|
210
208
|
}
|
211
209
|
)
|
210
|
+
elif kind == 'default':
|
211
|
+
secret_name = secret.metadata.name
|
212
|
+
basename = secret.metadata.labels.get(SECRET_BASENAME_LABEL, secret_name)
|
213
|
+
default_secrets.append({'k8s_name': secret_name, 'mount_name': basename})
|
212
214
|
|
213
215
|
with tempfile.NamedTemporaryFile() as temp:
|
214
216
|
common_utils.fill_template(
|
@@ -239,6 +241,8 @@ def create_pod_spec(task: 'konduktor.Task') -> Dict[str, Any]:
|
|
239
241
|
# Kinds of Secrets
|
240
242
|
# --kind git-ssh
|
241
243
|
'git_ssh': git_ssh_secret_name,
|
244
|
+
# --kind default
|
245
|
+
'default_secrets': default_secrets,
|
242
246
|
},
|
243
247
|
temp.name,
|
244
248
|
)
|
@@ -318,7 +322,8 @@ def create_jobset(
|
|
318
322
|
'template'
|
319
323
|
] = pod_spec # noqa: E501
|
320
324
|
try:
|
321
|
-
|
325
|
+
context = kubernetes_utils.get_current_kube_config_context_name()
|
326
|
+
jobset = kube_client.crd_api(context=context).create_namespaced_custom_object(
|
322
327
|
group=JOBSET_API_GROUP,
|
323
328
|
version=JOBSET_API_VERSION,
|
324
329
|
namespace=namespace,
|
@@ -348,7 +353,8 @@ def create_jobset(
|
|
348
353
|
def list_jobset(namespace: str) -> Optional[Dict[str, Any]]:
|
349
354
|
"""Lists all jobsets in this namespace"""
|
350
355
|
try:
|
351
|
-
|
356
|
+
context = kubernetes_utils.get_current_kube_config_context_name()
|
357
|
+
response = kube_client.crd_api(context=context).list_namespaced_custom_object(
|
352
358
|
group=JOBSET_API_GROUP,
|
353
359
|
version=JOBSET_API_VERSION,
|
354
360
|
namespace=namespace,
|
@@ -372,7 +378,8 @@ def list_jobset(namespace: str) -> Optional[Dict[str, Any]]:
|
|
372
378
|
def get_jobset(namespace: str, job_name: str) -> Optional[Dict[str, Any]]:
|
373
379
|
"""Retrieves jobset in this namespace"""
|
374
380
|
try:
|
375
|
-
|
381
|
+
context = kubernetes_utils.get_current_kube_config_context_name()
|
382
|
+
response = kube_client.crd_api(context=context).get_namespaced_custom_object(
|
376
383
|
group=JOBSET_API_GROUP,
|
377
384
|
version=JOBSET_API_VERSION,
|
378
385
|
namespace=namespace,
|
@@ -409,7 +416,8 @@ def delete_jobset(namespace: str, job_name: str) -> Optional[Dict[str, Any]]:
|
|
409
416
|
Response from delete operation
|
410
417
|
"""
|
411
418
|
try:
|
412
|
-
|
419
|
+
context = kubernetes_utils.get_current_kube_config_context_name()
|
420
|
+
response = kube_client.crd_api(context=context).delete_namespaced_custom_object(
|
413
421
|
group=JOBSET_API_GROUP,
|
414
422
|
version=JOBSET_API_VERSION,
|
415
423
|
namespace=namespace,
|
@@ -446,7 +454,8 @@ def get_job(namespace: str, job_name: str) -> Optional[Dict[str, Any]]:
|
|
446
454
|
# Get the job object using the job name
|
447
455
|
# pattern {jobset-name}-workers-0-{worker_id}
|
448
456
|
job_name = f'{job_name}-workers-0'
|
449
|
-
|
457
|
+
context = kubernetes_utils.get_current_kube_config_context_name()
|
458
|
+
response = kube_client.batch_api(context=context).read_namespaced_job(
|
450
459
|
name=job_name, namespace=namespace
|
451
460
|
)
|
452
461
|
return response
|
konduktor/cli.py
CHANGED
@@ -853,12 +853,11 @@ def secret():
|
|
853
853
|
konduktor secret create --kind git-ssh --from-file=~/.ssh/id_rsa my-ssh-name
|
854
854
|
konduktor secret create --kind env --inline FOO=bar my-env-name
|
855
855
|
konduktor delete my-ssh-name
|
856
|
-
konduktor list
|
856
|
+
konduktor secret list
|
857
857
|
|
858
858
|
\b
|
859
859
|
For details on COMMAND ARGS:
|
860
860
|
konduktor secret create -h
|
861
|
-
konduktor secret delete -h
|
862
861
|
konduktor secret list -h
|
863
862
|
"""
|
864
863
|
|
konduktor/templates/pod.yaml.j2
CHANGED
@@ -76,6 +76,10 @@ kubernetes:
|
|
76
76
|
- name: GIT_SSH_COMMAND
|
77
77
|
value: "ssh -i /run/konduktor/git-ssh-secret/gitkey -o StrictHostKeyChecking=no"
|
78
78
|
{% endif %}
|
79
|
+
{% if default_secrets %}
|
80
|
+
- name: KONDUKTOR_DEFAULT_SECRETS
|
81
|
+
value: "/konduktor/default-secrets"
|
82
|
+
{% endif %}
|
79
83
|
# these are for compatibility with skypilot
|
80
84
|
- name: SKYPILOT_NODE_IPS
|
81
85
|
value: "{{ node_hostnames }}"
|
@@ -96,6 +100,10 @@ kubernetes:
|
|
96
100
|
- name: {{ secret_type }}-secret
|
97
101
|
mountPath: /run/konduktor/{{ secret_type }}-secret
|
98
102
|
{% endfor %}
|
103
|
+
{% for secret in default_secrets %}
|
104
|
+
- name: default-secret-{{ secret.mount_name }}
|
105
|
+
mountPath: /konduktor/default-secrets/{{ secret.mount_name }}
|
106
|
+
{% endfor %}
|
99
107
|
{% if git_ssh %}
|
100
108
|
- name: git-ssh-secret
|
101
109
|
mountPath: /run/konduktor/git-ssh-secret
|
@@ -348,6 +356,11 @@ kubernetes:
|
|
348
356
|
secret:
|
349
357
|
secretName: {{ secret_name }}
|
350
358
|
{% endfor %}
|
359
|
+
{% for secret in default_secrets %}
|
360
|
+
- name: default-secret-{{ secret.mount_name }}
|
361
|
+
secret:
|
362
|
+
secretName: {{ secret.k8s_name }}
|
363
|
+
{% endfor %}
|
351
364
|
{% if git_ssh %}
|
352
365
|
- name: git-ssh-secret
|
353
366
|
secret:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
konduktor/__init__.py,sha256=
|
1
|
+
konduktor/__init__.py,sha256=8nTGii1ywhKw3UAf0UutnAzRtL9TPS4dOmcBOZ8nKYo,1540
|
2
2
|
konduktor/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
konduktor/adaptors/aws.py,sha256=s47Ra-GaqCQibzVfmD0pmwEWHif1EGO5opMbwkLxTCU,8244
|
4
4
|
konduktor/adaptors/common.py,sha256=ZIqzjx77PIHUwpjfAQ1uX8B2aX78YMuGj4Bppd-MdyM,4183
|
@@ -7,9 +7,9 @@ konduktor/authentication.py,sha256=_mVy3eqoKohicHostFiGwG1-2ybxP-l7ouofQ0LRlCY,4
|
|
7
7
|
konduktor/backends/__init__.py,sha256=1Q6sqqdeMYarpTX_U-QVywJYf7idiUTRsyP-E4BQSOw,129
|
8
8
|
konduktor/backends/backend.py,sha256=qh0bp94lzoTYZkzyQv2-CVrB5l91FkG2vclXg24UFC0,2910
|
9
9
|
konduktor/backends/jobset.py,sha256=UdhwAuZODLMbLY51Y2zOBsh6wg4Pb84oHVvUKzx3Z2w,8434
|
10
|
-
konduktor/backends/jobset_utils.py,sha256=
|
10
|
+
konduktor/backends/jobset_utils.py,sha256=zBo-DTYbOLppH7fYSEhYqOjeFJz_RYNoid-dImu_Uj0,22068
|
11
11
|
konduktor/check.py,sha256=JennyWoaqSKhdyfUldd266KwVXTPJpcYQa4EED4a_BA,7569
|
12
|
-
konduktor/cli.py,sha256=
|
12
|
+
konduktor/cli.py,sha256=i5vXN_p21Tj7etX_QIkq1HCJ3I2Pn_OpKdddBMqRR-g,33877
|
13
13
|
konduktor/config.py,sha256=J50JxC6MsXMnlrJPXdDUMr38C89xvOO7mR8KJ6fyils,15520
|
14
14
|
konduktor/constants.py,sha256=T3AeXXxuQHINW_bAWyztvDeS8r4g8kXBGIwIq13cys0,1814
|
15
15
|
konduktor/controller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -71,7 +71,7 @@ konduktor/manifests/pod_cleanup_controller.yaml,sha256=hziL1Ka1kCAEL9R7Tjvpb80iw
|
|
71
71
|
konduktor/resource.py,sha256=Fg4kon7jQ9xDo9Iz8Q0J8doIRmTkSwIhYXLH6jbtRO8,19610
|
72
72
|
konduktor/task.py,sha256=ofwd8WIhfD6C3ThLcv6X3GUzQHyZ6ddjUagE-umF4K0,35207
|
73
73
|
konduktor/templates/jobset.yaml.j2,sha256=rdURknodtgLp4zoA2PX86Nn4wPpi3tr5l4IG55aWBRg,1059
|
74
|
-
konduktor/templates/pod.yaml.j2,sha256=
|
74
|
+
konduktor/templates/pod.yaml.j2,sha256=SlK6XKSwjuFJtBimlrUiFTcx7G_00XDtEopIKXBg5SI,16635
|
75
75
|
konduktor/usage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
76
76
|
konduktor/usage/constants.py,sha256=gCL8afIHZhO0dcxbJGpESE9sCC1cBSbeRnQ8GwNOY4M,612
|
77
77
|
konduktor/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -91,8 +91,8 @@ konduktor/utils/schemas.py,sha256=VGPERAso2G4sVAznsJ80qT2Q-I_EFxXw6Rfcw-vkYgQ,16
|
|
91
91
|
konduktor/utils/subprocess_utils.py,sha256=WoFkoFhGecPR8-rF8WJxbIe-YtV94LXz9UG64SDhCY4,9448
|
92
92
|
konduktor/utils/ux_utils.py,sha256=czCwiS1bDqgeKtzAJctczpLwFZzAse7WuozdvzEFYJ4,7437
|
93
93
|
konduktor/utils/validator.py,sha256=tgBghVyedyzGx84-U2Qfoh_cJBE3oUk9gclMW90ORks,691
|
94
|
-
konduktor_nightly-0.1.0.
|
95
|
-
konduktor_nightly-0.1.0.
|
96
|
-
konduktor_nightly-0.1.0.
|
97
|
-
konduktor_nightly-0.1.0.
|
98
|
-
konduktor_nightly-0.1.0.
|
94
|
+
konduktor_nightly-0.1.0.dev20250608104639.dist-info/LICENSE,sha256=MuuqTZbHvmqXR_aNKAXzggdV45ANd3wQ5YI7tnpZhm0,6586
|
95
|
+
konduktor_nightly-0.1.0.dev20250608104639.dist-info/METADATA,sha256=CQ9w6OfmAc9woXXE9jl18nTqOYgudGkRYX-dXUzZPh4,4289
|
96
|
+
konduktor_nightly-0.1.0.dev20250608104639.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
97
|
+
konduktor_nightly-0.1.0.dev20250608104639.dist-info/entry_points.txt,sha256=k3nG5wDFIJhNqsZWrHk4d0irIB2Ns9s47cjRWYsTCT8,48
|
98
|
+
konduktor_nightly-0.1.0.dev20250608104639.dist-info/RECORD,,
|
File without changes
|
File without changes
|