Skip to content

Commit d7954f0

Browse files
docs: adds a section for OCI private repos in OCI dcos (#25572)
Signed-off-by: Patroklos Papapetrou <[email protected]>
1 parent e58d75f commit d7954f0

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/user-guide/oci.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,43 @@ The key to start using OCI images are the following components in the applicatio
5252
In the case of OCI Helm charts (an OCI artifact where the `mediaType` is set to `application/vnd.cncf.helm.chart.content.v1.tar+gzip`),
5353
the path should always be set to `.`.
5454

55+
## OCI Repositories special cases
56+
if there is a need to have credentials for a OCI repository, a repository credential of type *oci needs to be created.
57+
```shell
58+
# Add a private HTTPS OCI repository named 'stable'
59+
argocd repo add oci://registry-1.docker.io/bitnamicharts/nginx --type oci --name stable --username test --password test
60+
```
61+
62+
In the case of Helm repositories there is another way to use OCI credentials with Helm
63+
```shell
64+
# Add a private HTTPS OCI Helm repository named 'stable'
65+
argocd repo add registry-1.docker.io/bitnamicharts/nginx --type helm --name stable --username test --password test --enable-oci
66+
```
67+
68+
> [!NOTE]
69+
> The repository URL should not contain the OCI scheme prefix `oci://`.
70+
> Also the path should be removed from the repository URL and should be defined instead in the `path` attribute.
71+
72+
```yaml
73+
apiVersion: argoproj.io/v1alpha1
74+
kind: Application
75+
metadata:
76+
name: my-custom-image
77+
namespace: argocd
78+
spec:
79+
project: default
80+
source:
81+
path: bitnamicharts/nginx
82+
repoURL: registry-1.docker.io
83+
targetRevision: 1.16.1
84+
destination:
85+
server: "https://kubernetes.default.svc"
86+
namespace: my-namespace
87+
```
88+
89+
> [!NOTE]
90+
> Keep in mind that this only applies when using a Helm repository credential.
91+
5592
## Usage Guidelines
5693

5794
First off, you'll need to have a repository that is OCI-compliant. As an example, DockerHub, ECR, GHCR and GCR all fit

0 commit comments

Comments
 (0)