Skip to content

Commit ce5f770

Browse files
author
Flávio Santos
committed
Explain repo definition for source hydrators
Signed-off-by: Flávio Santos <[email protected]>
1 parent 2fc05c5 commit ce5f770

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

docs/user-guide/source-hydrator.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ Tools like Helm and Kustomize allow users to express their Kubernetes manifests
66
(keeping it DRY - Don't Repeat Yourself). However, these tools can obscure the actual Kubernetes manifests that are
77
applied to the cluster.
88

9-
The "rendered manifest pattern" is a way to push the hydrated manifests to git before syncing them to the cluster. This
9+
The "rendered manifest pattern" is a feature of Argo CD that allows users to push the hydrated manifests to git before syncing them to the cluster. This
1010
allows users to see the actual Kubernetes manifests that are applied to the cluster.
1111

12-
The source hydrator is a feature of Argo CD that allows users to push the hydrated manifests to git before syncing them
13-
to the cluster.
14-
1512
## Enabling the Source Hydrator
1613

1714
The source hydrator is disabled by default.
@@ -49,7 +46,7 @@ With hydrator: https://raw.githubusercontent.com/argoproj/argo-cd/stable/mani
4946
5047
## Using the Source Hydrator
5148
52-
To use the source hydrator, you must first install a push secret. This example uses a GitHub App for authentication, but
49+
To use the source hydrator, you must first install a push and a pull secret. This example uses a GitHub App for authentication, but
5350
you can use [any authentication method that Argo CD supports for repository access](../operator-manual/declarative-setup.md#repositories).
5451
5552
```yaml
@@ -61,6 +58,22 @@ metadata:
6158
labels:
6259
argocd.argoproj.io/secret-type: repository-write
6360
type: Opaque
61+
stringData:
62+
url: "https://github.com"
63+
type: "git"
64+
githubAppID: "<your app ID here>"
65+
githubAppInstallationID: "<your installation ID here>"
66+
githubAppPrivateKey: |
67+
<your private key here>
68+
---
69+
apiVersion: v1
70+
kind: Secret
71+
metadata:
72+
name: my-pull-secret
73+
namespace: argocd
74+
labels:
75+
argocd.argoproj.io/secret-type: repository
76+
type: Opaque
6477
stringData:
6578
url: "https://github.com"
6679
type: "git"
@@ -70,10 +83,11 @@ stringData:
7083
<your private key here>
7184
```
7285

73-
The label `argocd.argoproj.io/secret-type: repository-write` causes this Secret to be used for pushing manifests to git
74-
instead of pulling from git.
86+
The only difference between the secrets above, besides the resource name, is that the push secret contains the label
87+
`argocd.argoproj.io/secret-type: repository-write`, which causes the Secret to be used for pushing manifests to git
88+
instead of pulling from git. Argo CD requires different secrets for pushing and pulling to provide better isolation.
7589

76-
Once your push secret is installed, set the `spec.sourceHydrator` field of the Application. For example:
90+
Once your secrets are installed, set the `spec.sourceHydrator` field of the Application. For example:
7791

7892
```yaml
7993
apiVersion: argoproj.io/v1alpha1

0 commit comments

Comments
 (0)