Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v2/checluster_types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2019-2023 Red Hat, Inc.
// Copyright (c) 2019-2026 Red Hat, Inc.
// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
2 changes: 1 addition & 1 deletion api/v2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions build/scripts/clear-defined-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,15 @@ declare -A ignored_paths=(
["go.podman.io/storage"]="Harvesting is in progress"
["golang.org/x/tools/go/packages/packagestest"]="Harvesting is in progress"
["google.golang.org/genproto"]="Harvesting is in progress"
["k8s.io/api"]="Harvesting is in progress"
["k8s.io/apiextensions-apiserver"]="Harvesting is in progress"
["k8s.io/apimachinery"]="Harvesting is in progress"
["k8s.io/apiserver"]="Harvesting is in progress"
["k8s.io/client-go"]="Harvesting is in progress"
["k8s.io/code-generator"]="Harvesting is in progress"
["k8s.io/component-base"]="Harvesting is in progress"
["k8s.io/kms"]="Harvesting is in progress"
["k8s.io/kube-aggregator"]="Harvesting is in progress"
["k8s.io/utils"]="Harvesting is in progress"
["k8s.io/kube-openapi"]="Harvesting is in progress"
["sigs.k8s.io/controller-tools"]="Harvesting is in progress"
["github.com/prometheus-operator/prometheus-operator"]="Harvesting is in progress"
)

