Open ant31 opened 7 years ago
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} } ]
https://github.com/heptio/kube.libsonnet/
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.