Skip to content

Commit 5b89fd3

Browse files
committed
trying to include CRD spec in components
1 parent 596f169 commit 5b89fd3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

jsonnet/kube-prometheus/components/alertmanager.libsonnet

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
local defaults = {
1+
local spec = import 'specs/alertmanager-spec.libsonnet';
2+
3+
local defaults = spec {
24
local defaults = self,
35
// Convention: Top-level fields related to CRDs are public, other fields are hidden
46
// If there is no CRD for the component, everything is hidden in defaults.
@@ -186,7 +188,7 @@ function(params) {
186188
alertmanager: am._config.name,
187189
},
188190
},
189-
spec: {
191+
spec: spec {
190192
replicas: am._config.replicas,
191193
version: am._config.version,
192194
image: am._config.image,

jsonnet/kube-prometheus/components/prometheus.libsonnet

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
local spec = import 'specs/prometheus-spec.libsonnet';
2+
13
local defaults = spec {
24
local defaults = self,
35
// Convention: Top-level fields related to CRDs are public, other fields are hidden
@@ -253,7 +255,7 @@ function(params) {
253255
name: p._config.name,
254256
labels+: { prometheus: p._config.name },
255257
},
256-
spec: {
258+
spec: spec {
257259
replicas: p._config.replicas,
258260
version: p._config.version,
259261
image: p._config.image,

0 commit comments

Comments
 (0)