declare -A ignored_paths_licenses=(
Expand Down Expand Up @@ -190,16 +188,10 @@ declare -A ignored_paths_licenses=(
["golang.org/x/tools/go/packages/packagestest"]="BSD-3-Clause"
# https://github.com/googleapis/go-genproto?tab=Apache-2.0-1-ov-file
["google.golang.org/genproto"]="Apache-2.0"
# https://github.com/kubernetes/api?tab=Apache-2.0-1-ov-file
["k8s.io/api"]="Apache-2.0"
# https://github.com/kubernetes/apiextensions-apiserver?tab=Apache-2.0-1-ov-file
["k8s.io/apiextensions-apiserver"]="Apache-2.0"
# https://github.com/kubernetes/apimachinery?tab=Apache-2.0-1-ov-file
["k8s.io/apimachinery"]="Apache-2.0"
# https://github.com/kubernetes/apiserver?tab=Apache-2.0-1-ov-file
["k8s.io/apiserver"]="Apache-2.0"
# https://github.com/kubernetes/client-go?tab=Apache-2.0-1-ov-file
["k8s.io/client-go"]="Apache-2.0"
# https://github.com/kubernetes/code-generator?tab=Apache-2.0-1-ov-file
["k8s.io/code-generator"]="Apache-2.0"
# https://github.com/kubernetes/component-base?tab=Apache-2.0-1-ov-file
Expand All @@ -208,10 +200,12 @@ declare -A ignored_paths_licenses=(
["k8s.io/kms"]="Apache-2.0"
# https://github.com/kubernetes/kube-aggregator?tab=Apache-2.0-1-ov-file
["k8s.io/kube-aggregator"]="Apache-2.0"
# https://github.com/kubernetes/utils?tab=Apache-2.0-1-ov-file
["k8s.io/utils"]="Apache-2.0"
# https://github.com/kubernetes/kube-openapi?tab=Apache-2.0-1-ov-file
["k8s.io/kube-openapi"]="Apache-2.0"
# https://github.com/kubernetes-sigs/controller-tools?tab=Apache-2.0-1-ov-file
["sigs.k8s.io/controller-tools"]="Apache-2.0"
# https://github.com/prometheus-operator/prometheus-operator?tab=Apache-2.0-1-ov-file
["github.com/prometheus-operator/prometheus-operator"]="Apache-2.0"
)

declare -A declared_licenses=(
Expand Down
4 changes: 2 additions & 2 deletions build/scripts/docker-run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2019-2023 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down Expand Up @@ -29,7 +29,7 @@ init() {
build() {
printf "%bBuilding image %b${IMAGE_NAME}${NC}..." "${BOLD}" "${BLUE}"
if docker build -t ${IMAGE_NAME} > docker-build-log 2>&1 -<<EOF
FROM docker.io/golang:1.24-bookworm
FROM docker.io/golang:1.25-bookworm
RUN apt update && apt install python3-pip skopeo jq rsync unzip -y && \
pip install --break-system-packages yq && \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
Expand Down
2 changes: 1 addition & 1 deletion bundle/next/eclipse-che/bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down Expand Up @@ -86,7 +86,7 @@ metadata:
categories: Developer Tools
certified: "false"
containerImage: quay.io/eclipse/che-operator:next
createdAt: "2026-04-30T14:29:49Z"
createdAt: "2026-05-13T08:40:26Z"
description: A Kube-native development solution that delivers portable and collaborative
developer workspaces.
features.operators.openshift.io/cnf: "false"
Expand All @@ -108,7 +108,7 @@ metadata:
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.arm64: supported
operatorframework.io/os.linux: supported
name: eclipse-che.v7.117.0-975.next
name: eclipse-che.v7.118.0-979.next
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -908,7 +908,18 @@ spec:
- servicemonitors
verbs:
- get
- watch
- list
- create
- delete
- apiGroups:
- ""
resources:
- endpoints
verbs:
- get
- watch
- list
serviceAccountName: che-operator
deployments:
- label:
Expand Down Expand Up @@ -1144,7 +1155,7 @@ spec:
name: gateway-authorization-sidecar-k8s
- image: quay.io/che-incubator/header-rewrite-proxy:latest
name: gateway-header-sidecar
version: 7.117.0-975.next
version: 7.118.0-979.next
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
2 changes: 1 addition & 1 deletion bundle/next/eclipse-che/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
2 changes: 1 addition & 1 deletion bundle/next/eclipse-che/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
11 changes: 10 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2019-2025 Red Hat, Inc.
// Copyright (c) 2019-2026 Red Hat, Inc.
// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/
Expand All @@ -21,6 +21,7 @@ import (
"github.com/eclipse-che/che-operator/pkg/common/infrastructure"
oauthv1 "github.com/openshift/api/oauth/v1"
userv1 "github.com/openshift/api/user/v1"
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
"sigs.k8s.io/controller-runtime/pkg/webhook"

"github.com/eclipse-che/che-operator/controllers/namespacecache"
Expand Down Expand Up @@ -143,6 +144,10 @@ func init() {
utilruntime.Must(templatev1.Install(scheme))
}

if infrastructure.IsServiceMonitorEnabled() {
utilruntime.Must(monitoringv1.AddToScheme(scheme))
}

// User and OAuthClient API are disabled in case of external IDP
// Check API before adding to the scheme
if infrastructure.IsOpenShiftOAuthEnabled() {
Expand Down Expand Up @@ -391,6 +396,10 @@ func getCacheFunc() (cache.NewCacheFunc, error) {
selectors[&templatev1.Template{}] = cache.ByObject{Label: partOfCheObjectSelector}
}

if infrastructure.IsServiceMonitorEnabled() {
selectors[&monitoringv1.ServiceMonitor{}] = cache.ByObject{Label: partOfCheObjectSelector}
}

if infrastructure.IsOpenShiftOAuthEnabled() {
selectors[&oauthv1.OAuthClient{}] = cache.ByObject{Label: partOfCheObjectSelector}
}
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/org.eclipse.che_checlusters.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
13 changes: 12 additions & 1 deletion config/rbac/cluster_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,15 @@ rules:
- servicemonitors
verbs:
- get
- create
- watch
- list
- create
- delete
Comment thread
tolusha marked this conversation as resolved.
- apiGroups:
- ''
resources:
- endpoints
verbs:
- get
- watch
- list
12 changes: 11 additions & 1 deletion controllers/che/checluster_controller.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2019-2025 Red Hat, Inc.
// Copyright (c) 2019-2026 Red Hat, Inc.
// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/
Expand All @@ -19,6 +19,8 @@ import (
"github.com/eclipse-che/che-operator/pkg/common/constants"
k8sclient "github.com/eclipse-che/che-operator/pkg/common/k8s-client"
"github.com/eclipse-che/che-operator/pkg/common/reconciler"
"github.com/eclipse-che/che-operator/pkg/deploy/metrics"
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/controller"

Expand Down Expand Up @@ -127,6 +129,10 @@ func NewReconciler(
reconcilerManager.AddReconciler(consolelink.NewConsoleLinkReconciler())
}

if infrastructure.IsServiceMonitorEnabled() {
reconcilerManager.AddReconciler(metrics.NewMetricsReconciler())
}

return &CheClusterReconciler{
Scheme: scheme,
Log: ctrl.Log.WithName("controllers").WithName("CheCluster"),
Expand Down Expand Up @@ -182,6 +188,10 @@ func (r *CheClusterReconciler) SetupWithManager(mgr ctrl.Manager) error {
bld.Owns(&networking.Ingress{})
}

if infrastructure.IsServiceMonitorEnabled() {
bld.Owns(&monitoringv1.ServiceMonitor{})
}

if r.namespace != "" {
bld = bld.WithEventFilter(utils.InNamespaceEventFilter(r.namespace))
}
Expand Down
13 changes: 12 additions & 1 deletion deploy/deployment/kubernetes/combined.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down Expand Up @@ -23181,7 +23181,18 @@ rules:
- servicemonitors
verbs:
- get
- watch
- list
- create
- delete
- apiGroups:
- ""
resources:
- endpoints
verbs:
- get
- watch
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down Expand Up @@ -385,4 +385,15 @@ rules:
- servicemonitors
verbs:
- get
- watch
- list
- create
- delete
- apiGroups:
- ""
resources:
- endpoints
verbs:
- get
- watch
- list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019-2024 Red Hat, Inc.
# Copyright (c) 2019-2026 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand Down
Loading
Loading