Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Generators, create resources without templates #153

@ant31

Description

@ant31

Most of the time resources are identical, only few fields are modified.
Kpm can help to generate them without having to add any template in the package it self.

app_ports:: [8080, 6000]
resources: [ 
 {
    file: my-webapp-svc.yaml 
    type: svc 
    generator: {
        ports: $.app_ports
        type: nodePort
     }
  },
 { 
    file: my-webapp-deploy.yaml
    type: deployment
    generator: { 
       pod: [ 
            {image: container1, ports: $.app_ports},
            {image: sidecar1}
            ]
 },
 {
  file : my-webapp-ingress.yaml
  type: ingress, 
  generator: 
    { domains: [app.kubespray.com]
      paths: {path: "/", port: 8080}
}
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions