Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tridenctl: generate custom yaml - duplicate mapping key "type" #671

Closed
george-angel opened this issue Nov 5, 2021 · 1 comment
Closed

Comments

@george-angel
Copy link

george-angel commented Nov 5, 2021

Trident: 21.10.0

Using:

tridentctl install --generate-custom-yaml

Results in a duplicate declaration of type: array in tridentmirrorrelationships.trident.netapp.io CRD:

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: tridentmirrorrelationships.trident.netapp.io
spec:
  group: trident.netapp.io
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                state:
                  type: string
                  enum:
                  - ""
                  - promoted
                  - established
                  - reestablished
                volumeMappings:
                  type: array
                  items:
                    type: object
                    properties:
                      latestSnapshotHandle:
                        type: string
                      localPVCName:
                        type: string
                      remoteVolumeHandle:
                        type: string
                    required:
                    - localPVCName
                  minItems: 1
                  maxItems: 1
                  type: array
...

This is a problem if you use Kustomize (https://kustomize.io/):

$ kustomize build cluster/
Error: map[string]interface {}(nil): yaml: unmarshal errors:
  line 40: mapping key "type" already defined at line 26

Apparently duplicate keys aren't valid per yaml 1.2 spec: kubernetes-sigs/kustomize#4096 (comment)

george-angel added a commit to utilitywarehouse/system-manifests that referenced this issue Nov 5, 2021
@gnarl gnarl added the tracked label Jan 27, 2022
@gnarl
Copy link
Contributor

gnarl commented Mar 10, 2022

This issue was fixed with commit a357c9e which will be included in the 22.04 release.

@gnarl gnarl closed this as completed Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants