Skip to content
Open
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
4 changes: 3 additions & 1 deletion .github/workflows/jsonschema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ jobs:

- name: Verify ClusterGroup values.schema.json
run: |
check-jsonschema --schemafile ./values.schema.json "values.yaml"
check-jsonschema --schemafile ./values.schema.json \
"values.yaml" \
"tests/fixtures/values-cluster-group-schema.yaml"
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A Helm chart to create per-clustergroup ArgoCD applications and any
keywords:
- pattern
name: clustergroup
version: 0.9.49
version: 0.9.50
home: https://github.com/validatedpatterns/clustergroup-chart
maintainers:
- name: Validated Patterns Team
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# clustergroup

![Version: 0.9.49](https://img.shields.io/badge/Version-0.9.49-informational?style=flat-square)
![Version: 0.9.50](https://img.shields.io/badge/Version-0.9.50-informational?style=flat-square)

A Helm chart to create per-clustergroup ArgoCD applications and any required namespaces or subscriptions.

This chart is used to set up the basic building blocks in [Validated Patterns](https://validatedpatterns.io)

### Notable changes

* v0.9.50: Ensure schema matches what we template. Add missing elements and correct some entries.
* v0.9.49: Boolean Templates in override values now also render correctly
* v0.9.48: Templates in override values now render
* v0.9.45: Default value of `resourceTrackingMethod` is now `annotation`
Expand Down
1 change: 1 addition & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This chart is used to set up the basic building blocks in [Validated Patterns](h

### Notable changes

* v0.9.50: Ensure schema matches what we template. Add missing elements and correct some entries.
* v0.9.49: Boolean Templates in override values now also render correctly
* v0.9.48: Templates in override values now render
* v0.9.45: Default value of `resourceTrackingMethod` is now `annotation`
Expand Down
28 changes: 28 additions & 0 deletions tests/application_target_cluster_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
suite: Test clusterGroup.targetCluster on Argo CD Applications
templates:
- templates/plumbing/applications.yaml
release:
name: release-test
tests:
- it: should set spec.destination.name from clusterGroup.targetCluster
set:
global:
repoURL: https://github.com/validatedpatterns/multicloud-gitops
multiSourceRepoUrl: https://charts.validatedpatterns.io
clusterGroup:
name: example
targetCluster: my-remote-cluster
namespaces: []
applications:
acm:
name: acm
namespace: open-cluster-management
project: hub
chart: acm
chartVersion: 0.1.*
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.destination.name
value: my-remote-cluster
31 changes: 31 additions & 0 deletions tests/fixtures/values-cluster-group-schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Minimal values exercised by check-jsonschema in CI to keep clusterGroup fields
# used by templates aligned with values.schema.json.
global:
options:
syncPolicy: Automatic
installPlanApproval: Automatic
useCSV: true
multiSourceRepoUrl: https://charts.validatedpatterns.io

clusterGroup:
name: schema-fixture
targetCluster: spoke-cluster-1
namespaces: []
sharedValueFiles:
- values-{{ $.Values.clusterGroup.name }}.yaml
applications:
schema-fixture-app:
name: schema-fixture-app
namespace: fixture-ns
project: default
path: charts/fixture
overrides:
- name: plain-override
value: plain
- name: tpl-override
value: "{{ .Values.global.multiSourceRepoUrl }}"
forceString: true
syncPolicy: manual
fileParameters:
- name: some-values
path: secrets://config/values.yaml
70 changes: 66 additions & 4 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@
"readOnly": true,
"description": "URL of the pattern's git repository, it is set automatically by the pattern's operator"
},
"multiSourceRepoUrl": {
"type": "string",
"description": "Default Helm repository URL for multisource Argo CD Applications when an application entry does not set repoURL. Passed as a Helm parameter and used by templates under global.multiSourceRepoUrl."
},
"hubClusterDomain": {
"type": "string",
"readOnly": true,
Expand Down Expand Up @@ -516,6 +520,17 @@
"disabled": {
"type": "boolean",
"description": "Whether to disable namespace creation. If set to true, the namespace will be skipped."
},
"operatorGroup": {
"type": "boolean",
"description": "When false, no OperatorGroup is created for this namespace map entry."
},
"targetNamespaces": {
"type": "array",
"description": "OperatorGroup spec.targetNamespaces entries; when set and non-empty, overrides the default single-namespace target.",
"items": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -613,19 +628,66 @@
"description": "List of extra fields that will be passed to ArgoCD."
},
"overrides": {
"type": "object"
"type": "array",
"description": "Extra Helm parameters for this application; rendered under spec.source.helm.parameters or spec.sources[1].helm.parameters.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string",
"description": "Parameter value; may contain Helm tpl expressions evaluated with the chart root context."
},
"forceString": {
"type": "boolean",
"description": "When true, sets forceString on the Argo CD Application helm parameter."
}
},
"required": [
"name",
"value"
]
}
},
"fileParameters": {
"type": "array",
"description": "FileParameters are file parameters to the helm template"
"description": "FileParameters are file parameters to the helm template",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"name",
"path"
]
}
},
"ignoreDifferences": {
"type": "array",
"description": "IgnoreDifferences is a list of resources and their fields which should be ignored during comparison"
},
"syncPolicy": {
"type": "object",
"description": "SyncPolicy controls when and how a sync will be performed"
"anyOf": [
{
"type": "string",
"description": "When set to Manual (any case), Argo CD syncPolicy is omitted for this application. Automatic uses the chart default. Other strings follow the same lowercasing rules in templates."
},
{
"type": "object",
"description": "Passed through to the Application spec.syncPolicy field as JSON."
}
],
"description": "SyncPolicy controls when and how a sync will be performed; may be a string (e.g. Manual) or an object merged into the Application."
},
"namespace": {
"type": "string",
Expand Down