The existing rule for validating dependency import-values worked well for either of these two cases:
**1. Importing exports**
```yaml
dependencies:
- name: dep1
version: 0.14.1
repository: oci://myrepo
import-values:
- data
```
**2. Importing child values into the parent**
```yaml
dependencies:
- name: dep1
version: 0.14.1
repository: oci://myrepo
import-values:
- child: default.data
parent: myimports
```
However, it failed on the following valid usecase:
```yaml
dependencies:
- name: dep1
version: 0.14.1
repository: oci://myrepo
import-values:
- data
- child: default.data
parent: myimports
```
Giving the following error:
```
dependencies.0.import-values.1: '{'parent': 'myimports', 'child': 'default.data'}' is not a str.
dependencies.0.import-values.0 : 'data' is not a map
```
This is because the Yamale is validating on a list of strings *or* a list of `import-value`, where a list containing both is also valid.
This commit changes the rule to allow both methods to be in the `import-values` list.
Signed-off-by: Ben Lavery-Griffiths <ben@lavery-griffiths.com>
* [WIP] Factor out testing code from charts
* Minor various fixes
Please enter the commit message for your changes. Lines starting
* Start readme
* Update readme and add GKE example
* Add CircleCI job for ShellCheck
* Install Helm and kubectl after other tools
Also: Hard-code version for kubectl.
* Fix readme
* Update maintainer validation
'chartlib::validate_maintainers' should not log an error if there's no maintainers
section. This is already covered by the schema validation.
* Add random suffix to namespaces
* Improve container logs output
* Improve logging
* Add --cleanup flag to 'helm test'
* Improve namespace cleanup
* Improve logging
* Add random suffixes to releases
* Update logging and Docker image version
* Update GKE example
* Fix Bash array declarations
* Remove user from Docker image
* Add summary
* Use kubectl rollout status for deployments
* Add some more fixes
* Build dependencies before linting
* Fix array initialization
* Increase sleep time for namespace polling
* Add missing colon
* Create v1.0.0
* Update Helm to v2.9.1
* Add missing local keywords
* Bump image version
* Update copyright headers