Skip to content

Commit 9699871

Browse files
authored
docs: add FUNC_USERNAME/PASSWORD env vars documentation (#6543)
1 parent a587804 commit 9699871

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

docs/snippets/proc-building-function.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ The `build` command uses the project name and the image registry name to constru
2222

2323
!!! note
2424
The coordinates for the **image registry** can be configured through an environment variable (`FUNC_REGISTRY`) as well.
25+
26+
!!! tip "Private Registry Authentication"
27+
For private registries that require authentication, you can set credentials using environment variables:
28+
29+
- `FUNC_USERNAME`: The username for registry authentication
30+
- `FUNC_PASSWORD`: The password for registry authentication
31+
32+
These variables work with all builders: `host`, `s2i`, and `pack`.
33+
34+
**Note:** Using environment variables is more secure than the `--password` flag because command-line arguments are visible to all users on the system via `ps`.

docs/snippets/proc-deploying-function.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ The `deploy` command uses the function project name as the Knative Service name.
4646
http://hello.default.127.0.0.1.sslip.io
4747
```
4848

49+
!!! tip "Private Registry Authentication"
50+
For private registries that require authentication, you can set credentials using environment variables:
51+
52+
- `FUNC_USERNAME`: The username for registry authentication
53+
- `FUNC_PASSWORD`: The password for registry authentication
54+
55+
These variables work with all builders: `host`, `s2i`, and `pack`.
56+
57+
**Note:** Using environment variables is more secure than the `--password` flag because command-line arguments are visible to all users on the system via `ps`.
58+
4959
You can verify that your function has been successfully deployed by using the `invoke` command and observing the output:
5060

5161
=== "func"

docs/snippets/proc-running-function.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ The `run` command builds an image for your function if required, and runs this i
6060
kn func run --build=false
6161
```
6262

63+
!!! tip "Private Registry Authentication"
64+
For private registries that require authentication, you can set credentials using environment variables:
65+
66+
- `FUNC_USERNAME`: The username for registry authentication
67+
- `FUNC_PASSWORD`: The password for registry authentication
68+
69+
These variables work with all builders: `host`, `s2i`, and `pack`.
70+
71+
**Note:** Using environment variables is more secure than the `--password` flag because command-line arguments are visible to all users on the system via `ps`.
6372
You can verify that your function has been successfully run by using the `invoke` command and observing the output:
6473

6574
=== "func"

0 commit comments

Comments
 (0)