Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions charts/argocd-understack/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@ Usage in source path:
{{- end -}}
{{- end }}

{{/*
Render a labels block for ArgoCD Application resources from .Values.appLabels.
Produces nothing when appLabels is empty or unset.

Usage:
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
*/}}
{{- define "understack.appLabelsBlock" -}}
{{- with .Values.appLabels }}
labels:
{{- toYaml . | nindent 2 }}
{{- end -}}
{{- end }}

{{/*
Check if a component is enabled by walking the configuration hierarchy.
Supports both "global" and "site" scopes with appropriate kill switches.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: argo-events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: argo-events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: argo
Expand Down
1 change: 1 addition & 0 deletions charts/argocd-understack/templates/application-cdn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: understack-cdn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
# cert-manager is critical for a number of other charts so sync
# it right after CRDs and before the default 0 wave
argocd.argoproj.io/sync-wave: "-1"
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: cert-manager
Expand Down
1 change: 1 addition & 0 deletions charts/argocd-understack/templates/application-chrony.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: openstack
Expand Down
1 change: 1 addition & 0 deletions charts/argocd-understack/templates/application-cilium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: cilium
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: cert-manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: cnpg-system
Expand Down
1 change: 1 addition & 0 deletions charts/argocd-understack/templates/application-dex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: dex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: envoy-gateway
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: envoy-gateway
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: kube-system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: external-dns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: external-secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: nautobot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: ingress-nginx
Expand Down
1 change: 1 addition & 0 deletions charts/argocd-understack/templates/application-karma.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
name: {{ printf "%s-%s" $.Release.Name "karma" }}
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: monitoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
# we always want CRDs to be at -2 sync wave
argocd.argoproj.io/sync-wave: "-2"
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: mariadb-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: mariadb-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
name: {{ printf "%s-%s" $.Release.Name "monitoring" }}
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: monitoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: nautobot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: nautobot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: nautobotop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: openebs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: monitoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
argocd.argoproj.io/sync-wave: {{ quote . }}
{{- end }}
*/}}
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: {{ $.Values.site.openstack.namespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: orc-system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
argocd.argoproj.io/sync-wave: {{ quote . }}
{{- end }}
*/}}
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: {{ .Values.site.openstack.namespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: opentelemetry-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
name: {{ printf "%s-%s" $.Release.Name "openvswitch" }}
finalizers:
- resources-finalizer.argocd.argoproj.io
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: {{ $.Values.site.openstack.namespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: otel-collector
Expand Down
1 change: 1 addition & 0 deletions charts/argocd-understack/templates/application-ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
name: {{ printf "%s-%s" $.Release.Name "ovn" }}
finalizers:
- resources-finalizer.argocd.argoproj.io
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: {{ $.Values.site.openstack.namespace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
# we always want CRDs to be at -2 sync wave
argocd.argoproj.io/sync-wave: "-2"
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: monitoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: rabbitmq-system
Expand Down
1 change: 1 addition & 0 deletions charts/argocd-understack/templates/application-rook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: rook-ceph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: kube-system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: monitoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: undersync
Expand Down
4 changes: 4 additions & 0 deletions charts/argocd-understack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ deploy_ref: HEAD
# @default -- "" (no prefix, just Release.Name)
deploy_path_prefix:

# -- Additional labels to apply to all generated ArgoCD Application resources.
# @default -- {}
appLabels: {}

# -- This block is for setting up the UnderStack global specific ArgoCD Applications
global:
# -- Enable/disable deploying the global specific applications
Expand Down
27 changes: 27 additions & 0 deletions docs/deploy-guide/deploy-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,33 @@ You can verify all required files exist with:
understackctl deploy check my-site
```

### Top-level Chart Settings

In addition to component sections, `deploy.yaml` supports top-level settings that apply across all generated ArgoCD Applications:

| Key | Description |
|-----|-------------|
| `understack_url` | UnderStack source repository URL |
| `understack_ref` | Git ref (branch, tag, or commit) to deploy from |
| `deploy_url` | Your deployment repository URL |
| `deploy_ref` | Git ref for the deployment repository |
| `deploy_path_prefix` | Optional path prefix within the deploy repo |
| `cluster_server` | Target cluster API server URL |
| `appLabels` | Additional labels applied to every ArgoCD Application |

`appLabels` is useful for identifying which cluster or partition an Application belongs to when managing multiple clusters through a single ArgoCD instance:

```yaml title="my-site/deploy.yaml"
understack_url: https://github.com/rackerlabs/understack.git
deploy_url: git@github.com:my-org/my-deploy.git
appLabels:
understack.rackspace.com/cluster: my-site
understack.rackspace.com/partition: us-east
site:
enabled: true
# ...
```

### Managing Components

To enable or disable components, edit the component sections in `deploy.yaml`:
Expand Down
Loading