Enable complex values in values from target path

What is done

Enable valuesFrom:TargetPath to target complex object instead of plain string for the supported types

  • Configmaps
  • Secrets
  • ExternalSecrets

Tests are coded to show these features

  • Nominal cases
  • Wrong inputs cases
  • Helm parser specific tests

Reference

Close #32 (closed)

Tests

  • CI Tests (see It("Creates capd SylvaWorkloadCluster resources with valuesFrom, ensures the related Sylva unit release exists,  and check that template values are correctly used"))

    • Tested valuesFrom type: ConfigMap, Secret and ExternalSecret
    • Test use case targetPath: "a.b"
  • Deployment on local Rocket with non trivial targetPath:

      valuesFrom:
      - type: ConfigMap
        name: test-cm
        targetPath: security.os_images

    where

    ---
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: test-cm
      namespace: teama
    data:
      values.yaml: |
        skip_signing_check: true

Details

Copied valuesFrom

  • The present operator is copying valuesFrom to the SylvaUnitsRelease namespace. In order to simplify the code, the source valuesKey is not copied, the valuesKey of the copied valuesFrom is the default vlauesKey.
  • Accordingly, the labels of the copied valuesFrom is only set to the default operator labels.
Edited by vladimir braquet

Merge request reports

Loading