Skip to content

Commit fd5be1f

Browse files
committed
Adds prometheus versions to test catalog
1 parent ade957c commit fd5be1f

27 files changed

+55963
-320
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,14 @@ kind-cluster-cleanup: $(KIND) ## Delete the kind cluster
116116
$(KIND) delete cluster --name ${KIND_CLUSTER_NAME}
117117

118118
kind-load-test-artifacts: $(KIND) ## Load the e2e testdata container images into a kind cluster
119+
$(CONTAINER_RUNTIME) build $(TESTDATA_DIR)/bundles/registry-v1/prometheus-operator.v0.37.0 -t localhost/testdata/bundles/registry-v1/prometheus-operator:v0.37.0
119120
$(CONTAINER_RUNTIME) build $(TESTDATA_DIR)/bundles/registry-v1/prometheus-operator.v0.47.0 -t localhost/testdata/bundles/registry-v1/prometheus-operator:v0.47.0
121+
$(CONTAINER_RUNTIME) build $(TESTDATA_DIR)/bundles/registry-v1/prometheus-operator.v0.65.1 -t localhost/testdata/bundles/registry-v1/prometheus-operator:v0.65.1
120122
$(CONTAINER_RUNTIME) build $(TESTDATA_DIR)/bundles/plain-v0/plain.v0.1.0 -t localhost/testdata/bundles/plain-v0/plain:v0.1.0
121123
$(CONTAINER_RUNTIME) build $(TESTDATA_DIR)/catalogs -f $(TESTDATA_DIR)/catalogs/test-catalog.Dockerfile -t localhost/testdata/catalogs/test-catalog:e2e
124+
$(KIND) load docker-image localhost/testdata/bundles/registry-v1/prometheus-operator:v0.37.0 --name $(KIND_CLUSTER_NAME)
122125
$(KIND) load docker-image localhost/testdata/bundles/registry-v1/prometheus-operator:v0.47.0 --name $(KIND_CLUSTER_NAME)
126+
$(KIND) load docker-image localhost/testdata/bundles/registry-v1/prometheus-operator:v0.65.1 --name $(KIND_CLUSTER_NAME)
123127
$(KIND) load docker-image localhost/testdata/bundles/plain-v0/plain:v0.1.0 --name $(KIND_CLUSTER_NAME)
124128
$(KIND) load docker-image localhost/testdata/catalogs/test-catalog:e2e --name $(KIND_CLUSTER_NAME)
125129

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM scratch
2+
3+
# Core bundle labels.
4+
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
5+
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
6+
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
7+
LABEL operators.operatorframework.io.bundle.package.v1=prometheus
8+
LABEL operators.operatorframework.io.bundle.channels.v1=beta
9+
LABEL operators.operatorframework.io.bundle.channel.default.v1=beta
10+
11+
# Copy files to locations specified by labels.
12+
COPY manifests /manifests/
13+
COPY metadata /metadata/

testdata/bundles/registry-v1/prometheus-operator.v0.37.0/manifests/alertmanagers.monitoring.coreos.com.crd.yaml

