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

Generators, create resources without templates #153

Open
ant31 opened this issue Mar 25, 2017 · 1 comment
Open

Generators, create resources without templates #153

ant31 opened this issue Mar 25, 2017 · 1 comment

Comments

@ant31
Copy link
Member

ant31 commented Mar 25, 2017

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}
}
]
@ant31
Copy link
Member Author

ant31 commented Mar 28, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant