diff --git a/spawn_operator/spawn_operator/lib/spawn_operator/k8s/proxy/deployment.ex b/spawn_operator/spawn_operator/lib/spawn_operator/k8s/proxy/deployment.ex index 000ae50b..fb797f5e 100644 --- a/spawn_operator/spawn_operator/lib/spawn_operator/k8s/proxy/deployment.ex +++ b/spawn_operator/spawn_operator/lib/spawn_operator/k8s/proxy/deployment.ex @@ -195,6 +195,7 @@ defmodule SpawnOperator.K8s.Proxy.Deployment do } |> maybe_put_node_selector(topology) |> maybe_put_node_tolerations(topology) + |> maybe_put_image_pull_secrets(host_params) |> maybe_put_volumes(params, erlang_mtls_enabled) |> maybe_set_termination_period(params) } @@ -456,6 +457,15 @@ defmodule SpawnOperator.K8s.Proxy.Deployment do defp maybe_put_node_tolerations(spec, _), do: spec + defp maybe_put_image_pull_secrets( + spec, + %{"pullSecretRef" => secret_name} = _host_params + ) do + Map.merge(spec, %{"imagePullSecrets" => %{"name" => secret_name}}) + end + + defp maybe_put_image_pull_secrets(spec, _), do: spec + defp maybe_put_ports_to_host_container(spec, %{"ports" => ports}) do Map.put(spec, "ports", ports) end diff --git a/spawn_operator/spawn_operator/lib/spawn_operator/versions/api/v1/actor_host.ex b/spawn_operator/spawn_operator/lib/spawn_operator/versions/api/v1/actor_host.ex index 4bf8d611..ecf86be8 100644 --- a/spawn_operator/spawn_operator/lib/spawn_operator/versions/api/v1/actor_host.ex +++ b/spawn_operator/spawn_operator/lib/spawn_operator/versions/api/v1/actor_host.ex @@ -193,6 +193,8 @@ defmodule SpawnOperator.Versions.Api.V1.ActorHost do properties: image: type: string + pullSecretsRef: + type: string volumeMounts: type: array items: