Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions simplyblock_web/api/internal/storage_node/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,12 @@ def spdk_process_start(body: SPDKParams):

try:
env = Environment(loader=PackageLoader('simplyblock_web', 'templates'), trim_blocks=True, lstrip_blocks=True)
image_pull_secrets_raw = os.environ.get("IMAGE_PULL_SECRETS", "")
try:
image_pull_secrets = [{"name": n} for n in json.loads(image_pull_secrets_raw)] if image_pull_secrets_raw else []
except Exception:
image_pull_secrets = []

values = {
'SPDK_IMAGE': body.spdk_image,
"L_CORES": body.l_cores,
Expand Down Expand Up @@ -378,6 +384,7 @@ def spdk_process_start(body: SPDKParams):
'TLS_CONNECT': settings.tls_connect,
'TLS_CLIENT_AUTH': settings.model_dump()["tls_client_auth"],
'TLS_PROVIDER': settings.tls_provider,
'IMAGE_PULL_SECRETS': image_pull_secrets,
}

if ubuntu_host:
Expand Down
6 changes: 6 additions & 0 deletions simplyblock_web/templates/oc_storage_core_isolation.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ spec:
operator: Exists
- effect: NoExecute
operator: Exists
{% if IMAGE_PULL_SECRETS %}
imagePullSecrets:
{% for secret in IMAGE_PULL_SECRETS %}
- name: {{ secret.name }}
{% endfor %}
{% endif %}
volumes:
- name: var-simplyblock
hostPath:
Expand Down
6 changes: 6 additions & 0 deletions simplyblock_web/templates/oc_storage_cpu_topology.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ spec:
operator: Exists
- effect: NoExecute
operator: Exists
{% if IMAGE_PULL_SECRETS %}
imagePullSecrets:
{% for secret in IMAGE_PULL_SECRETS %}
- name: {{ secret.name }}
{% endfor %}
{% endif %}
volumes:
- name: var-simplyblock
hostPath:
Expand Down
6 changes: 6 additions & 0 deletions simplyblock_web/templates/storage_core_isolation.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ spec:
operator: Exists
- effect: NoExecute
operator: Exists
{% if IMAGE_PULL_SECRETS %}
imagePullSecrets:
{% for secret in IMAGE_PULL_SECRETS %}
- name: {{ secret.name }}
{% endfor %}
{% endif %}
volumes:
- name: boot
hostPath:
Expand Down
6 changes: 6 additions & 0 deletions simplyblock_web/templates/storage_cpu_topology.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ spec:
operator: Exists
- effect: NoExecute
operator: Exists
{% if IMAGE_PULL_SECRETS %}
imagePullSecrets:
{% for secret in IMAGE_PULL_SECRETS %}
- name: {{ secret.name }}
{% endfor %}
{% endif %}

volumes:
- name: host
Expand Down
6 changes: 6 additions & 0 deletions simplyblock_web/templates/storage_deploy_spdk.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ spec:
operator: Exists
- effect: NoExecute
operator: Exists
{% if IMAGE_PULL_SECRETS %}
imagePullSecrets:
{% for secret in IMAGE_PULL_SECRETS %}
- name: {{ secret.name }}
{% endfor %}
{% endif %}
volumes:
- name: socket-dir
emptyDir:
Expand Down
6 changes: 6 additions & 0 deletions simplyblock_web/templates/storage_init_job.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ spec:
operator: Exists
- effect: NoExecute
operator: Exists
{% if IMAGE_PULL_SECRETS %}
imagePullSecrets:
{% for secret in IMAGE_PULL_SECRETS %}
- name: {{ secret.name }}
{% endfor %}
{% endif %}
volumes:
- name: host-proc
hostPath:
Expand Down
6 changes: 6 additions & 0 deletions simplyblock_web/templates/ubuntu_kernel_extra.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ spec:
operator: Exists
- effect: NoExecute
operator: Exists
{% if IMAGE_PULL_SECRETS %}
imagePullSecrets:
{% for secret in IMAGE_PULL_SECRETS %}
- name: {{ secret.name }}
{% endfor %}
{% endif %}
volumes:
- name: rootfs
hostPath:
Expand Down
Loading