Merge pull request #652 from PerfectMemory/fix-probe-with-ingress-650
This commit is contained in:
@@ -145,12 +145,18 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
|||||||
'pods',
|
'pods',
|
||||||
]) +
|
]) +
|
||||||
policyRule.withVerbs(['get', 'list', 'watch']);
|
policyRule.withVerbs(['get', 'list', 'watch']);
|
||||||
|
local ingressRule = policyRule.new() +
|
||||||
|
policyRule.withApiGroups(['extensions']) +
|
||||||
|
policyRule.withResources([
|
||||||
|
'ingresses',
|
||||||
|
]) +
|
||||||
|
policyRule.withVerbs(['get', 'list', 'watch']);
|
||||||
|
|
||||||
local newSpecificRole(namespace) =
|
local newSpecificRole(namespace) =
|
||||||
role.new() +
|
role.new() +
|
||||||
role.mixin.metadata.withName('prometheus-' + p.name) +
|
role.mixin.metadata.withName('prometheus-' + p.name) +
|
||||||
role.mixin.metadata.withNamespace(namespace) +
|
role.mixin.metadata.withNamespace(namespace) +
|
||||||
role.withRules(coreRule);
|
role.withRules([coreRule, ingressRule]);
|
||||||
|
|
||||||
local roleList = k3.rbac.v1.roleList;
|
local roleList = k3.rbac.v1.roleList;
|
||||||
roleList.new([newSpecificRole(x) for x in p.roleBindingNamespaces]),
|
roleList.new([newSpecificRole(x) for x in p.roleBindingNamespaces]),
|
||||||
@@ -182,8 +188,10 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
|||||||
serviceAccountName: 'prometheus-' + p.name,
|
serviceAccountName: 'prometheus-' + p.name,
|
||||||
serviceMonitorSelector: {},
|
serviceMonitorSelector: {},
|
||||||
podMonitorSelector: {},
|
podMonitorSelector: {},
|
||||||
|
probeSelector: {},
|
||||||
serviceMonitorNamespaceSelector: {},
|
serviceMonitorNamespaceSelector: {},
|
||||||
podMonitorNamespaceSelector: {},
|
podMonitorNamespaceSelector: {},
|
||||||
|
probeNamespaceSelector: {},
|
||||||
nodeSelector: { 'kubernetes.io/os': 'linux' },
|
nodeSelector: { 'kubernetes.io/os': 'linux' },
|
||||||
ruleSelector: selector.withMatchLabels({
|
ruleSelector: selector.withMatchLabels({
|
||||||
role: 'alert-rules',
|
role: 'alert-rules',
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ spec:
|
|||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
podMonitorNamespaceSelector: {}
|
podMonitorNamespaceSelector: {}
|
||||||
podMonitorSelector: {}
|
podMonitorSelector: {}
|
||||||
|
probeNamespaceSelector: {}
|
||||||
|
probeSelector: {}
|
||||||
replicas: 2
|
replicas: 2
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ items:
|
|||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
- apiVersion: rbac.authorization.k8s.io/v1
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: Role
|
kind: Role
|
||||||
metadata:
|
metadata:
|
||||||
@@ -32,6 +40,14 @@ items:
|
|||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
- apiVersion: rbac.authorization.k8s.io/v1
|
- apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: Role
|
kind: Role
|
||||||
metadata:
|
metadata:
|
||||||
@@ -48,4 +64,12 @@ items:
|
|||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
kind: RoleList
|
kind: RoleList
|
||||||
|
|||||||
Reference in New Issue
Block a user