Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions site/content/vendir/docs/develop/sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,54 @@ $ export VENDIR_CACHE_DIR=~/.vendir/cache
$ export VENDIR_MAX_CACHE_SIZE=1Ki
$ vendir sync
```

## Sync with HTTP authentication

For HTTP sources that require authentication, configure the HTTP contents with a `secretRef`.

Use `username` and `password` keys for basic authentication (Authorization: Basic <BASE64_CREDENTIALS>):

```yaml
---
apiVersion: v1
kind: Secret
metadata:
name: http-auth
data:
username: dXNlcm5hbWU=
password: cGFzc3dvcmQ=
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: stack
contents:
- path: "."
http:
url: https://<url>
secretRef:
name: http-auth
```

Use `token` for Bearer Token authentication (Authorization: Bearer <TOKEN>):

```yaml
---
apiVersion: v1
kind: Secret
metadata:
name: http-auth
data:
token: dG9rZW4=
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: stack
contents:
- path: "."
http:
url: https://<url>
secretRef:
name: http-auth
```
51 changes: 51 additions & 0 deletions site/content/vendir/docs/v0.46.x/sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,54 @@ $ export VENDIR_CACHE_DIR=~/.vendir/cache
$ export VENDIR_MAX_CACHE_SIZE=1Ki
$ vendir sync
```

## Sync with HTTP authentication

For HTTP sources that require authentication, configure the HTTP contents with a `secretRef`.

Use `username` and `password` keys for basic authentication (Authorization: Basic <BASE64_CREDENTIALS>):

```yaml
---
apiVersion: v1
kind: Secret
metadata:
name: http-auth
data:
username: dXNlcm5hbWU=
password: cGFzc3dvcmQ=
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: stack
contents:
- path: "."
http:
url: https://<url>
secretRef:
name: http-auth
```

Use `token` for Bearer Token authentication (Authorization: Bearer <TOKEN>):

```yaml
---
apiVersion: v1
kind: Secret
metadata:
name: http-auth
data:
token: dG9rZW4=
---
apiVersion: vendir.k14s.io/v1alpha1
kind: Config
directories:
- path: stack
contents:
- path: "."
http:
url: https://<url>
secretRef:
name: http-auth
```