Commit 2fffb739 authored by gitlawr's avatar gitlawr Committed by Craig Jellick
parent 447b7a37
# Source https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/0prometheus-operator-0podmonitorCustomResourceDefinition.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: "podmonitors.monitoring.coreos.com"
labels:
app: operator-init
chart: operator-init-0.1.0
heritage: Tiller
release: prometheus-operator
spec:
group: "monitoring.coreos.com"
names:
kind: PodMonitor
plural: podmonitors
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
spec:
description: PodMonitorSpec contains specification parameters for a PodMonitor.
properties:
jobLabel:
description: The label to use to retrieve the job name from.
type: string
namespaceSelector:
description: NamespaceSelector is a selector for selecting either all
namespaces or a list of namespaces.
properties:
any:
description: Boolean describing whether all namespaces are selected
in contrast to a list restricting them.
type: boolean
matchNames:
description: List of namespace names.
items:
type: string
type: array
type: object
podMetricsEndpoints:
description: A list of endpoints allowed as part of this PodMonitor.
items:
description: PodMetricsEndpoint defines a scrapeable endpoint of a
Kubernetes Pod serving Prometheus metrics.
properties:
honorLabels:
description: HonorLabels chooses the metric's labels on collisions
with target labels.
type: boolean
interval:
description: Interval at which metrics should be scraped
type: string
metricRelabelings:
description: MetricRelabelConfigs to apply to samples before ingestion.
items:
description: 'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It defines
`<metric_relabel_configs>`-section of Prometheus configuration.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description: Action to perform based on regex matching.
Default is 'replace'
type: string
modulus:
description: Modulus to take of the hash of the source label
values.
format: int64
type: integer
regex:
description: Regular expression against which the extracted
value is matched. defailt is '(.*)'
type: string
replacement:
description: Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
type: string
separator:
description: Separator placed between concatenated source
label values. default is ';'.
type: string
sourceLabels:
description: The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular expression
for the replace, keep, and drop actions.
items:
type: string
type: array
targetLabel:
description: Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
type: string
type: object
type: array
params:
description: Optional HTTP URL parameters
type: object
path:
description: HTTP path to scrape for metrics.
type: string
port:
description: Name of the port this endpoint refers to. Mutually
exclusive with targetPort.
type: string
proxyUrl:
description: ProxyURL eg http://proxyserver:2195 Directs scrapes
to proxy through this endpoint.
type: string
relabelings:
description: 'RelabelConfigs to apply to samples before ingestion.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
items:
description: 'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It defines
`<metric_relabel_configs>`-section of Prometheus configuration.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description: Action to perform based on regex matching.
Default is 'replace'
type: string
modulus:
description: Modulus to take of the hash of the source label
values.
format: int64
type: integer
regex:
description: Regular expression against which the extracted
value is matched. defailt is '(.*)'
type: string
replacement:
description: Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
type: string
separator:
description: Separator placed between concatenated source
label values. default is ';'.
type: string
sourceLabels:
description: The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular expression
for the replace, keep, and drop actions.
items:
type: string
type: array
targetLabel:
description: Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
type: string
type: object
type: array
scheme:
description: HTTP scheme to use for scraping.
type: string
scrapeTimeout:
description: Timeout after which the scrape is ended
type: string
targetPort:
anyOf:
- type: string
- type: integer
type: object
type: array
podTargetLabels:
description: PodTargetLabels transfers labels on the Kubernetes Pod
onto the target.
items:
type: string
type: array
sampleLimit:
description: SampleLimit defines per-scrape limit on number of scraped
samples that will be accepted.
format: int64
type: integer
selector:
description: A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty
label selector matches all objects. A null label selector matches
no objects.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that contains
values, a key, and an operator that relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to a
set of values. Valid operators are In, NotIn, Exists and
DoesNotExist.
type: string
values:
description: values is an array of string values. If the operator
is In or NotIn, the values array must be non-empty. If the
operator is Exists or DoesNotExist, the values array must
be empty. This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator is
"In", and the values array contains only "value". The requirements
are ANDed.
type: object
type: object
required:
- podMetricsEndpoints
- selector
type: object
type: object
version: v1
\ No newline at end of file
...@@ -98,6 +98,7 @@ spec: ...@@ -98,6 +98,7 @@ spec:
type: string type: string
required: required:
- name - name
type: object
type: array type: array
result: result:
description: Status is a return value for calls that don't return description: Status is a return value for calls that don't return
...@@ -149,6 +150,7 @@ spec: ...@@ -149,6 +150,7 @@ spec:
cause of the error. If this value is empty there cause of the error. If this value is empty there
is no information available. is no information available.
type: string type: string
type: object
type: array type: array
group: group:
description: The group attribute of the resource associated description: The group attribute of the resource associated
...@@ -176,6 +178,7 @@ spec: ...@@ -176,6 +178,7 @@ spec:
description: 'UID of the resource. (when there is a single description: 'UID of the resource. (when there is a single
resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids' resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
type: string type: string
type: object
kind: kind:
description: 'Kind is a string value representing the REST resource description: 'Kind is a string value representing the REST resource
this object represents. Servers may infer this from the endpoint this object represents. Servers may infer this from the endpoint
...@@ -216,6 +219,7 @@ spec: ...@@ -216,6 +219,7 @@ spec:
description: selfLink is a URL representing this object. description: selfLink is a URL representing this object.
Populated by the system. Read-only. Populated by the system. Read-only.
type: string type: string
type: object
reason: reason:
description: A machine-readable description of why this operation description: A machine-readable description of why this operation
is in the "Failure" status. If this value is empty there is is in the "Failure" status. If this value is empty there is
...@@ -226,13 +230,51 @@ spec: ...@@ -226,13 +230,51 @@ spec:
description: 'Status of the operation. One of: "Success" or description: 'Status of the operation. One of: "Success" or
"Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
type: string type: string
type: object
required: required:
- pending - pending
type: object
labels: labels:
description: 'Map of string keys and values that can be used to organize description: 'Map of string keys and values that can be used to organize
and categorize (scope and select) objects. May match selectors of and categorize (scope and select) objects. May match selectors of
replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels'
type: object type: object
managedFields:
description: |-
ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object.
This field is alpha and can be changed or removed without notice.
items:
description: ManagedFieldsEntry is a workflow-id, a FieldSet and the
group version of the resource that the fieldset applies to.
properties:
apiVersion:
description: APIVersion defines the version of this resource that
this field set applies to. The format is "group/version" just
like the top-level APIVersion field. It is necessary to track
the version of a field set because it cannot be automatically
converted.
type: string
fields:
description: 'Fields stores a set of fields in a data structure
like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff'
type: object
manager:
description: Manager is an identifier of the workflow managing
these fields.
type: string
operation:
description: Operation is the type of operation which lead to
this ManagedFieldsEntry being created. The only valid values
for this field are 'Apply' and 'Update'.
type: string
time:
description: Time is a wrapper around time.Time which supports
correct marshaling to YAML and JSON. Wrappers are provided
for many of the factory methods that the time package offers.
format: date-time
type: string
type: object
type: array
name: name:
description: 'Name must be unique within a namespace. Is required when description: 'Name must be unique within a namespace. Is required when
creating resources, although some resources may allow a client to creating resources, although some resources may allow a client to
...@@ -284,6 +326,7 @@ spec: ...@@ -284,6 +326,7 @@ spec:
- kind - kind
- name - name
- uid - uid
type: object
type: array type: array
resourceVersion: resourceVersion:
description: |- description: |-
...@@ -299,6 +342,7 @@ spec: ...@@ -299,6 +342,7 @@ spec:
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
type: string type: string
type: object
spec: spec:
description: PrometheusRuleSpec contains specification parameters for a description: PrometheusRuleSpec contains specification parameters for a
Rule. Rule.
...@@ -333,9 +377,13 @@ spec: ...@@ -333,9 +377,13 @@ spec:
type: string type: string
required: required:
- expr - expr
type: object
type: array type: array
required: required:
- name - name
- rules - rules
type: object
type: array type: array
type: object
type: object
version: v1 version: v1
...@@ -56,6 +56,7 @@ spec: ...@@ -56,6 +56,7 @@ spec:
type: boolean type: boolean
required: required:
- key - key
type: object
username: username:
description: SecretKeySelector selects a key of a Secret. description: SecretKeySelector selects a key of a Secret.
properties: properties:
...@@ -72,6 +73,8 @@ spec: ...@@ -72,6 +73,8 @@ spec:
type: boolean type: boolean
required: required:
- key - key
type: object
type: object
bearerTokenFile: bearerTokenFile:
description: File to read bearer token for scraping targets. description: File to read bearer token for scraping targets.
type: string type: string
...@@ -125,6 +128,7 @@ spec: ...@@ -125,6 +128,7 @@ spec:
in a replace action. It is mandatory for replace actions. in a replace action. It is mandatory for replace actions.
Regex capture groups are available. Regex capture groups are available.
type: string type: string
type: object
type: array type: array
params: params:
description: Optional HTTP URL parameters description: Optional HTTP URL parameters
...@@ -184,6 +188,7 @@ spec: ...@@ -184,6 +188,7 @@ spec:
in a replace action. It is mandatory for replace actions. in a replace action. It is mandatory for replace actions.
Regex capture groups are available. Regex capture groups are available.
type: string type: string
type: object
type: array type: array
scheme: scheme:
description: HTTP scheme to use for scraping. description: HTTP scheme to use for scraping.
...@@ -213,6 +218,8 @@ spec: ...@@ -213,6 +218,8 @@ spec:
serverName: serverName:
description: Used to verify the hostname for the targets. description: Used to verify the hostname for the targets.
type: string type: string
type: object
type: object
type: array type: array
jobLabel: jobLabel:
description: The label to use to retrieve the job name from. description: The label to use to retrieve the job name from.
...@@ -230,6 +237,7 @@ spec: ...@@ -230,6 +237,7 @@ spec:
items: items:
type: string type: string
type: array type: array
type: object
podTargetLabels: podTargetLabels:
description: PodTargetLabels transfers labels on the Kubernetes Pod description: PodTargetLabels transfers labels on the Kubernetes Pod
onto the target. onto the target.
...@@ -275,6 +283,7 @@ spec: ...@@ -275,6 +283,7 @@ spec:
required: required:
- key - key
- operator - operator
type: object
type: array type: array
matchLabels: matchLabels:
description: matchLabels is a map of {key,value} pairs. A single description: matchLabels is a map of {key,value} pairs. A single
...@@ -283,6 +292,7 @@ spec: ...@@ -283,6 +292,7 @@ spec:
"In", and the values array contains only "value". The requirements "In", and the values array contains only "value". The requirements
are ANDed. are ANDed.
type: object type: object
type: object
targetLabels: targetLabels:
description: TargetLabels transfers labels on the Kubernetes Service description: TargetLabels transfers labels on the Kubernetes Service
onto the target. onto the target.
...@@ -292,4 +302,6 @@ spec: ...@@ -292,4 +302,6 @@ spec:
required: required:
- endpoints - endpoints
- selector - selector
type: object
type: object
version: v1 version: v1
...@@ -21,6 +21,7 @@ rules: ...@@ -21,6 +21,7 @@ rules:
- prometheusrules - prometheusrules
- prometheuses/finalizers - prometheuses/finalizers
- alertmanagers/finalizers - alertmanagers/finalizers
- podmonitors
verbs: verbs:
- "*" - "*"
- apiGroups: - apiGroups:
...@@ -44,11 +45,13 @@ rules: ...@@ -44,11 +45,13 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: resources:
- services - services
- services/finalizers
- endpoints - endpoints
verbs: verbs:
- get - get
- create - create
- update - update
- delete
- apiGroups: [""] - apiGroups: [""]
resources: resources:
- nodes - nodes
......
...@@ -75,5 +75,24 @@ spec: ...@@ -75,5 +75,24 @@ spec:
plural: servicemonitors plural: servicemonitors
scope: Namespaced scope: Namespaced
version: v1 version: v1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: {{ printf "podmonitors.%s" (.Values.operator.apiGroup | default "monitoring.coreos.com") }}
labels:
app: {{ template "app.name" . }}
chart: {{ template "app.version" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
annotations:
"helm.sh/hook": crd-install
spec:
group: {{ .Values.operator.apiGroup | default "monitoring.coreos.com" }}
names:
kind: PodMonitor
plural: podmonitors
scope: Namespaced
version: v1
{{- end }} {{- end }}
{{- end -}} {{- end -}}
...@@ -4,10 +4,10 @@ operator: ...@@ -4,10 +4,10 @@ operator:
apiGroup: "monitoring.coreos.com" apiGroup: "monitoring.coreos.com"
image: image:
repository: rancher/coreos-prometheus-operator repository: rancher/coreos-prometheus-operator
tag: v0.29.0 tag: v0.32.0
prometheusConfigReloader: prometheusConfigReloader:
repository: rancher/coreos-prometheus-config-reloader repository: rancher/coreos-prometheus-config-reloader
tag: v0.29.0 tag: v0.32.0
configmapReload: configmapReload:
repository: rancher/coreos-configmap-reload repository: rancher/coreos-configmap-reload
tag: v0.0.1 tag: v0.0.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment