Skip to content

How to generate multiple resources of same type? #418

Answered by philipsd6
philipsd6 asked this question in Q&A
Discussion options

You must be logged in to vote

Never mind, I guess I solved my problem after finding #369

Now I'm doing this and it works for me:

#PersistentVolumeClaim: corev1.#PersistentVolumeClaim & {
    #config:    #Config
    #pvcName:   string
    #spec:      corev1.#PersistentVolumeClaimSpec
    apiVersion: "core/v1"
    kind:       "PersistentVolumeClaim"
    metadata: {name: #pvcName} & {
        for k, v in #config.metadata if k != "name" {
            "\(k)": v
        }
    }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by philipsd6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant