Skip to content
Snippets Groups Projects
Unverified Commit b6768640 authored by paulfantom's avatar paulfantom
Browse files

jsonnet: remove wrapping prometheus-operator lib

parent 255cd9a1
No related branches found
No related tags found
Loading
......@@ -25,26 +25,13 @@ local defaults = {
},
};
function(params) {
local po = self,
config:: defaults + params,
function(params)
local config = defaults + params;
// Safety check
assert std.isObject(po.config.resources),
assert std.isObject(config.resources);
//TODO(paulfantom): it would be better to include it on the same level as self.
local polib = prometheusOperator(po.config),
'0alertmanagerConfigCustomResourceDefinition': polib['0alertmanagerConfigCustomResourceDefinition'],
'0alertmanagerCustomResourceDefinition': polib['0alertmanagerCustomResourceDefinition'],
'0podmonitorCustomResourceDefinition': polib['0podmonitorCustomResourceDefinition'],
'0probeCustomResourceDefinition': polib['0probeCustomResourceDefinition'],
'0prometheusCustomResourceDefinition': polib['0prometheusCustomResourceDefinition'],
'0prometheusruleCustomResourceDefinition': polib['0prometheusruleCustomResourceDefinition'],
'0servicemonitorCustomResourceDefinition': polib['0servicemonitorCustomResourceDefinition'],
'0thanosrulerCustomResourceDefinition': polib['0thanosrulerCustomResourceDefinition'],
serviceAccount: polib.serviceAccount,
service: polib.service {
prometheusOperator(config) {
service+: {
spec+: {
ports: [
{
......@@ -56,7 +43,7 @@ function(params) {
},
},
serviceMonitor: polib.serviceMonitor {
serviceMonitor+: {
spec+: {
endpoints: [
{
......@@ -72,8 +59,7 @@ function(params) {
},
},
clusterRoleBinding: polib.clusterRoleBinding,
clusterRole: polib.clusterRole {
clusterRole+: {
rules+: [
{
apiGroups: ['authentication.k8s.io'],
......@@ -97,7 +83,7 @@ function(params) {
],
}),
deployment: polib.deployment {
deployment+: {
spec+: {
template+: {
spec+: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment