Skip to content

Commit 1bff974

Browse files
authored
(DOCSP-18122) ImagePullSecret is synchronized across all watched namespaces (#730)
* (DOCSP-18122) imagePullSecret is syncrhonized to all watched namespaces * Fixing the build warnings * Edits, and fixing build warnings due to bad links * Fixing rst * Edits * Include first batch of comments from copy review. To be continued * Finished adding copy review * Fixing the build * Fixing the build 2 * One edit, and fixing a warning in the build. Ready for a second copy review * Second round of copy review by John W * fixing the build * Fixing the link, minor edits. Ready for the next round of reviews * edits * Addressed the last copy review comment. Ready for a tech review
1 parent 3a279a1 commit 1bff974

11 files changed

+150
-112
lines changed

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
'.. |k8s-secrets| replace:: `secrets <https://kubernetes.io/docs/concepts/configuration/secret/>`__',
167167
'.. |k8s-secret| replace:: `secret <https://kubernetes.io/docs/concepts/configuration/secret/>`__',
168168
'.. |k8s-service| replace:: `service <https://kubernetes.io/docs/concepts/services-networking/service/>`__',
169+
'.. |k8s-service-accounts| replace:: `service accounts <https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/>`__',
169170
'.. |k8s-service-type| replace:: `ServiceType <https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types>`__',
170171
'.. |k8s-statefulsets| replace:: `StatefulSets <https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/>`__',
171172
'.. |k8s-statefulset| replace:: `StatefulSet <https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/>`__',

source/includes/admonitions/fact-use-metadata-name.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

source/includes/op-setting-descs/registry-imagepullsecrets.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@ images from the repository.
33

44
.. important::
55

6-
OpenShift requires this setting. Define it in this file or
7-
pass it when you install the |k8s-op-short| using Helm.
6+
OpenShift requires this setting. Define it in the
7+
``imagePullSecrets`` setting in this file or pass it when you install
8+
the |k8s-op-short| using Helm.
9+
If you use the |k8s-op-short| to deploy MongoDB resources to
10+
:ref:`multiple namespaces <ns-scope-different-ns>` or with a
11+
:ref:`cluster-wide scope <cluster-wide-scope>`, create the secret
12+
only in the namespace where you installed the |k8s-op-short|.
13+
The |k8s-op-short| synchronizes the secret across all watched
14+
namespaces.

source/includes/steps-helm-master.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ content: |
173173
174174
Add the name of your ``<openshift-pull-secret>`` to the
175175
``registry.imagePullSecrets`` setting in the
176-
``helm_chart/values-openshift.yaml`` file:
176+
``helm_chart/values-openshift.yaml`` file.
177+
To learn more, see the ``registry.imagePullSecrets`` setting in the
178+
:doc:`Helm installation settings </reference/helm-operator-settings>`.
177179
178180
.. code-block:: sh
179181
:emphasize-lines: 3

source/includes/steps-install-master.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,22 @@ level: 4
4444
ref: install-master-edit-yaml
4545
content: |
4646
47-
{{pullsecret}}
47+
To learn about optional |k8s-op-short| installation settings,
48+
see :ref:`Operator kubectl and oc Installation Settings
49+
<meko-op-install-settings-kubectl-oc>`.
50+
---
51+
title: "Add your ``<openshift-pull-secret>`` to the ``ServiceAccount``
52+
definitions in the |k8s-op-short| |yaml| before {{method}} it."
53+
level: 4
54+
ref: add-pullsecret-yaml
55+
content: |
4856
49-
#. You might need to add one or more optional settings.
57+
.. literalinclude:: /includes/openshift-service-accounts.yaml
58+
:language: yaml
59+
:emphasize-lines: 11-12, 22-23, 33-34
5060
51-
To learn about optional |k8s-op-short| installation settings,
52-
see :ref:`Operator kubectl and oc Installation Settings <meko-op-install-settings-kubectl-oc>`.
61+
To learn more, see the ``registry.imagePullSecrets`` setting in the
62+
:doc:`Helm installation settings </reference/helm-operator-settings>`.
5363
---
5464
title: "{{method}}"
5565
level: 4

source/includes/steps-install-oc.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,23 @@ inherit:
2424
stepnum: 3
2525
replacement:
2626
method: installing
27-
pullsecret: |
2827

29-
#. You must add your ``<openshift-pull-secret>`` to the
30-
``ServiceAccount`` definitions:
3128

32-
.. literalinclude:: /includes/openshift-service-accounts.yaml
33-
:language: yaml
34-
:emphasize-lines: 11-12, 22-23, 33-34
29+
---
30+
ref: add-oc-pullsecret-yaml
31+
inherit:
32+
file: steps-install-master.yaml
33+
ref: add-pullsecret-yaml
34+
stepnum: 4
35+
replacement:
36+
method: installing
37+
3538
---
3639
ref: install-oc-install
3740
inherit:
3841
file: steps-install-master.yaml
3942
ref: install-master-install
40-
stepnum: 4
43+
stepnum: 5
4144
replacement:
4245
method: "Install the |k8s-op-short| using the following
4346
|oc| command:"

source/includes/steps-install-prereqs.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ content: |
6868
the |onprem| host's clock falls out of sync, that host can't
6969
communicate with the |k8s-op-short|.
7070
71-
To learn how to check your |ntp| service for your Ops Manager
71+
To learn how to check your |ntp| service for your |onprem|
7272
host, see the documentation for
7373
`Ubuntu <https://help.ubuntu.com/lts/serverguide/NTP.html>`__ or
7474
`RHEL
@@ -78,9 +78,17 @@ content: |
7878
stepnum: 5
7979
level: 4
8080
ref: create-k8s-secret
81-
title: "**Required for OpenShift Installs:** Create a |k8s-secret| that contains credentials authorized to pull images from the ``registry.connect.redhat.com`` repository."
81+
title: "**Required for OpenShift Installs:** Create a |k8s-secret| that
82+
contains credentials authorized to pull images from the
83+
``registry.connect.redhat.com`` repository."
8284
content: |
8385
86+
If you use the |k8s-op-short| to deploy MongoDB
87+
resources to :ref:`multiple namespaces <ns-scope-different-ns>` or with
88+
a :ref:`cluster-wide scope <cluster-wide-scope>`, create the secret
89+
only in the namespace where you intend to deploy the |k8s-op-short|. The
90+
|k8s-op-short| synchronizes the secret across all watched namespaces.
91+
8492
a. If you have not already, obtain a Red Hat subscription.
8593
8694
#. Create a `Registry Service Account <https://access.redhat.com/terms-based-registry/>`__.
@@ -92,8 +100,8 @@ content: |
92100
text editor.
93101
94102
#. Copy the ``registry.redhat.io`` object, and paste another instance
95-
of this object into the file. Remember to add a comma after the
96-
first object. Rename the second object
103+
of this object into the file. Remember to add a comma after the
104+
first object. Rename the second object
97105
``registry.connect.redhat.com``, then save the file:
98106
99107
.. code-block:: json
@@ -110,9 +118,10 @@ content: |
110118
}
111119
}
112120
113-
#. Create a ``openshift-pull-secret.yaml`` file with the contents of
114-
the modified ``<account-name>-auth.json`` file as ``stringData``
115-
named ``.dockerconfigjson``:
121+
#. Create an ``openshift-pull-secret.yaml`` file and add the contents
122+
of the modified ``<account-name>-auth.json`` file as
123+
``stringData`` named ``.dockerconfigjson`` to the
124+
``openshift-pull-secret.yaml`` secret file.
116125
117126
.. code-block:: yaml
118127
:emphasize-lines: 4-16
@@ -136,11 +145,11 @@ content: |
136145
type: kubernetes.io/dockerconfigjson
137146
138147
The value you provide in the ``metadata.name`` field contains
139-
the secret name. Provide this value when asked for the
148+
the secret name. Provide this value when asked for the
140149
``<openshift-pull-secret>``.
141150
142151
#. Create a |k8s-secret| from the ``openshift-pull-secret.yaml``
143-
file:
152+
file in the same namespace in which you will deploy the |k8s-op-short|.
144153
145154
.. code-block:: sh
146155

source/includes/steps-openshift-quick-start.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ content: |
4545
4646
oc apply -f crds.yaml
4747
48-
#. Add your ``<openshift-pull-secret>`` to the ``ServiceAccount``
49-
definitions in the |k8s-op-full| |yaml| file:
48+
#. Add your ``<openshift-pull-secret>`` to the ``ServiceAccount``
49+
definitions in the |k8s-op-full| |yaml| file.
5050
5151
.. literalinclude:: /includes/openshift-service-accounts.yaml
5252
:language: yaml

source/includes/steps-upgrade-oc_old.yaml

Lines changed: 0 additions & 61 deletions
This file was deleted.

source/reference/helm-operator-settings.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,14 @@ registry.imagePullSecrets
426426
.. example::
427427

428428
.. code-block:: yaml
429-
:emphasize-lines: 3
429+
:emphasize-lines: 7
430430

431431
registry:
432-
# The pull secret must be specified
432+
# Specify the secret in the ``imagePullSecrets`` setting. If you
433+
# use the MongoDB Kubernetes Operator to deploy MongoDB resources
434+
# into multiple namespaces, create the secret only in the namespace
435+
# where you installed the Operator. The Operator synchronizes
436+
# the secret across all watched namespaces.
433437
imagePullSecrets: <openshift-pull-secret>
434438

435439
registry.initAppDb

0 commit comments

Comments
 (0)