Dhall types for Kubernetes Prometheus Operator
This repository includes types, default records, and functions that produce default records in the Dhall language which model the Prometheus Operator API domain. They are based off the Prometheus Operator documentation reference.
This allows the user to more easily generate type-safe Kubernetes resources for Prometheus/Alertmanager, through the use of the Dhall project's dhall-to-yaml
tool.
This project relies upon resources provided by the dhall-kubernetes
project. However, as these resources are imported directly from raw.githubusercontent.com
, they do not need to be manually installed.
For stability, users are encouraged to import from a tagged release, not from the master branch, and to watch for new releases. This project does not yet have rigorous testing set up for it and new commits on the master branch are prone to break compatibility and are almost sure to change the import hash for the expression.
https://raw.githubusercontent.com/coralogix/dhall-prometheus-operator/v8.0.0/package.dhall sha256:ebc5f0c5f57d410412c2b7cbb64d0883be648eafc094f0c3e10dba4e6bd46ed4
let Kubernetes = https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/v6.0.0/package.dhall sha256:532e110f424ea8a9f960a13b2ca54779ddcac5d5aa531f86d82f41f8f18d7ef1
let PrometheusOperator = (https://raw.githubusercontent.com/coralogix/dhall-prometheus-operator/v8.0.0/package.dhall sha256:ebc5f0c5f57d410412c2b7cbb64d0883be648eafc094f0c3e10dba4e6bd46ed4).v1
in PrometheusOperator.ServiceMonitor::{
, metadata =
Kubernetes.ObjectMeta::{ name = Some "example" }
, spec =
PrometheusOperator.ServiceMonitorSpec::{
, selector =
Kubernetes.LabelSelector::{
, matchLabels = Some
(toMap { app = "example" })
}
, endpoints =
Some [ PrometheusOperator.Endpoint.Union.TargetPort
PrometheusOperator.Endpoint.TargetPort::{
, targetPort = Kubernetes.NatOrString.String "example"
, interval = Some "60s"
, scrapeTimeout = Some "40s"
}
]
, namespaceSelector =
Some
( PrometheusOperator.NamespaceSelector.Any { any = True }
)
}
}
Ari Becker Oded David Shauli Solomovich
TBD
Apache License 2.0 © Coralogix, Inc.