diff --git a/deploy/crds/pulpproject_v1beta1_pulp_crd.yaml b/deploy/crds/pulpproject_v1beta1_pulp_crd.yaml index 4e38c081a..dcffc551c 100644 --- a/deploy/crds/pulpproject_v1beta1_pulp_crd.yaml +++ b/deploy/crds/pulpproject_v1beta1_pulp_crd.yaml @@ -203,6 +203,9 @@ spec: - IfNotPresent - Always - Never + image_pull_secret: + description: The image pull secret + type: string affinity: description: Defines various deployment affinities properties: diff --git a/deploy/olm-catalog/pulp-operator/manifests/pulp-operator.clusterserviceversion.yaml b/deploy/olm-catalog/pulp-operator/manifests/pulp-operator.clusterserviceversion.yaml index f18e0d38e..3acb7111c 100644 --- a/deploy/olm-catalog/pulp-operator/manifests/pulp-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/pulp-operator/manifests/pulp-operator.clusterserviceversion.yaml @@ -207,6 +207,12 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:hidden + - displayName: Image pull secret + description: Image pull secret for container images + path: image_pull_secret + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - urn:alm:descriptor:com.tectonic.ui:imagePullSecret - displayName: Deployment Affinity description: The deployment affinity path: affinity diff --git a/deploy/olm-catalog/pulp-operator/manifests/pulp.pulpproject.org_pulps_crd.yml b/deploy/olm-catalog/pulp-operator/manifests/pulp.pulpproject.org_pulps_crd.yml index 9ee96d20c..5acb35701 100644 --- a/deploy/olm-catalog/pulp-operator/manifests/pulp.pulpproject.org_pulps_crd.yml +++ b/deploy/olm-catalog/pulp-operator/manifests/pulp.pulpproject.org_pulps_crd.yml @@ -209,6 +209,9 @@ spec: - IfNotPresent - Always - Never + image_pull_secret: + description: The image pull secret + type: string affinity: description: Defines various deployment affinities properties: diff --git a/playbook.yml b/playbook.yml index 6efa99862..a76a529e7 100644 --- a/playbook.yml +++ b/playbook.yml @@ -27,6 +27,7 @@ project: pulp image: pulp image_web: pulp-web + image_pull_secret: "" tag: stable storage_type: File file_storage: diff --git a/roles/postgres/templates/postgres.yaml.j2 b/roles/postgres/templates/postgres.yaml.j2 index 34620f0f6..38f1d6a1b 100644 --- a/roles/postgres/templates/postgres.yaml.j2 +++ b/roles/postgres/templates/postgres.yaml.j2 @@ -35,6 +35,10 @@ spec: app.kubernetes.io/part-of: '{{ deployment_type }}' app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' spec: +{% if image_pull_secret %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% endif %} {% if affinity is defined and affinity.node_affinity is defined %} affinity: nodeAffinity: {{ affinity.node_affinity }} diff --git a/roles/pulp-api/templates/pulp-api.deployment.yaml.j2 b/roles/pulp-api/templates/pulp-api.deployment.yaml.j2 index 256f46749..ac8df7151 100644 --- a/roles/pulp-api/templates/pulp-api.deployment.yaml.j2 +++ b/roles/pulp-api/templates/pulp-api.deployment.yaml.j2 @@ -28,6 +28,10 @@ spec: app.kubernetes.io/part-of: '{{ deployment_type }}' app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' spec: +{% if image_pull_secret %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% endif %} {% if affinity is defined and affinity.node_affinity is defined %} affinity: nodeAffinity: {{ affinity.node_affinity }} diff --git a/roles/pulp-content/templates/pulp-content.deployment.yaml.j2 b/roles/pulp-content/templates/pulp-content.deployment.yaml.j2 index 4f331f028..2b52cb8b3 100644 --- a/roles/pulp-content/templates/pulp-content.deployment.yaml.j2 +++ b/roles/pulp-content/templates/pulp-content.deployment.yaml.j2 @@ -28,6 +28,10 @@ spec: app.kubernetes.io/part-of: '{{ deployment_type }}' app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' spec: +{% if image_pull_secret %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% endif %} {% if affinity is defined and affinity.node_affinity is defined %} affinity: nodeAffinity: {{ affinity.node_affinity }} diff --git a/roles/pulp-resource-manager/templates/pulp-resource-manager.deployment.yaml.j2 b/roles/pulp-resource-manager/templates/pulp-resource-manager.deployment.yaml.j2 index 1bd1a9c2d..bce74df29 100644 --- a/roles/pulp-resource-manager/templates/pulp-resource-manager.deployment.yaml.j2 +++ b/roles/pulp-resource-manager/templates/pulp-resource-manager.deployment.yaml.j2 @@ -28,6 +28,10 @@ spec: app.kubernetes.io/part-of: '{{ deployment_type }}' app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' spec: +{% if image_pull_secret %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% endif %} {% if affinity is defined and affinity.node_affinity is defined %} affinity: nodeAffinity: {{ affinity.node_affinity }} diff --git a/roles/pulp-web/templates/pulp-web.deployment.yaml.j2 b/roles/pulp-web/templates/pulp-web.deployment.yaml.j2 index d35444f69..98d17f6b8 100644 --- a/roles/pulp-web/templates/pulp-web.deployment.yaml.j2 +++ b/roles/pulp-web/templates/pulp-web.deployment.yaml.j2 @@ -28,6 +28,10 @@ spec: app.kubernetes.io/part-of: '{{ deployment_type }}' app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' spec: +{% if image_pull_secret %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% endif %} {% if affinity is defined and affinity.node_affinity is defined %} affinity: nodeAffinity: {{ affinity.node_affinity }} diff --git a/roles/pulp-worker/templates/pulp-worker.deployment.yaml.j2 b/roles/pulp-worker/templates/pulp-worker.deployment.yaml.j2 index b55a0821a..3f5ea5950 100644 --- a/roles/pulp-worker/templates/pulp-worker.deployment.yaml.j2 +++ b/roles/pulp-worker/templates/pulp-worker.deployment.yaml.j2 @@ -28,6 +28,10 @@ spec: app.kubernetes.io/part-of: '{{ deployment_type }}' app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' spec: +{% if image_pull_secret %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% endif %} {% if affinity is defined and affinity.node_affinity is defined %} affinity: nodeAffinity: {{ affinity.node_affinity }} diff --git a/roles/redis/templates/redis.deployment.yaml.j2 b/roles/redis/templates/redis.deployment.yaml.j2 index c99c94093..a30817395 100644 --- a/roles/redis/templates/redis.deployment.yaml.j2 +++ b/roles/redis/templates/redis.deployment.yaml.j2 @@ -28,6 +28,10 @@ spec: app.kubernetes.io/part-of: '{{ deployment_type }}' app.kubernetes.io/managed-by: '{{ deployment_type }}-operator' spec: +{% if image_pull_secret %} + imagePullSecrets: + - name: {{ image_pull_secret }} +{% endif %} {% if affinity is defined and affinity.node_affinity is defined %} affinity: nodeAffinity: {{ affinity.node_affinity }}