You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: use GitHub alerts instead of mkdocs admonitions (#592)
* docs: use GitHub alerts instead of mkdocs admonitions
Signed-off-by: Michael Crenshaw <[email protected]>
* add back the thing copilot removed
Signed-off-by: Michael Crenshaw <[email protected]>
* fix ci order
Signed-off-by: Michael Crenshaw <[email protected]>
---------
Signed-off-by: Michael Crenshaw <[email protected]>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,6 +214,31 @@ make docker-build
214
214
- If deepcopy methods are missing, run `make generate`
215
215
- If UI builds fail, check Node.js version and run `npm install` in the UI directory
216
216
217
+
# Setting up MkDocs and Python Virtual Environment
218
+
219
+
To build and serve documentation locally, set up a Python virtual environment at the repository root:
220
+
221
+
```fish
222
+
python3 -m venv .venv
223
+
source .venv/bin/activate.fish
224
+
pip install -r docs/requirements.txt
225
+
mkdocs serve
226
+
```
227
+
228
+
- This will install all MkDocs dependencies, including plugins for GitHub-style alerts.
229
+
230
+
## Verifying Documentation Linting
231
+
232
+
To check that your documentation changes do not introduce any MkDocs warnings, run:
233
+
234
+
```bash
235
+
make lint-docs
236
+
```
237
+
238
+
This will build the documentation and fail if any warnings are present. The full MkDocs output will be shown if there are issues, making it easy to debug. This check is also run automatically in CI for every pull request.
239
+
240
+
Make sure you have activated your Python virtual environment and installed dependencies as described above before running this command.
241
+
217
242
## Additional Resources
218
243
219
244
- Main documentation: https://gitops-promoter.readthedocs.io/
Copy file name to clipboardExpand all lines: docs/commit-status-controllers/argocd.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,15 @@ based on Argo CD's concept of a healthy application. The controller listens for
5
5
Applications based on a common label on the Application resources managed by a particular
6
6
PromotionStrategy.
7
7
8
-
!!! important
9
-
Currently this controller only works with Argo CD Applications that are configured to use the [Source Hydrator](https://argo-cd.readthedocs.io/en/stable/user-guide/source-hydrator/).
8
+
> [!IMPORTANT]
9
+
>Currently this controller only works with Argo CD Applications that are configured to use the [Source Hydrator](https://argo-cd.readthedocs.io/en/stable/user-guide/source-hydrator/).
10
10
11
-
!!! important
12
-
Currently the repo URL configured in the PromotionStrategy must be exactly the same as the repo URL configured in the Argo CD Application.
11
+
> [!IMPORTANT]
12
+
>Currently the repo URL configured in the PromotionStrategy must be exactly the same as the repo URL configured in the Argo CD Application.
13
13
14
-
!!! note
15
-
16
-
GitOps Promoter provides several opt-in Argo CD integrations that improve the user experience. Check out the
17
-
[Argo CD Integrations](./argocd-integrations.md) page for more information.
14
+
> [!NOTE]
15
+
> GitOps Promoter provides several opt-in Argo CD integrations that improve the user experience. Check out the
16
+
> [Argo CD Integrations](../argocd-integrations.md) page for more information.
18
17
19
18
## Example Configurations
20
19
@@ -61,14 +60,14 @@ spec:
61
60
### Commit Status URL Template
62
61
To configure setting the url of a commit status, for example, a link to an Argo CD instance, set the `url.template` field. The template uses [Go templates](https://pkg.go.dev/text/template) syntax and most [Sprig](https://masterminds.github.io/sprig/) functions (excluding `env`, `expandenv` and `getHostByName`) are supported as well as an additional [`urlQueryEscape`](https://pkg.go.dev/net/url#QueryEscape) function for escaping url query parameters. The template receives `.Environment` and `.ArgoCDCommitStatus` variables.
63
62
64
-
!!! important
65
-
The rendered URL must use a scheme of either 'http' or 'https'
63
+
> [!IMPORTANT]
64
+
> The rendered URL must use a scheme of either 'http' or 'https'
66
65
67
66
#### Template Variables
68
67
The following variables are available in the template:
69
68
70
69
- `.Environment`- string holding the environment name (i.e. environment branch name) for the group of Applications the URL is being generated for.
71
-
- `.ArgoCDCommitStatus`- holds the whole [CR](../../crd-specs#argocdcommitstatus) in its current state
70
+
- `.ArgoCDCommitStatus`- holds the whole [CR](../crd-specs.md#argocdcommitstatus) in its current state
72
71
73
72
#### Template Options
74
73
Template options can be configured for how missing variables are handled.
@@ -130,9 +129,7 @@ To enable multi-cluster support, you need to configure two components:
130
129
- Create a secret with key `kubeconfig` containing a standard `~/.kube/config` file as its value and label `sigs.k8s.io/multicluster-runtime-kubeconfig: "true"`
131
130
- The secret must be created in the same namespace where gitops-promoter runs
132
131
- The controller uses the `current context` from the kubeconfig to determine which cluster to use
133
-
134
-
!!! note
135
-
Remove any additional clusters from the `kubeconfig` as they will be ignored
132
+
- Remove any additional clusters from the `kubeconfig` as they will be ignored
136
133
137
134
#### RBAC Configuration
138
135
- Create a ClusterRole and binding in the external cluster for the service account associated with the kubeconfig
This Secret will need to be installed to the same namespace that you plan on creating PromotionStrategy resources in.
89
+
> [!NOTE]
90
+
> This Secret will need to be installed to the same namespace that you plan on creating PromotionStrategy resources in.
93
91
94
92
We also need a GitRepository and ScmProvider, which is are custom resources that represents a git repository and a provider.
95
93
Here is an example of both resources:
@@ -118,10 +116,9 @@ spec:
118
116
name: <your-scmprovider-name>
119
117
```
120
118
121
-
!!! note
122
-
123
-
The GitRepository and ScmProvider also need to be installed to the same namespace that you plan on creating PromotionStrategy
124
-
resources in, and it also needs to be in the same namespace of the secret it references.
119
+
> [!NOTE]
120
+
> The GitRepository and ScmProvider also need to be installed to the same namespace that you plan on creating PromotionStrategy
121
+
> resources in, and it also needs to be in the same namespace of the secret it references.
125
122
126
123
## GitLab Configuration
127
124
@@ -217,9 +214,8 @@ spec:
217
214
name: <your-scmprovider-name> # The secret that contains the GitLab Access Token
218
215
```
219
216
220
-
!!! note
221
-
222
-
The GitRepository and ScmProvider also need to be installed to the same namespace that you plan on creating PromotionStrategy resources in, and it also needs to be in the same namespace of the secret it references.
217
+
> [!NOTE]
218
+
> The GitRepository and ScmProvider also need to be installed to the same namespace that you plan on creating PromotionStrategy resources in, and it also needs to be in the same namespace of the secret it references.
223
219
224
220
225
221
## Promotion Strategy
@@ -244,23 +240,20 @@ spec:
244
240
name: <git-repository-ref-name> # The name of the GitRepository resource
245
241
```
246
242
247
-
!!! important
248
-
249
-
Each `branch` configured here is the branch that GitOps Promoter will merge into. Your [hydrator](index.md#prerequisites)
250
-
configuration must hydrate to these branch names, but **suffixed with `-next`**. This convention is hard-coded in
251
-
GitOps Promoter.
252
-
253
-
For an example of how to configure the Argo CD Source Hydrator, see the [Argo CD tutorial](tutorial-argocd-apps.md#deploy-an-application-for-3-environments).
254
-
(Note the difference between the `syncSource` and the `hydrateTo` fields.)
255
-
256
-
!!! note
257
-
258
-
Notice that the branches are prefixed with `environment/`. This is a convention that we recommend you follow.
243
+
> [!IMPORTANT]
244
+
> Each `branch` configured here is the branch that GitOps Promoter will merge into. Your [hydrator](index.md#prerequisites)
245
+
> configuration must hydrate to these branch names, but **suffixed with `-next`**. This convention is hard-coded in
246
+
> GitOps Promoter.
247
+
>
248
+
> For an example of how to configure the Argo CD Source Hydrator, see the [Argo CD tutorial](tutorial-argocd-apps.md#deploy-an-application-for-3-environments).
249
+
> (Note the difference between the `syncSource` and the `hydrateTo` fields.)
259
250
260
-
!!! note
251
+
> [!NOTE]
252
+
> Notice that the branches are prefixed with `environment/`. This is a convention that we recommend you follow.
261
253
262
-
The `autoMerge` field is optional and defaults to `true`. We set it to `false` here because we do not have any
263
-
CommitStatus checks configured. With these all set to `false` we will have to manually merge the PRs.
254
+
> [!NOTE]
255
+
> The `autoMerge` field is optional and defaults to `true`. We set it to `false` here because we do not have any
256
+
> CommitStatus checks configured. With these all set to `false` we will have to manually merge the PRs.
Copy file name to clipboardExpand all lines: docs/tutorial-argocd-apps.md
+24-31Lines changed: 24 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,20 +19,18 @@ To complete this tutorial, you will need the following:
19
19
*[A GitHub Account](https://github.com/)
20
20
*[Git](https://git-scm.com/)
21
21
22
-
!!! note
23
-
24
-
GitOps Promoter provides several opt-in Argo CD integrations that improve the user experience. Check out the
25
-
[Argo CD Integrations](./argocd-integrations.md) page for more information.
22
+
> [!NOTE]
23
+
> GitOps Promoter provides several opt-in Argo CD integrations that improve the user experience. Check out the
24
+
> [Argo CD Integrations](./argocd-integrations.md) page for more information.
26
25
27
26
## Set up the test cluster
28
27
29
28
### Create the cluster
30
29
31
30
If you don't have a test cluster yet, create one. With kind, simply run `kind create cluster`
32
31
33
-
!!! tip "Alternatively"
34
-
35
-
You can name the cluster with `kind create cluster --name promoter`
32
+
> [!TIP]
33
+
> You can name the cluster with `kind create cluster --name promoter`
36
34
37
35
Confirm that your access works with `kubectl get nodes`. Nodes should have a name starting with the name of your cluster (per example: `promoter-control-plane`)
38
36
@@ -71,9 +69,8 @@ Connect with this password for the `admin` user.
You may want to run the command twice to deploy the controller configuration after the CRDs were deployed.
72
+
> [!NOTE]
73
+
> You may want to run the command twice to deploy the controller configuration after the CRDs were deployed.
77
74
78
75
## Set up a sample repository
79
76
@@ -110,17 +107,16 @@ However, we are running the workload locally and the webhook is not required for
110
107
111
108
If you want to set up the webhook, read [Getting started](./getting-started.md) and try to use [https://smee.io/](https://smee.io/).
112
109
113
-
!!! tip "Alternatively"
114
-
115
-
You can adjust the setting down to something like 15 or 30 seconds.
116
-
117
-
See the [default config](https://github.com/argoproj-labs/gitops-promoter/blob/65d5905c51acac5d1caf3af01ceb0747795207e5/config/config/controllerconfiguration.yaml#L14-L17) for the config location.
> You can adjust the setting down to something like 15 or 30 seconds.
112
+
>
113
+
> See the [default config](https://github.com/argoproj-labs/gitops-promoter/blob/65d5905c51acac5d1caf3af01ceb0747795207e5/config/config/controllerconfiguration.yaml#L14-L17) for the config location.
@@ -216,10 +212,9 @@ If you go to the Argo CD UI, in the applications, you should now see the "SOURCE
216
212
217
213
It should have the message "from HEAD (...) to environment/development-next (...)"
218
214
219
-
!!! important
220
-
221
-
The Application will have an error under "APP CONDITIONS" that "app path does not exist." That's because the
222
-
Promoter has not yet moved the hydrated manifests to the syncSource branches. That's the next step.
215
+
> [!IMPORTANT]
216
+
> The Application will have an error under "APP CONDITIONS" that "app path does not exist." That's because the
217
+
> Promoter has not yet moved the hydrated manifests to the syncSource branches. That's the next step.
223
218
224
219
This means three things incase of a change in the main branch:
225
220
@@ -322,16 +317,14 @@ Here, we implement a simple strategy:
322
317
2. Auto-merge on staging (if development is successful)
323
318
3. Manual merge on production
324
319
325
-
!!! note
326
-
327
-
You should see 2 PRs getting merged automatically and 1 PR to merge manually for the production. That is normal: we branched from the main branch wich is DRY. The promoter detects change and do what's needed to sync the two branches.
320
+
> [!NOTE]
321
+
> You should see 2 PRs getting merged automatically and 1 PR to merge manually for the production. That is normal: we branched from the main branch wich is DRY. The promoter detects change and do what's needed to sync the two branches.
328
322
329
323
## Play with your environment
330
324
331
325
We deployed the application "helm-guestbook" from the example repository.
332
326
333
327
Try editing the main branch: number of replicas, helm templates... And see the PRs getting promoted from development to staging, then wait for your approval for the prod.
334
328
335
-
!!! note
336
-
337
-
Since we are not using the webhook. It can takes 5 to 15 minutes to complete the cycle unless you've set the requeue duration to a lower value.
329
+
> [!NOTE]
330
+
> Since we are not using the webhook. It can takes 5 to 15 minutes to complete the cycle unless you've set the requeue duration to a lower value.
0 commit comments