Skip to content

Commit

Permalink
use annotation tracking by default (#125)
Browse files Browse the repository at this point in the history
* use annotation tracking by default

Signed-off-by: Manabu McCloskey <[email protected]>
  • Loading branch information
nabuskey authored Jan 5, 2024
1 parent 0d25f39 commit 0d2c8fc
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,19 @@ apiVersion: kind.x-k8s.io/v1alpha4
```
Next, import it `./idpbuilder create --kindConfig <path to the config file>`

### Default manifests installed by idpbuilder

The default manifests for the core packages are available [here](pkg/controllers/localbuild/resources).
These are generated by scripts. If you want to make changes to them, see below.

#### ArgoCD

ArgoCD manifests are generated using a bash script available [here](./hack/argo-cd/generate-manifests.sh).
This script runs kustomize to modify the basic installation manifests provided by ArgoCD. Modifications include:

1. Prevent notification and dex pods from running. This is done to keep the number of pods running low by default.
2. Use the annotation tracking instead of the default label tracking. Annotation tracking allows you to avoid [problems caused by the label tracking method](https://argo-cd.readthedocs.io/en/stable/user-guide/resource_tracking/). In addition, this configuration is required when using Crossplane.


## Extending the IDP builder

Expand Down
11 changes: 11 additions & 0 deletions hack/argo-cd/argocd-cm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
data:
application.resourceTrackingMethod: annotation
resource.exclusions: |
- kinds:
- ProviderConfigUsage
apiGroups:
- "*"
2 changes: 1 addition & 1 deletion hack/argo-cd/generate-manifests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INSTALL_YAML="pkg/controllers/localbuild/resources/argo/install.yaml"

echo "# UCP ARGO INSTALL RESOURCES" > ${INSTALL_YAML}
echo "# This file is auto-generated with 'hack/argo-cd/generate-manifests.sh'." >> ${INSTALL_YAML}
echo "# This file is auto-generated with 'hack/argo-cd/generate-manifests.sh'" >> ${INSTALL_YAML}
kustomize build ./hack/argo-cd/ >> ${INSTALL_YAML}
1 change: 1 addition & 0 deletions hack/argo-cd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ resources:
patches:
- path: dex-server.yaml
- path: notifications-controller.yaml
- path: argocd-cm.yaml
7 changes: 7 additions & 0 deletions pkg/controllers/localbuild/resources/argo/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18851,6 +18851,13 @@ subjects:
namespace: argocd
---
apiVersion: v1
data:
application.resourceTrackingMethod: annotation
resource.exclusions: |
- kinds:
- ProviderConfigUsage
apiGroups:
- "*"
kind: ConfigMap
metadata:
labels:
Expand Down

0 comments on commit 0d2c8fc

Please sign in to comment.