Skip to content

Commit 934bd00

Browse files
mteodorHarness
authored andcommitted
fix: [CDS-115446]: Fix application set creation when using helm source in template. (#1305)
* 43d586 add changelog * 34287c update subcategory, remove computed * 439132 fix appset list, ang git generator, add import example * d4d017 update app docs * c6e8a7 update appset docs * 07a0bb fix: [CDS-115446]: Fix problem with creating application set, remove perpetual diff
1 parent 3bb593c commit 934bd00

File tree

9 files changed

+1271
-390
lines changed

9 files changed

+1271
-390
lines changed

.changelog/1305.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
```release-note:fix
2+
resource: platform_gitops_applicationset: Fix list generator serialization. Elements are now properly included (base64-encoded) in create/update requests instead of sending an empty list.
3+
Added missing fields for helm source in schema used for applicationset, this prevented creating applicaitonset with helm source configured.
4+
Fixed issue with perpetual diff for cluster generator.
5+
Fixed issue with list generator not being properly propageted to appset k8s manifest ( element array wasnt actually passed )
6+
Fixed issue with files and directories field for git generator, similar it wasn propagated to appsets k8s manifest.
7+
Added import docs for applicationset.
8+
Added fields for app and updated docs.
9+
```

docs/resources/platform_gitops_applications.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Optional:
141141

142142
- `destination` (Block List) Information about the GitOps application's destination. (see [below for nested schema](#nestedblock--application--spec--destination))
143143
- `project` (String) The ArgoCD project name corresponding to this GitOps application. Value must match mappings of ArgoCD projects to harness project.
144+
- `revision_history_limit` (String) Revision history limit for the application.
144145
- `source` (Block List, Max: 1) Contains all information about the source of the GitOps application. (see [below for nested schema](#nestedblock--application--spec--source))
145146
- `sources` (Block List) List of sources for the GitOps application. Multi Source support (see [below for nested schema](#nestedblock--application--spec--sources))
146147
- `sync_policy` (Block List, Max: 1) Controls when a sync will be performed in response to updates in git. (see [below for nested schema](#nestedblock--application--spec--sync_policy))
@@ -316,9 +317,10 @@ Optional:
316317

317318
- `chart` (String) Helm chart name, and must be specified for the GitOps applications sourced from a helm repo.
318319
- `directory` (Block List) Options for applications of type plain YAML or Jsonnet. (see [below for nested schema](#nestedblock--application--spec--sources--directory))
319-
- `helm` (Block List) Holds helm specific options. (see [below for nested schema](#nestedblock--application--spec--sources--helm))
320+
- `helm` (Block List, Max: 1) Helm specific options. (see [below for nested schema](#nestedblock--application--spec--sources--helm))
320321
- `ksonnet` (Block List) Ksonnet specific options. (see [below for nested schema](#nestedblock--application--spec--sources--ksonnet))
321322
- `kustomize` (Block List) Options specific to a GitOps application source specific to Kustomize. (see [below for nested schema](#nestedblock--application--spec--sources--kustomize))
323+
- `name` (String) Name is used to refer to a source and is displayed in the UI. It is used in multi-source Applications.
322324
- `path` (String) Directory path within the git repository, and is only valid for the GitOps applications sourced from git.
323325
- `plugin` (Block List) Options specific to config management plugins. (see [below for nested schema](#nestedblock--application--spec--sources--plugin))
324326
- `ref` (String) Reference name to be used in other source spec, used for multi-source applications.
@@ -369,34 +371,35 @@ Optional:
369371

370372
Optional:
371373

372-
- `file_parameters` (Block List) File parameters to the helm template. (see [below for nested schema](#nestedblock--application--spec--sources--helm--file_parameters))
373-
- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when value_files do not exist locally.
374-
- `parameters` (Block List) List of helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--application--spec--sources--helm--parameters))
375-
- `pass_credentials` (Boolean) Indicates if to pass credentials to all domains (helm's --pass-credentials)
376-
- `release_name` (String) Helm release name to use. If omitted it will use the GitOps application name.
377-
- `skip_crds` (Boolean) Indicates if to skip CRDs during helm template. Corresponds to helm --skip-crds
374+
- `file_parameters` (Block List) File parameters for the helm template. (see [below for nested schema](#nestedblock--application--spec--sources--helm--file_parameters))
375+
- `ignore_missing_value_files` (Boolean) Prevents 'helm template' from failing when `value_files` do not exist locally by not appending them to 'helm template --values'.
376+
- `parameters` (Block List) Helm parameters which are passed to the helm template command upon manifest generation. (see [below for nested schema](#nestedblock--application--spec--sources--helm--parameters))
377+
- `pass_credentials` (Boolean) If true then adds '--pass-credentials' to Helm commands to pass credentials to all domains.
378+
- `release_name` (String) Helm release name. If omitted it will use the application name.
379+
- `skip_crds` (Boolean) Whether to skip custom resource definition installation step (Helm's [--skip-crds](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)).
378380
- `skip_schema_validation` (Boolean) Indicates if to skip schema validation during helm template. Corresponds to helm --skip-schema-validation
379381
- `skip_tests` (Boolean) Indicates if to skip tests during helm template. Corresponds to helm --skip-tests
380-
- `value_files` (List of String) List of helm value files to use when generating a template.
381-
- `values` (String) Helm values to be passed to helm template, typically defined as a block.
382-
- `version` (String) Helm version to use for templating (either "2" or "3")
382+
- `value_files` (List of String) List of Helm value files to use when generating a template.
383+
- `values` (String) Helm values to be passed to 'helm template', typically defined as a block.
384+
- `values_object` (Map of String) Helm values to be passed to 'helm template', typically defined as a block.
385+
- `version` (String) Helm version to use for templating (either "2" or "3").
383386

384387
<a id="nestedblock--application--spec--sources--helm--file_parameters"></a>
385388
### Nested Schema for `application.spec.sources.helm.file_parameters`
386389

387-
Optional:
390+
Required:
388391

389-
- `name` (String) Name of the helm parameter.
390-
- `path` (String) Path to the file containing the values of the helm parameter.
392+
- `name` (String) Name of the Helm parameter.
393+
- `path` (String) Path to the file containing the values for the Helm parameter.
391394

392395

393396
<a id="nestedblock--application--spec--sources--helm--parameters"></a>
394397
### Nested Schema for `application.spec.sources.helm.parameters`
395398

396399
Optional:
397400

398-
- `force_string` (Boolean) Indicates if helm should interpret booleans and numbers as strings.
399-
- `name` (String) Name of the helm parameter.
401+
- `force_string` (Boolean) Determines whether to tell Helm to interpret booleans and numbers as strings.
402+
- `name` (String) Name of the Helm parameter.
400403
- `value` (String) Value of the Helm parameter.
401404

402405

@@ -494,8 +497,6 @@ Optional:
494497

495498
Import is supported using the following syntax:
496499

497-
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
498-
499500
```shell
500501
# Import a Project level Gitops Application
501502
terraform import harness_platform_gitops_applications.example <organization_id>/<project_id>/<agent_id>/<app_name>

0 commit comments

Comments
 (0)