-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4fa0cc
commit 02a64c4
Showing
29 changed files
with
862 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: mkdocs | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Application Selection | ||
|
||
Rendering the manifests generated by all applications in the repository on each pull request can be slow. Limiting the number of applications rendered can speed up the rendering process significantly. By default, `argocd-diff-preview` will render all applications in the repository. | ||
|
||
Here are three ways to limit which applications are rendered: | ||
|
||
## Label Selectors | ||
|
||
Run the tool with the `--selector` option to filter applications based on labels. The option supports `=`, `==`, and `!=`. | ||
|
||
*Example:* | ||
```bash | ||
argocd-diff-preview --selector "team=a" | ||
``` | ||
This command :arrow_up: will target the following application :arrow_down: and ignore all applications that do not have the label `team: a`. | ||
|
||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: my-app | ||
labels: | ||
team: a | ||
spec: | ||
... | ||
``` | ||
## Annotations | ||
You can exclude specific applications from rendering by adding the annotation `argocd-diff-preview/ignore: "true"` to their manifest. This is useful for skipping applications that don’t require a diff. | ||
|
||
*Example:* | ||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: my-app | ||
annotations: | ||
argocd-diff-preview/ignore: "true" | ||
spec: | ||
... | ||
``` | ||
|
||
## File Regex | ||
|
||
Alternatively, use the `--file-regex` option to limit rendering to manifests whose file paths match a regular expression. This is helpful when rendering changes from specific teams or directories. | ||
|
||
*Example:* | ||
|
||
If someone in your organization from *Team A* changes to one of their applications, the tool can be run with: | ||
```bash | ||
argocd-diff-preview --file-regex="/Team-A/" | ||
``` | ||
This ensures only applications in folders matching `*/Team-A/*` are rendered. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
.md-header__title { | ||
display: flex; | ||
} | ||
|
||
.dropdown-caret { | ||
display: inline-block !important; | ||
position: absolute; | ||
right: 4px; | ||
} | ||
|
||
.fa .fa-caret-down { | ||
display: none !important; | ||
} | ||
|
||
.rst-other-versions { | ||
text-align: right; | ||
} | ||
|
||
.rst-other-versions>dl, | ||
.rst-other-versions dt, | ||
.rst-other-versions small { | ||
display: none; | ||
} | ||
|
||
.rst-other-versions>dl:first-child { | ||
display: flex !important; | ||
flex-direction: column; | ||
line-height: 0px !important; | ||
} | ||
|
||
.rst-versions.shift-up .rst-other-versions { | ||
display: flex !important; | ||
} | ||
|
||
.rst-versions .rst-other-versions { | ||
display: none; | ||
} | ||
|
||
/* Version Warning */ | ||
div[data-md-component=announce] { | ||
background-color: rgb(248, 243, 236); | ||
position: sticky; | ||
top: 0; | ||
z-index: 2; | ||
} | ||
|
||
div[data-md-component=announce]>div#announce-msg { | ||
color: var(--md-code-hl-number-color); | ||
font-size: .8rem; | ||
text-align: center; | ||
margin: 15px; | ||
} | ||
|
||
div[data-md-component=announce]>div#announce-msg>a { | ||
color: var(--md-typeset-a-color); | ||
text-decoration: underline; | ||
} | ||
|
||
/* from https://assets.readthedocs.org/static/css/badge_only.css, | ||
most styles have to be overridden here */ | ||
.rst-versions { | ||
position: relative !important; | ||
bottom: 0; | ||
left: 0; | ||
width: 100px !important; | ||
background: hsla(173, 100%, 24%, 1) !important; | ||
font-family: inherit !important; | ||
z-index: 0 !important; | ||
} | ||
|
||
.rst-versions a { | ||
color: #2980B9; | ||
text-decoration: none | ||
} | ||
|
||
.rst-versions .rst-badge-small { | ||
display: none | ||
} | ||
|
||
.rst-versions .rst-current-version { | ||
padding: 12px; | ||
background: hsla(173, 100%, 24%, 1) !important; | ||
display: block; | ||
text-align: right; | ||
font-size: 90%; | ||
cursor: pointer; | ||
color: white !important; | ||
*zoom: 1 | ||
} | ||
|
||
.rst-versions .rst-current-version:before, | ||
.rst-versions .rst-current-version:after { | ||
display: table; | ||
content: "" | ||
} | ||
|
||
.rst-versions .rst-current-version:after { | ||
clear: both | ||
} | ||
|
||
.rst-versions .rst-current-version .fa { | ||
color: #fcfcfc | ||
} | ||
|
||
.rst-versions .rst-current-version .fa-caret-down { | ||
display: none; | ||
} | ||
|
||
.rst-versions.shift-up .rst-other-versions { | ||
display: block | ||
} | ||
|
||
.rst-versions .rst-other-versions { | ||
font-size: 90%; | ||
padding: 12px; | ||
color: gray; | ||
display: none | ||
} | ||
|
||
.rst-versions .rst-other-versions hr { | ||
display: none !important; | ||
height: 0px !important; | ||
border: 0px; | ||
margin: 0px !important; | ||
padding: 0px; | ||
border-top: none !important; | ||
} | ||
|
||
.rst-versions .rst-other-versions dd { | ||
display: inline-block; | ||
margin: 0 | ||
} | ||
|
||
.rst-versions .rst-other-versions dd a { | ||
display: inline-block; | ||
padding: 1em 0em !important; | ||
color: #fcfcfc; | ||
font-size: .6rem !important; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
width: 80px; | ||
} | ||
|
||
.rst-versions .rst-other-versions dd a:hover { | ||
font-size: .7rem !important; | ||
font-weight: bold; | ||
} | ||
|
||
.rst-versions.rst-badge { | ||
display: block !important; | ||
width: 100px !important; | ||
bottom: 0px !important; | ||
right: 0px !important; | ||
left: auto; | ||
border: none; | ||
text-align: center !important; | ||
line-height: 0; | ||
} | ||
|
||
.rst-versions.rst-badge .icon-book { | ||
display: none; | ||
} | ||
|
||
.rst-versions.rst-badge .fa-book { | ||
display: none !important; | ||
} | ||
|
||
.rst-versions.rst-badge.shift-up .rst-current-version { | ||
text-align: left !important; | ||
} | ||
|
||
.rst-versions.rst-badge.shift-up .rst-current-version .fa-book { | ||
display: none !important; | ||
} | ||
|
||
.rst-versions.rst-badge.shift-up .rst-current-version .icon-book { | ||
display: none !important; | ||
} | ||
|
||
.rst-versions.rst-badge .rst-current-version { | ||
width: 70px !important; | ||
height: 2.4rem !important; | ||
line-height: 2.4rem !important; | ||
padding: 0px 5px !important; | ||
display: inline-block !important; | ||
font-size: .6rem !important; | ||
overflow: hidden !important; | ||
text-overflow: ellipsis !important; | ||
white-space: nowrap !important; | ||
text-align: left !important; | ||
} | ||
|
||
@media screen and (max-width: 768px) { | ||
.rst-versions { | ||
width: 85%; | ||
display: none | ||
} | ||
|
||
.rst-versions.shift { | ||
display: block | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Custom Argo CD Installation | ||
|
||
Argo CD is installed using a [Helm Chart](https://artifacthub.io/packages/helm/argo/argo-cd). You can specify the Chart version with the `--argocd-chart-version` option. It defaults to the latest version. | ||
|
||
You can modify the Argo CD Helm Chart installation by providing the tool with a `values.yaml` file and mounting it in the `argocd-config` folder within the container. Check out all the available values in the [Argo CD Helm Chart](https://artifacthub.io/packages/helm/argo/argo-cd). | ||
|
||
*Example:* | ||
|
||
Here we set `configs.cm."kustomize.buildOptions"` in the Chart. | ||
|
||
```yaml title=".github/workflows/generate-diff.yml" linenums="1" | ||
jobs: | ||
build: | ||
... | ||
steps: | ||
... | ||
- name: Set ArgoCD Custom Values | ||
run: | | ||
cat > values.yaml << "EOF" | ||
# set whatever helm values you want | ||
configs: | ||
cm: | ||
kustomize.buildOptions: --load-restrictor LoadRestrictionsNone --enable-helm | ||
EOF | ||
- name: Generate Diff | ||
run: | | ||
docker run \ | ||
--network=host \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v $(pwd)/main:/base-branch \ | ||
-v $(pwd)/pull-request:/target-branch \ | ||
-v $(pwd)/values.yaml:/argocd-config/values.yaml \ ⬅️ Mount values.yaml | ||
... | ||
``` | ||
# Argo CD Config Management Plugins (CMP) | ||
You can install any [Argo CD Config Management Plugin](https://argo-cd.readthedocs.io/en/stable/operator-manual/config-management-plugins/) that is supported through the [Argo CD Helm Chart](https://artifacthub.io/packages/helm/argo/argo-cd). However, there is no guarantee that the plugin will work with the tool, as this depends on the plugin and its specific implementation | ||
!!! important "Questions, issues, or suggestions" | ||
If you experience issues or have any questions, please open an issue in the repository! 🚀 |
Oops, something went wrong.