mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-26 17:01:50 +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) {
|
||||
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+: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user