Skip to content

Commit 18a2194

Browse files
committed
deprecate prometheus CR
Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
1 parent f85497d commit 18a2194

19 files changed

Lines changed: 580 additions & 481 deletions

.github/workflows/ci-build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ jobs:
103103
run: |
104104
set -o pipefail
105105
make install generate fmt vet
106+
echo "=== Listing installed CRDs ==="
107+
make list-crds
106108
# Use tee to flush output to the log. Other solutions like stdbuf don't work, not sure why.
107109
make start-e2e 2>&1 | tee /tmp/e2e-operator-run.log &
108110

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,19 @@ install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~
160160
## causing failures as we don't set up the webhook for local testing.
161161
$(KUSTOMIZE) build config/crd | sed '/conversion:/,/- v1beta1/d' |kubectl apply --server-side=true -f -
162162

163+
list-crds: ## List all CRDs in the cluster
164+
@echo "=== Installed CRDs ==="
165+
@kubectl get crds --sort-by=.metadata.name
166+
@echo ""
167+
@echo "=== ArgoCD Operator CRDs ==="
168+
@kubectl get crds | grep argoproj.io || echo "None found"
169+
@echo ""
170+
@echo "=== Prometheus Operator CRDs ==="
171+
@kubectl get crds | grep monitoring.coreos.com || echo "None found"
172+
@echo ""
173+
@echo "=== OpenShift Route CRDs ==="
174+
@kubectl get crds | grep route.openshift.io || echo "None found"
175+
163176
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
164177
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
165178

api/v1alpha1/argocd_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,20 +355,26 @@ type ArgoCDNotifications struct {
355355
// ArgoCDPrometheusSpec defines the desired state for the Prometheus component.
356356
type ArgoCDPrometheusSpec struct {
357357
// Enabled will toggle Prometheus support globally for ArgoCD.
358+
// When set to true, ServiceMonitors and PrometheusRules will be created for Argo CD metrics.
359+
// The Prometheus CR, Route, and Ingress are deprecated and will no longer be created.
358360
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Enabled",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus","urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
359361
Enabled bool `json:"enabled"`
360362

361363
// Host is the hostname to use for Ingress/Route resources.
364+
// Deprecated: This field is no longer used and will be ignored.
362365
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Host",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus","urn:alm:descriptor:com.tectonic.ui:text"}
363366
Host string `json:"host,omitempty"`
364367

365368
// Ingress defines the desired state for an Ingress for the Prometheus component.
369+
// Deprecated: This field is no longer used and will be ignored.
366370
Ingress ArgoCDIngressSpec `json:"ingress,omitempty"`
367371

368372
// Route defines the desired state for an OpenShift Route for the Prometheus component.
373+
// Deprecated: This field is no longer used and will be ignored.
369374
Route ArgoCDRouteSpec `json:"route,omitempty"`
370375

371376
// Size is the replica count for the Prometheus StatefulSet.
377+
// Deprecated: This field is no longer used and will be ignored.
372378
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Size",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus","urn:alm:descriptor:com.tectonic.ui:podCount"}
373379
Size *int32 `json:"size,omitempty"`
374380
}

api/v1beta1/argocd_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,20 +437,26 @@ type ArgoCDNotifications struct {
437437
// ArgoCDPrometheusSpec defines the desired state for the Prometheus component.
438438
type ArgoCDPrometheusSpec struct {
439439
// Enabled will toggle Prometheus support globally for ArgoCD.
440+
// When set to true, ServiceMonitors and PrometheusRules will be created for Argo CD metrics.
441+
// The Prometheus CR, Route, and Ingress are deprecated and will no longer be created.
440442
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Enabled",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus","urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
441443
Enabled bool `json:"enabled"`
442444

443445
// Host is the hostname to use for Ingress/Route resources.
446+
// Deprecated: This field is no longer used and will be ignored.
444447
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Host",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus","urn:alm:descriptor:com.tectonic.ui:text"}
445448
Host string `json:"host,omitempty"`
446449

447450
// Ingress defines the desired state for an Ingress for the Prometheus component.
451+
// Deprecated: This field is no longer used and will be ignored.
448452
Ingress ArgoCDIngressSpec `json:"ingress,omitempty"`
449453

450454
// Route defines the desired state for an OpenShift Route for the Prometheus component.
455+
// Deprecated: This field is no longer used and will be ignored.
451456
Route ArgoCDRouteSpec `json:"route,omitempty"`
452457

453458
// Size is the replica count for the Prometheus StatefulSet.
459+
// Deprecated: This field is no longer used and will be ignored.
454460
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Size",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus","urn:alm:descriptor:com.tectonic.ui:podCount"}
455461
Size *int32 `json:"size,omitempty"`
456462
}

bundle/manifests/argocd-operator.clusterserviceversion.yaml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -652,13 +652,17 @@ spec:
652652
x-descriptors:
653653
- urn:alm:descriptor:com.tectonic.ui:text
654654
- urn:alm:descriptor:com.tectonic.ui:advanced
655-
- description: Enabled will toggle Prometheus support globally for ArgoCD.
655+
- description: Enabled will toggle Prometheus support globally for ArgoCD. When
656+
set to true, ServiceMonitors and PrometheusRules will be created for Argo
657+
CD metrics. The Prometheus CR, Route, and Ingress are deprecated and will
658+
no longer be created.
656659
displayName: Enabled
657660
path: prometheus.enabled
658661
x-descriptors:
659662
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus
660663
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
661-
- description: Host is the hostname to use for Ingress/Route resources.
664+
- description: 'Host is the hostname to use for Ingress/Route resources. Deprecated:
665+
This field is no longer used and will be ignored.'
662666
displayName: Host
663667
path: prometheus.host
664668
x-descriptors:
@@ -680,7 +684,8 @@ spec:
680684
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus
681685
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Server
682686
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
683-
- description: Size is the replica count for the Prometheus StatefulSet.
687+
- description: 'Size is the replica count for the Prometheus StatefulSet. Deprecated:
688+
This field is no longer used and will be ignored.'
684689
displayName: Size
685690
path: prometheus.size
686691
x-descriptors:
@@ -1248,13 +1253,17 @@ spec:
12481253
x-descriptors:
12491254
- urn:alm:descriptor:com.tectonic.ui:text
12501255
- urn:alm:descriptor:com.tectonic.ui:advanced
1251-
- description: Enabled will toggle Prometheus support globally for ArgoCD.
1256+
- description: Enabled will toggle Prometheus support globally for ArgoCD. When
1257+
set to true, ServiceMonitors and PrometheusRules will be created for Argo
1258+
CD metrics. The Prometheus CR, Route, and Ingress are deprecated and will
1259+
no longer be created.
12521260
displayName: Enabled
12531261
path: prometheus.enabled
12541262
x-descriptors:
12551263
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus
12561264
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
1257-
- description: Host is the hostname to use for Ingress/Route resources.
1265+
- description: 'Host is the hostname to use for Ingress/Route resources. Deprecated:
1266+
This field is no longer used and will be ignored.'
12581267
displayName: Host
12591268
path: prometheus.host
12601269
x-descriptors:
@@ -1276,7 +1285,8 @@ spec:
12761285
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Prometheus
12771286
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Server
12781287
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
1279-
- description: Size is the replica count for the Prometheus StatefulSet.
1288+
- description: 'Size is the replica count for the Prometheus StatefulSet. Deprecated:
1289+
This field is no longer used and will be ignored.'
12801290
displayName: Size
12811291
path: prometheus.size
12821292
x-descriptors:

bundle/manifests/argoproj.io_argocds.yaml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,15 +2221,20 @@ spec:
22212221
ArgoCD.
22222222
properties:
22232223
enabled:
2224-
description: Enabled will toggle Prometheus support globally for
2225-
ArgoCD.
2224+
description: |-
2225+
Enabled will toggle Prometheus support globally for ArgoCD.
2226+
When set to true, ServiceMonitors and PrometheusRules will be created for Argo CD metrics.
2227+
The Prometheus CR, Route, and Ingress are deprecated and will no longer be created.
22262228
type: boolean
22272229
host:
2228-
description: Host is the hostname to use for Ingress/Route resources.
2230+
description: |-
2231+
Host is the hostname to use for Ingress/Route resources.
2232+
Deprecated: This field is no longer used and will be ignored.
22292233
type: string
22302234
ingress:
2231-
description: Ingress defines the desired state for an Ingress
2232-
for the Prometheus component.
2235+
description: |-
2236+
Ingress defines the desired state for an Ingress for the Prometheus component.
2237+
Deprecated: This field is no longer used and will be ignored.
22332238
properties:
22342239
annotations:
22352240
additionalProperties:
@@ -2281,8 +2286,9 @@ spec:
22812286
- enabled
22822287
type: object
22832288
route:
2284-
description: Route defines the desired state for an OpenShift
2285-
Route for the Prometheus component.
2289+
description: |-
2290+
Route defines the desired state for an OpenShift Route for the Prometheus component.
2291+
Deprecated: This field is no longer used and will be ignored.
22862292
properties:
22872293
annotations:
22882294
additionalProperties:
@@ -2388,7 +2394,9 @@ spec:
23882394
- enabled
23892395
type: object
23902396
size:
2391-
description: Size is the replica count for the Prometheus StatefulSet.
2397+
description: |-
2398+
Size is the replica count for the Prometheus StatefulSet.
2399+
Deprecated: This field is no longer used and will be ignored.
23922400
format: int32
23932401
type: integer
23942402
required:
@@ -18302,15 +18310,20 @@ spec:
1830218310
ArgoCD.
1830318311
properties:
1830418312
enabled:
18305-
description: Enabled will toggle Prometheus support globally for
18306-
ArgoCD.
18313+
description: |-
18314+
Enabled will toggle Prometheus support globally for ArgoCD.
18315+
When set to true, ServiceMonitors and PrometheusRules will be created for Argo CD metrics.
18316+
The Prometheus CR, Route, and Ingress are deprecated and will no longer be created.
1830718317
type: boolean
1830818318
host:
18309-
description: Host is the hostname to use for Ingress/Route resources.
18319+
description: |-
18320+
Host is the hostname to use for Ingress/Route resources.
18321+
Deprecated: This field is no longer used and will be ignored.
1831018322
type: string
1831118323
ingress:
18312-
description: Ingress defines the desired state for an Ingress
18313-
for the Prometheus component.
18324+
description: |-
18325+
Ingress defines the desired state for an Ingress for the Prometheus component.
18326+
Deprecated: This field is no longer used and will be ignored.
1831418327
properties:
1831518328
annotations:
1831618329
additionalProperties:
@@ -18362,8 +18375,9 @@ spec:
1836218375
- enabled
1836318376
type: object
1836418377
route:
18365-
description: Route defines the desired state for an OpenShift
18366-
Route for the Prometheus component.
18378+
description: |-
18379+
Route defines the desired state for an OpenShift Route for the Prometheus component.
18380+
Deprecated: This field is no longer used and will be ignored.
1836718381
properties:
1836818382
annotations:
1836918383
additionalProperties:
@@ -18469,7 +18483,9 @@ spec:
1846918483
- enabled
1847018484
type: object
1847118485
size:
18472-
description: Size is the replica count for the Prometheus StatefulSet.
18486+
description: |-
18487+
Size is the replica count for the Prometheus StatefulSet.
18488+
Deprecated: This field is no longer used and will be ignored.
1847318489
format: int32
1847418490
type: integer
1847518491
required:

config/crd/bases/argoproj.io_argocds.yaml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,15 +2210,20 @@ spec:
22102210
ArgoCD.
22112211
properties:
22122212
enabled:
2213-
description: Enabled will toggle Prometheus support globally for
2214-
ArgoCD.
2213+
description: |-
2214+
Enabled will toggle Prometheus support globally for ArgoCD.
2215+
When set to true, ServiceMonitors and PrometheusRules will be created for Argo CD metrics.
2216+
The Prometheus CR, Route, and Ingress are deprecated and will no longer be created.
22152217
type: boolean
22162218
host:
2217-
description: Host is the hostname to use for Ingress/Route resources.
2219+
description: |-
2220+
Host is the hostname to use for Ingress/Route resources.
2221+
Deprecated: This field is no longer used and will be ignored.
22182222
type: string
22192223
ingress:
2220-
description: Ingress defines the desired state for an Ingress
2221-
for the Prometheus component.
2224+
description: |-
2225+
Ingress defines the desired state for an Ingress for the Prometheus component.
2226+
Deprecated: This field is no longer used and will be ignored.
22222227
properties:
22232228
annotations:
22242229
additionalProperties:
@@ -2270,8 +2275,9 @@ spec:
22702275
- enabled
22712276
type: object
22722277
route:
2273-
description: Route defines the desired state for an OpenShift
2274-
Route for the Prometheus component.
2278+
description: |-
2279+
Route defines the desired state for an OpenShift Route for the Prometheus component.
2280+
Deprecated: This field is no longer used and will be ignored.
22752281
properties:
22762282
annotations:
22772283
additionalProperties:
@@ -2377,7 +2383,9 @@ spec:
23772383
- enabled
23782384
type: object
23792385
size:
2380-
description: Size is the replica count for the Prometheus StatefulSet.
2386+
description: |-
2387+
Size is the replica count for the Prometheus StatefulSet.
2388+
Deprecated: This field is no longer used and will be ignored.
23812389
format: int32
23822390
type: integer
23832391
required:
@@ -18291,15 +18299,20 @@ spec:
1829118299
ArgoCD.
1829218300
properties:
1829318301
enabled:
18294-
description: Enabled will toggle Prometheus support globally for
18295-
ArgoCD.
18302+
description: |-
18303+
Enabled will toggle Prometheus support globally for ArgoCD.
18304+
When set to true, ServiceMonitors and PrometheusRules will be created for Argo CD metrics.
18305+
The Prometheus CR, Route, and Ingress are deprecated and will no longer be created.
1829618306
type: boolean
1829718307
host:
18298-
description: Host is the hostname to use for Ingress/Route resources.
18308+
description: |-
18309+
Host is the hostname to use for Ingress/Route resources.
18310+
Deprecated: This field is no longer used and will be ignored.
1829918311
type: string
1830018312
ingress:
18301-
description: Ingress defines the desired state for an Ingress
18302-
for the Prometheus component.
18313+
description: |-
18314+
Ingress defines the desired state for an Ingress for the Prometheus component.
18315+
Deprecated: This field is no longer used and will be ignored.
1830318316
properties:
1830418317
annotations:
1830518318
additionalProperties:
@@ -18351,8 +18364,9 @@ spec:
1835118364
- enabled
1835218365
type: object
1835318366
route:
18354-
description: Route defines the desired state for an OpenShift
18355-
Route for the Prometheus component.
18367+
description: |-
18368+
Route defines the desired state for an OpenShift Route for the Prometheus component.
18369+
Deprecated: This field is no longer used and will be ignored.
1835618370
properties:
1835718371
annotations:
1835818372
additionalProperties:
@@ -18458,7 +18472,9 @@ spec:
1845818472
- enabled
1845918473
type: object
1846018474
size:
18461-
description: Size is the replica count for the Prometheus StatefulSet.
18475+
description: |-
18476+
Size is the replica count for the Prometheus StatefulSet.
18477+
Deprecated: This field is no longer used and will be ignored.
1846218478
format: int32
1846318479
type: integer
1846418480
required:

0 commit comments

Comments
 (0)