Skip to content

Commit f90b98e

Browse files
committed
📖 Document how to configure global pull secrets
Closes #1409
1 parent 3083879 commit f90b98e

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Configure global pull secrets for allowing components to pull private images
2+
3+
To configure `catalogd` and `operator-controller` to use authentication information for pulling private images (catalog/bundle images etc), the components can be informed about a kubernetes `Secret` object that contains the relevant auth information. The `Secret` must be of type `kubernetes.io/dockerconfigjson`.
4+
5+
Once the `Secret` is created, `catalogd` and `operator-controller` needs to be redeployed with an additional field, `--global-pull-secret=<secret-namespace>/<secret-name>` passed to the respective binaries.
6+
7+
For eg, create a `Secret` using locally available `config.json`:
8+
9+
```sh
10+
$ kubectl create secret docker-registry test-secret \
11+
--from-file=.dockerconfigjson=$HOME/.docker/config.json \
12+
--namespace olmv1-system
13+
secret/test-secret created
14+
```
15+
16+
Verify that the Secret is created:
17+
18+
```sh
19+
$ kubectl get secret test-secret -n olmv1-system -o yaml
20+
apiVersion: v1
21+
data:
22+
.dockerconfigjson: ewogICJh....
23+
kind: Secret
24+
metadata:
25+
creationTimestamp: "2024-10-25T12:05:46Z"
26+
name: test-secret
27+
namespace: olmv1-system
28+
resourceVersion: "237734"
29+
uid: 880138f1-5d98-4bb0-9e45-45e8ebaff647
30+
type: kubernetes.io/dockerconfigjson
31+
```
32+
33+
Modify the `config/base/manager/manager.yaml` file for `catalogd` and `operator-controller` to include the new field in the binary args:
34+
35+
```yaml
36+
- command:
37+
- ./manager
38+
args:
39+
- ...
40+
- ...
41+
- ...
42+
- --global-pull-secret=olmv1-system/test-secret
43+
```
44+
45+
With the above configuration, creating a `ClusterCatalog` or a `ClusterExention` whose content is packaged in a private container image hosted in an image registry, will become possible.
46+

docs/tutorials/install-extension.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ After you add a catalog to your cluster, you can install an extension by creatin
1414
* The name, and optionally version, or channel, of the [supported extension](../project/olmv1_limitations.md) to be installed
1515
* An existing namespace in which to install the extension
1616

17+
**Note** To install ClusterExentions that are shipped as private container images hosted in an image registry, please see [How to conifgure global pull secrets](../howto/configure-global-pull-secrets.md).
18+
1719
### ServiceAccount for ClusterExtension Installation and Management
1820

1921
Adhering to OLM v1's "Secure by Default" tenet, OLM v1 does not have the permissions

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ nav:
3636
- Uninstall an Extension: tutorials/uninstall-extension.md
3737
- How-To Guides:
3838
- Catalog queries: howto/catalog-queries.md
39+
- Configure Global pull secrets: howto/configure-global-pull-secrets.md
3940
- Channel-Based Upgrades: howto/how-to-channel-based-upgrades.md
4041
- Version Pinning: howto/how-to-pin-version.md
4142
- Version Range Upgrades: howto/how-to-version-range-upgrades.md

0 commit comments

Comments
 (0)