mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-27 01:11:53 +02:00
jsonnet: remove wrapping prometheus-operator lib
This commit is contained in:
parent
255cd9a1c5
commit
b67686409e
@ -25,26 +25,13 @@ local defaults = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function(params) {
|
function(params)
|
||||||
local po = self,
|
local config = defaults + params;
|
||||||
config:: defaults + params,
|
|
||||||
// Safety check
|
// 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.
|
prometheusOperator(config) {
|
||||||
local polib = prometheusOperator(po.config),
|
service+: {
|
||||||
|
|
||||||
'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 {
|
|
||||||
spec+: {
|
spec+: {
|
||||||
ports: [
|
ports: [
|
||||||
{
|
{
|
||||||
@ -56,7 +43,7 @@ function(params) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
serviceMonitor: polib.serviceMonitor {
|
serviceMonitor+: {
|
||||||
spec+: {
|
spec+: {
|
||||||
endpoints: [
|
endpoints: [
|
||||||
{
|
{
|
||||||
@ -72,8 +59,7 @@ function(params) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
clusterRoleBinding: polib.clusterRoleBinding,
|
clusterRole+: {
|
||||||
clusterRole: polib.clusterRole {
|
|
||||||
rules+: [
|
rules+: [
|
||||||
{
|
{
|
||||||
apiGroups: ['authentication.k8s.io'],
|
apiGroups: ['authentication.k8s.io'],
|
||||||
@ -97,7 +83,7 @@ function(params) {
|
|||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
deployment: polib.deployment {
|
deployment+: {
|
||||||
spec+: {
|
spec+: {
|
||||||
template+: {
|
template+: {
|
||||||
spec+: {
|
spec+: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user