running gen in docker

This commit is contained in:
Cory O'Daniel
2019-03-26 11:44:37 -07:00
parent 6c8d948335
commit 37a0e2b5a6
3 changed files with 5 additions and 3 deletions

View File

@@ -165,6 +165,7 @@ local kp =
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
And here's the [build.sh](build.sh) script (which uses `vendor/` to render all manifests in a json structure of `{filename: manifest-content}`):

View File

@@ -25,6 +25,7 @@ local kp =
{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } +
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
```
## Prometheus rules

View File

@@ -15,14 +15,14 @@ local manifests =
{ ['prometheus-adapter-' + name]: kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) } +
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) };
local kustomizationResourceFile(name) = "./manifests/" + name + ".yaml";
local kustomizationResourceFile(name) = './manifests/' + name + '.yaml';
local kustomization = {
apiVersion: 'kustomize.config.k8s.io/v1beta1',
kind: 'Kustomization',
resources: std.map(kustomizationResourceFile, std.objectFields(manifests))
resources: std.map(kustomizationResourceFile, std.objectFields(manifests)),
};
manifests {
"../kustomization": kustomization,
'../kustomization': kustomization,
}