Lines changed: 4505 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.2.4
6+
creationTimestamp: null
7+
name: podmonitors.monitoring.coreos.com
8+
spec:
9+
group: monitoring.coreos.com
10+
names:
11+
kind: PodMonitor
12+
listKind: PodMonitorList
13+
plural: podmonitors
14+
singular: podmonitor
15+
preserveUnknownFields: false
16+
scope: Namespaced
17+
validation:
18+
openAPIV3Schema:
19+
description: PodMonitor defines monitoring for a set of pods.
20+
properties:
21+
apiVersion:
22+
description: 'APIVersion defines the versioned schema of this representation
23+
of an object. Servers should convert recognized schemas to the latest
24+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
25+
type: string
26+
kind:
27+
description: 'Kind is a string value representing the REST resource this
28+
object represents. Servers may infer this from the endpoint the client
29+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
30+
type: string
31+
metadata:
32+
type: object
33+
spec:
34+
description: Specification of desired Pod selection for target discovery
35+
by Prometheus.
36+
properties:
37+
jobLabel:
38+
description: The label to use to retrieve the job name from.
39+
type: string
40+
namespaceSelector:
41+
description: Selector to select which namespaces the Endpoints objects
42+
are discovered from.
43+
properties:
44+
any:
45+
description: Boolean describing whether all namespaces are selected
46+
in contrast to a list restricting them.
47+
type: boolean
48+
matchNames:
49+
description: List of namespace names.
50+
items:
51+
type: string
52+
type: array
53+
type: object
54+
podMetricsEndpoints:
55+
description: A list of endpoints allowed as part of this PodMonitor.
56+
items:
57+
description: PodMetricsEndpoint defines a scrapeable endpoint of a
58+
Kubernetes Pod serving Prometheus metrics.
59+
properties:
60+
honorLabels:
61+
description: HonorLabels chooses the metric's labels on collisions
62+
with target labels.
63+
type: boolean
64+
honorTimestamps:
65+
description: HonorTimestamps controls whether Prometheus respects
66+
the timestamps present in scraped data.
67+
type: boolean
68+
interval:
69+
description: Interval at which metrics should be scraped
70+
type: string
71+
metricRelabelings:
72+
description: MetricRelabelConfigs to apply to samples before ingestion.
73+
items:
74+
description: 'RelabelConfig allows dynamic rewriting of the
75+
label set, being applied to samples before ingestion. It defines
76+
`<metric_relabel_configs>`-section of Prometheus configuration.
77+
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
78+
properties:
79+
action:
80+
description: Action to perform based on regex matching.
81+
Default is 'replace'
82+
type: string
83+
modulus:
84+
description: Modulus to take of the hash of the source label
85+
values.
86+
format: int64
87+
type: integer
88+
regex:
89+
description: Regular expression against which the extracted
90+
value is matched. Default is '(.*)'
91+
type: string
92+
replacement:
93+
description: Replacement value against which a regex replace
94+
is performed if the regular expression matches. Regex
95+
capture groups are available. Default is '$1'
96+
type: string
97+
separator:
98+
description: Separator placed between concatenated source
99+
label values. default is ';'.
100+
type: string
101+
sourceLabels:
102+
description: The source labels select values from existing
103+
labels. Their content is concatenated using the configured
104+
separator and matched against the configured regular expression
105+
for the replace, keep, and drop actions.
106+
items:
107+
type: string
108+
type: array
109+
targetLabel:
110+
description: Label to which the resulting value is written
111+
in a replace action. It is mandatory for replace actions.
112+
Regex capture groups are available.
113+
type: string
114+
type: object
115+
type: array
116+
params:
117+
additionalProperties:
118+
items:
119+
type: string
120+
type: array
121+
description: Optional HTTP URL parameters
122+
type: object
123+
path:
124+
description: HTTP path to scrape for metrics.
125+
type: string
126+
port:
127+
description: Name of the port this endpoint refers to. Mutually
128+
exclusive with targetPort.
129+
type: string
130+
proxyUrl:
131+
description: ProxyURL eg http://proxyserver:2195 Directs scrapes
132+
to proxy through this endpoint.
133+
type: string
134+
relabelings:
135+
description: 'RelabelConfigs to apply to samples before ingestion.
136+
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
137+
items:
138+
description: 'RelabelConfig allows dynamic rewriting of the
139+
label set, being applied to samples before ingestion. It defines
140+
`<metric_relabel_configs>`-section of Prometheus configuration.
141+
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
142+
properties:
143+
action:
144+
description: Action to perform based on regex matching.
145+
Default is 'replace'
146+
type: string
147+
modulus:
148+
description: Modulus to take of the hash of the source label
149+
values.
150+
format: int64
151+
type: integer
152+
regex:
153+
description: Regular expression against which the extracted
154+
value is matched. Default is '(.*)'
155+
type: string
156+
replacement:
157+
description: Replacement value against which a regex replace
158+
is performed if the regular expression matches. Regex
159+
capture groups are available. Default is '$1'
160+
type: string
161+
separator:
162+
description: Separator placed between concatenated source
163+
label values. default is ';'.
164+
type: string
165+
sourceLabels:
166+
description: The source labels select values from existing
167+
labels. Their content is concatenated using the configured
168+
separator and matched against the configured regular expression
169+
for the replace, keep, and drop actions.
170+
items:
171+
type: string
172+
type: array
173+
targetLabel:
174+
description: Label to which the resulting value is written
175+
in a replace action. It is mandatory for replace actions.
176+
Regex capture groups are available.
177+
type: string
178+
type: object
179+
type: array
180+
scheme:
181+
description: HTTP scheme to use for scraping.
182+
type: string
183+
scrapeTimeout:
184+
description: Timeout after which the scrape is ended
185+
type: string
186+
targetPort:
187+
anyOf:
188+
- type: integer
189+
- type: string
190+
description: Name or number of the target port of the endpoint.
191+
Mutually exclusive with port.
192+
x-kubernetes-int-or-string: true
193+
type: object
194+
type: array
195+
podTargetLabels:
196+
description: PodTargetLabels transfers labels on the Kubernetes Pod
197+
onto the target.
198+
items:
199+
type: string
200+
type: array
201+
sampleLimit:
202+
description: SampleLimit defines per-scrape limit on number of scraped
203+
samples that will be accepted.
204+
format: int64
205+
type: integer
206+
selector:
207+
description: Selector to select Pod objects.
208+
properties:
209+
matchExpressions:
210+
description: matchExpressions is a list of label selector requirements.
211+
The requirements are ANDed.
212+
items:
213+
description: A label selector requirement is a selector that contains
214+
values, a key, and an operator that relates the key and values.
215+
properties:
216+
key:
217+
description: key is the label key that the selector applies
218+
to.
219+
type: string
220+
operator:
221+
description: operator represents a key's relationship to a
222+
set of values. Valid operators are In, NotIn, Exists and
223+
DoesNotExist.
224+
type: string
225+
values:
226+
description: values is an array of string values. If the operator
227+
is In or NotIn, the values array must be non-empty. If the
228+
operator is Exists or DoesNotExist, the values array must
229+
be empty. This array is replaced during a strategic merge
230+
patch.
231+
items:
232+
type: string
233+
type: array
234+
required:
235+
- key
236+
- operator
237+
type: object
238+
type: array
239+
matchLabels:
240+
additionalProperties:
241+
type: string
242+
description: matchLabels is a map of {key,value} pairs. A single
243+
{key,value} in the matchLabels map is equivalent to an element
244+
of matchExpressions, whose key field is "key", the operator is
245+
"In", and the values array contains only "value". The requirements
246+
are ANDed.
247+
type: object
248+
type: object
249+
required:
250+
- podMetricsEndpoints
251+
- selector
252+
type: object
253+
required:
254+
- spec
255+
type: object
256+
version: v1
257+
versions:
258+
- name: v1
259+
served: true
260+
storage: true
261+
status:
262+
acceptedNames:
263+
kind: ""
264+
plural: ""
265+
conditions: []
266+
storedVersions: []

0 commit comments

Comments
 (0)