Skip to content

Commit 2c4794d

Browse files
committed
📖 Document how to configure global pull secrets
Closes operator-framework#1409
1 parent 5713012 commit 2c4794d

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
tags:
3+
- alpha
4+
---
5+
6+
# Configure global pull secrets for allowing components to pull private images
7+
8+
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`.
9+
10+
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.
11+
12+
For eg, create a `Secret` using locally available `config.json`:
13+
14+
```sh
15+
$ kubectl create secret docker-registry test-secret \
16+
--from-file=.dockerconfigjson=$HOME/.docker/config.json \
17+
--namespace olmv1-system
18+
secret/test-secret created
19+
```
20+
21+
Verify that the Secret is created:
22+
23+
```sh
24+
$ kubectl get secret test-secret -n olmv1-system -o yaml
25+
apiVersion: v1
26+
data:
27+
.dockerconfigjson: ewogICJh....
28+
kind: Secret
29+
metadata:
30+
creationTimestamp: "2024-10-25T12:05:46Z"
31+
name: test-secret
32+
namespace: olmv1-system
33+
resourceVersion: "237734"
34+
uid: 880138f1-5d98-4bb0-9e45-45e8ebaff647
35+
type: kubernetes.io/dockerconfigjson
36+
```
37+
38+
Modify the `config/base/manager/manager.yaml` file for `catalogd` and `operator-controller` to include the new field in the binary args:
39+
40+
```yaml
41+
- command:
42+
- ./manager
43+
args:
44+
- ...
45+
- ...
46+
- ...
47+
- --global-pull-secret=olmv1-system/test-secret
48+
```
49+
50+
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.
51+

‎docs/tutorials/install-extension.md

+2
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

+1
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)