diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8f586d9..2da4683 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,13 +4,13 @@ on: tags: - v* workflow_dispatch: - -permissions: + +permissions: packages: write env: - OCI_URL: ghcr.io/sap + OCI_URL: ghcr.io/openmcp-project jobs: release_tag: @@ -67,7 +67,7 @@ jobs: uses: actions/setup-go@v5 with: go-version-file: go.mod - + - name: Build the ${{ github.repository }} run: | make reviewable @@ -75,7 +75,7 @@ jobs: - name: Build Images run: | - IMG=ghcr.io/sap/metrics-operator:${{ env.version }} make docker-buildx + IMG=ghcr.io/openmcp-project/metrics-operator:${{ env.version }} make docker-buildx - name: setup OCM uses: open-component-model/ocm-setup-action@main @@ -88,4 +88,4 @@ jobs: - name: Push CTF run: | - ocm transfer ctf --overwrite ./ctf ${{ env.OCI_URL }} + ocm transfer ctf --overwrite ./ctf ${{ env.OCI_URL }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba7fa4a..c2d6bf6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,9 +2,9 @@ ## Code of Conduct -All members of the project community must abide by the [SAP Open Source Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md). +All members of the project community must abide by the [SAP Open Source Code of Conduct](https://github.com/openmcp-project/.github/blob/main/CODE_OF_CONDUCT.md). Only by respecting each other we can develop a productive, collaborative community. -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [a project maintainer](.reuse/dep5). +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [ospo@sap.com](mailto:ospo@sap.com) (SAP Open Source Program Office). All complaints will be reviewed and investigated promptly and fairly. ## Engaging in Our Project @@ -30,7 +30,7 @@ The following rule governs code contributions: * Contributions must be licensed under the [Apache 2.0 License](./LICENSE). * Due to legal reasons, contributors will be asked to accept a Developer Certificate of Origin (DCO) when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/). -* Contributions must follow our [guidelines on AI-generated code](https://github.com/SAP/.github/blob/main/CONTRIBUTING_USING_GENAI.md) in case you are using such tools. +* Contributions must follow our [guidelines on AI-generated code](https://github.com/openmcp-project/.github/blob/main/CONTRIBUTING_USING_GENAI.md) in case you are using such tools. ## Issues and Planning diff --git a/PROJECT b/PROJECT index bfd588e..865d51f 100644 --- a/PROJECT +++ b/PROJECT @@ -2,56 +2,56 @@ # This file is used to track the info used to scaffold your project # and allow the plugins properly work. # More info: https://book.kubebuilder.io/reference/project-config.html -domain: metrics.cloud.sap +domain: metrics.openmcp.cloud layout: - go.kubebuilder.io/v4 projectName: metrics-operator -repo: github.com/SAP/metrics-operator +repo: github.com/openmcp-project/metrics-operator resources: - api: crdVersion: v1 namespaced: true controller: true - domain: metrics.cloud.sap + domain: metrics.openmcp.cloud kind: Metric - path: github.com/SAP/metrics-operator/api/v1alpha1 + path: github.com/openmcp-project/metrics-operator/api/v1alpha1 version: v1alpha1 - api: crdVersion: v1 namespaced: true controller: true - domain: metrics.cloud.sap + domain: metrics.openmcp.cloud kind: ManagedMetric - path: github.com/SAP/metrics-operator/api/v1alpha1 + path: github.com/openmcp-project/metrics-operator/api/v1alpha1 version: v1alpha1 - api: crdVersion: v1 namespaced: true - domain: metrics.cloud.sap + domain: metrics.openmcp.cloud kind: RemoteClusterAccess - path: github.com/SAP/metrics-operator/api/v1alpha1 + path: github.com/openmcp-project/metrics-operator/api/v1alpha1 version: v1alpha1 - api: crdVersion: v1 namespaced: true controller: true - domain: metrics.cloud.sap + domain: metrics.openmcp.cloud kind: FederatedMetric - path: github.com/SAP/metrics-operator/api/v1alpha1 + path: github.com/openmcp-project/metrics-operator/api/v1alpha1 version: v1beta1 - api: crdVersion: v1 namespaced: true - domain: metrics.cloud.sap + domain: metrics.openmcp.cloud kind: FederatedClusterAccess - path: github.com/SAP/metrics-operator/api/v1alpha1 + path: github.com/openmcp-project/metrics-operator/api/v1alpha1 version: v1beta1 - api: crdVersion: v1 namespaced: true controller: true - domain: metrics.cloud.sap + domain: metrics.openmcp.cloud kind: FederatedManagedMetric - path: github.com/SAP/metrics-operator/api/v1alpha1 + path: github.com/openmcp-project/metrics-operator/api/v1alpha1 version: v1beta1 version: "3" diff --git a/README.md b/README.md index 5ada932..3ab8ac8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![REUSE status](https://api.reuse.software/badge/github.com/SAP/metrics-operator)](https://api.reuse.software/info/github.com/SAP/metrics-operator) +[![REUSE status](https://api.reuse.software/badge/github.com/openmcp-project/metrics-operator)](https://api.reuse.software/info/github.com/openmcp-project/metrics-operator) # Metrics Operator @@ -144,13 +144,13 @@ graph LR ## Resource Type Descriptions: -- [**Metric**](config/crd/bases/metrics.cloud.sap_metrics.yaml): Monitors specific Kubernetes resources in the local or remote clusters using GroupVersionKind targeting -- [**ManagedMetric**](config/crd/bases/metrics.cloud.sap_managedmetrics.yaml): Specialized for monitoring Crossplane managed resources (resources with "crossplane" and "managed" categories) -- [**FederatedMetric**](config/crd/bases/metrics.cloud.sap_federatedmetrics.yaml): Monitors resources across multiple clusters, aggregating data from federated sources -- [**FederatedManagedMetric**](config/crd/bases/metrics.cloud.sap_federatedmanagedmetrics.yaml): Monitors Crossplane managed resources across multiple clusters -- [**RemoteClusterAccess**](config/crd/bases/metrics.cloud.sap_remoteclusteraccesses.yaml): Provides access configuration for monitoring resources in remote clusters -- [**FederatedClusterAccess**](config/crd/bases/metrics.cloud.sap_federatedclusteraccesses.yaml): Discovers and provides access to multiple clusters for federated monitoring -- [**DataSink**](config/crd/bases/metrics.cloud.sap_datasinks.yaml): Defines where and how metrics data should be sent, supporting various destinations like Dynatrace +- [**Metric**](config/crd/bases/metrics.openmcp.cloud_metrics.yaml): Monitors specific Kubernetes resources in the local or remote clusters using GroupVersionKind targeting +- [**ManagedMetric**](config/crd/bases/metrics.openmcp.cloud_managedmetrics.yaml): Specialized for monitoring Crossplane managed resources (resources with "crossplane" and "managed" categories) +- [**FederatedMetric**](config/crd/bases/metrics.openmcp.cloud_federatedmetrics.yaml): Monitors resources across multiple clusters, aggregating data from federated sources +- [**FederatedManagedMetric**](config/crd/bases/metrics.openmcp.cloud_federatedmanagedmetrics.yaml): Monitors Crossplane managed resources across multiple clusters +- [**RemoteClusterAccess**](config/crd/bases/metrics.openmcp.cloud_remoteclusteraccesses.yaml): Provides access configuration for monitoring resources in remote clusters +- [**FederatedClusterAccess**](config/crd/bases/metrics.openmcp.cloud_federatedclusteraccesses.yaml): Discovers and provides access to multiple clusters for federated monitoring +- [**DataSink**](config/crd/bases/metrics.openmcp.cloud_datasinks.yaml): Defines where and how metrics data should be sent, supporting various destinations like Dynatrace ## Installation @@ -164,7 +164,7 @@ graph LR Deploy the Metrics Operator using the Helm chart: ```bash -helm upgrade --install metrics-operator oci://ghcr.io/sap/github.com/sap/metrics-operator/charts/metrics-operator \ +helm upgrade --install metrics-operator oci://ghcr.io/openmcp-project/github.com/openmcp-project/metrics-operator/charts/metrics-operator \ --namespace \ --create-namespace \ --version= @@ -207,7 +207,7 @@ This can be useful for tracking additional dimensions of the resource, such as f The projections are then translated to dimensions in the metric. ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: metric-pod-count @@ -230,7 +230,7 @@ spec: Managed metrics are used to monitor crossplane managed resources. They automatically track resources that have the "crossplane" and "managed" categories in their CRDs. ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: ManagedMetric metadata: name: managed-metric @@ -248,7 +248,7 @@ spec: Federated metrics deal with resources that are spread across multiple clusters. To monitor these resources, you need to define a `FederatedMetric` resource. They offer capabilities to aggregate data as well as filtering down to a specific cluster or field using projections. ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedMetric metadata: name: xfed-prov @@ -276,7 +276,7 @@ The pre-condition here is that if a resource comes from a crossplane provider, i ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedManagedMetric metadata: name: xfed-managed @@ -300,7 +300,7 @@ The Metrics Operator can monitor both the cluster it's deployed in and remote cl This remote cluster access resource can be used by `Metric` and `ManagedMetric` resources to monitor resources in the remote cluster. ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: RemoteClusterAccess metadata: name: remote-cluster @@ -320,7 +320,7 @@ spec: To monitor resources across multiple clusters, define a `FederatedClusterAccess` resource: ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedClusterAccess metadata: name: federate-ca-sample @@ -388,7 +388,7 @@ The Metrics Operator uses DataSink custom resources to define where and how metr Define a DataSink resource to specify the connection details and authentication for your metrics destination: ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: default @@ -425,7 +425,7 @@ The `DataSinkSpec` contains the following fields: All metric types support the `dataSinkRef` field to specify which DataSink to use: ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: pod-count @@ -495,15 +495,15 @@ For specific instructions on using your data sink's features, refer to its docum ## Support, Feedback, Contributing -This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/metrics-operator/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md). +This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/openmcp-project/metrics-operator/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md). ## Security / Disclosure -If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/SAP/metrics-operator/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems. +If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/openmcp-project/metrics-operator/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems. ## Code of Conduct -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md) at all times. +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/openmcp-project/.github/blob/main/CODE_OF_CONDUCT.md) at all times. ## Licensing -Copyright 2024 SAP SE or an SAP affiliate company and metrics-operator contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/metrics-operator). +Copyright 2025 SAP SE or an SAP affiliate company and metrics-operator contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/openmcp-project/metrics-operator). diff --git a/REUSE.toml b/REUSE.toml index 1e09d95..3687538 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -1,11 +1,10 @@ version = 1 SPDX-PackageName = "metrics-operator" -SPDX-PackageSupplier = "ospo@sap.com" -SPDX-PackageDownloadLocation = "https://github.com/SAP/metrics-operator" +SPDX-PackageDownloadLocation = "https://github.com/openmcp-project/metrics-operator" SPDX-PackageComment = "The code in this project may include calls to APIs (\"API Calls\") of\n SAP or third-party products or services developed outside of this project\n (\"External Products\").\n \"APIs\" means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project's code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third\n parties the right to use of access any SAP External Product, through API Calls." [[annotations]] path = "**" precedence = "aggregate" -SPDX-FileCopyrightText = "2024 SAP SE or an SAP affiliate company and metrics-operator contributors" +SPDX-FileCopyrightText = "2025 SAP SE or an SAP affiliate company and metrics-operator contributors" SPDX-License-Identifier = "Apache-2.0" diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 739b8ef..76f7319 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the insight v1 API group // +kubebuilder:object:generate=true -// +groupName=metrics.cloud.sap +// +groupName=metrics.openmcp.cloud package v1alpha1 import ( @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "metrics.cloud.sap", Version: "v1alpha1"} + GroupVersion = schema.GroupVersion{Group: "metrics.openmcp.cloud", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/charts/metrics-operator/values.yaml b/charts/metrics-operator/values.yaml index fbe68a6..1b367d1 100644 --- a/charts/metrics-operator/values.yaml +++ b/charts/metrics-operator/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: ghcr.io/sap/github.com/sap/metrics-operator/images/metrics-operator + repository: ghcr.io/openmcp-project/github.com/openmcp-project/metrics-operator/images/metrics-operator pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: v0.6.0-dev @@ -108,7 +108,7 @@ rbac: clusterRole: rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - managedmetrics - metrics diff --git a/charts/metrics-operator/values.yaml.tpl b/charts/metrics-operator/values.yaml.tpl index 8c75552..e2a7f54 100644 --- a/charts/metrics-operator/values.yaml.tpl +++ b/charts/metrics-operator/values.yaml.tpl @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: ghcr.io/sap/github.com/sap/metrics-operator/images/metrics-operator + repository: ghcr.io/openmcp-project/github.com/openmcp-project/metrics-operator/images/metrics-operator pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: $OPERATOR_VERSION @@ -108,7 +108,7 @@ rbac: clusterRole: rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - managedmetrics - metrics diff --git a/cmd/embedded/crds/metrics.cloud.sap_datasinks.yaml b/cmd/embedded/crds/metrics.openmcp.cloud_datasinks.yaml similarity index 99% rename from cmd/embedded/crds/metrics.cloud.sap_datasinks.yaml rename to cmd/embedded/crds/metrics.openmcp.cloud_datasinks.yaml index 91f92b7..0718529 100644 --- a/cmd/embedded/crds/metrics.cloud.sap_datasinks.yaml +++ b/cmd/embedded/crds/metrics.openmcp.cloud_datasinks.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: datasinks.metrics.cloud.sap + name: datasinks.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: DataSink listKind: DataSinkList diff --git a/cmd/embedded/crds/metrics.cloud.sap_federatedclusteraccesses.yaml b/cmd/embedded/crds/metrics.openmcp.cloud_federatedclusteraccesses.yaml similarity index 96% rename from cmd/embedded/crds/metrics.cloud.sap_federatedclusteraccesses.yaml rename to cmd/embedded/crds/metrics.openmcp.cloud_federatedclusteraccesses.yaml index 30797df..6c400d4 100644 --- a/cmd/embedded/crds/metrics.cloud.sap_federatedclusteraccesses.yaml +++ b/cmd/embedded/crds/metrics.openmcp.cloud_federatedclusteraccesses.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: federatedclusteraccesses.metrics.cloud.sap + name: federatedclusteraccesses.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: FederatedClusterAccess listKind: FederatedClusterAccessList diff --git a/config/crd/bases/metrics.cloud.sap_federatedmanagedmetrics.yaml b/cmd/embedded/crds/metrics.openmcp.cloud_federatedmanagedmetrics.yaml similarity index 98% rename from config/crd/bases/metrics.cloud.sap_federatedmanagedmetrics.yaml rename to cmd/embedded/crds/metrics.openmcp.cloud_federatedmanagedmetrics.yaml index da337ec..b3fd487 100644 --- a/config/crd/bases/metrics.cloud.sap_federatedmanagedmetrics.yaml +++ b/cmd/embedded/crds/metrics.openmcp.cloud_federatedmanagedmetrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: federatedmanagedmetrics.metrics.cloud.sap + name: federatedmanagedmetrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: FederatedManagedMetric listKind: FederatedManagedMetricList diff --git a/config/crd/bases/metrics.cloud.sap_federatedmetrics.yaml b/cmd/embedded/crds/metrics.openmcp.cloud_federatedmetrics.yaml similarity index 99% rename from config/crd/bases/metrics.cloud.sap_federatedmetrics.yaml rename to cmd/embedded/crds/metrics.openmcp.cloud_federatedmetrics.yaml index 76ba266..d02bfa5 100644 --- a/config/crd/bases/metrics.cloud.sap_federatedmetrics.yaml +++ b/cmd/embedded/crds/metrics.openmcp.cloud_federatedmetrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: federatedmetrics.metrics.cloud.sap + name: federatedmetrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: FederatedMetric listKind: FederatedMetricList diff --git a/cmd/embedded/crds/metrics.cloud.sap_managedmetrics.yaml b/cmd/embedded/crds/metrics.openmcp.cloud_managedmetrics.yaml similarity index 99% rename from cmd/embedded/crds/metrics.cloud.sap_managedmetrics.yaml rename to cmd/embedded/crds/metrics.openmcp.cloud_managedmetrics.yaml index 3c3c554..18254a9 100644 --- a/cmd/embedded/crds/metrics.cloud.sap_managedmetrics.yaml +++ b/cmd/embedded/crds/metrics.openmcp.cloud_managedmetrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: managedmetrics.metrics.cloud.sap + name: managedmetrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: ManagedMetric listKind: ManagedMetricList diff --git a/cmd/embedded/crds/metrics.cloud.sap_metrics.yaml b/cmd/embedded/crds/metrics.openmcp.cloud_metrics.yaml similarity index 99% rename from cmd/embedded/crds/metrics.cloud.sap_metrics.yaml rename to cmd/embedded/crds/metrics.openmcp.cloud_metrics.yaml index eef844f..822ee29 100644 --- a/cmd/embedded/crds/metrics.cloud.sap_metrics.yaml +++ b/cmd/embedded/crds/metrics.openmcp.cloud_metrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: metrics.metrics.cloud.sap + name: metrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: Metric listKind: MetricList diff --git a/cmd/embedded/crds/metrics.cloud.sap_remoteclusteraccesses.yaml b/cmd/embedded/crds/metrics.openmcp.cloud_remoteclusteraccesses.yaml similarity index 97% rename from cmd/embedded/crds/metrics.cloud.sap_remoteclusteraccesses.yaml rename to cmd/embedded/crds/metrics.openmcp.cloud_remoteclusteraccesses.yaml index f8317e2..c2b0fc4 100644 --- a/cmd/embedded/crds/metrics.cloud.sap_remoteclusteraccesses.yaml +++ b/cmd/embedded/crds/metrics.openmcp.cloud_remoteclusteraccesses.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: remoteclusteraccesses.metrics.cloud.sap + name: remoteclusteraccesses.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: RemoteClusterAccess listKind: RemoteClusterAccessList diff --git a/cmd/main.go b/cmd/main.go index b53fe28..bca3225 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -41,9 +41,9 @@ import ( "github.com/openmcp-project/controller-utils/pkg/init/crds" "github.com/openmcp-project/controller-utils/pkg/init/webhooks" - "github.com/SAP/metrics-operator/internal/controller" + "github.com/openmcp-project/metrics-operator/internal/controller" - metricsv1alpha1 "github.com/SAP/metrics-operator/api/v1alpha1" + metricsv1alpha1 "github.com/openmcp-project/metrics-operator/api/v1alpha1" //+kubebuilder:scaffold:imports ) @@ -149,7 +149,7 @@ func main() { Metrics: server.Options{BindAddress: metricsAddr}, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, - LeaderElectionID: "82620e19.orchestrate.cloud.sap", + LeaderElectionID: "82620e19.metrics.openmcp.cloud", Logger: logger, // LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily // when the Manager ends. This requires the binary to immediately end when the diff --git a/config/crd/bases/metrics.cloud.sap_datasinks.yaml b/config/crd/bases/metrics.openmcp.cloud_datasinks.yaml similarity index 99% rename from config/crd/bases/metrics.cloud.sap_datasinks.yaml rename to config/crd/bases/metrics.openmcp.cloud_datasinks.yaml index 91f92b7..0718529 100644 --- a/config/crd/bases/metrics.cloud.sap_datasinks.yaml +++ b/config/crd/bases/metrics.openmcp.cloud_datasinks.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: datasinks.metrics.cloud.sap + name: datasinks.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: DataSink listKind: DataSinkList diff --git a/config/crd/bases/metrics.cloud.sap_federatedclusteraccesses.yaml b/config/crd/bases/metrics.openmcp.cloud_federatedclusteraccesses.yaml similarity index 96% rename from config/crd/bases/metrics.cloud.sap_federatedclusteraccesses.yaml rename to config/crd/bases/metrics.openmcp.cloud_federatedclusteraccesses.yaml index 30797df..6c400d4 100644 --- a/config/crd/bases/metrics.cloud.sap_federatedclusteraccesses.yaml +++ b/config/crd/bases/metrics.openmcp.cloud_federatedclusteraccesses.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: federatedclusteraccesses.metrics.cloud.sap + name: federatedclusteraccesses.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: FederatedClusterAccess listKind: FederatedClusterAccessList diff --git a/cmd/embedded/crds/metrics.cloud.sap_federatedmanagedmetrics.yaml b/config/crd/bases/metrics.openmcp.cloud_federatedmanagedmetrics.yaml similarity index 98% rename from cmd/embedded/crds/metrics.cloud.sap_federatedmanagedmetrics.yaml rename to config/crd/bases/metrics.openmcp.cloud_federatedmanagedmetrics.yaml index da337ec..b3fd487 100644 --- a/cmd/embedded/crds/metrics.cloud.sap_federatedmanagedmetrics.yaml +++ b/config/crd/bases/metrics.openmcp.cloud_federatedmanagedmetrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: federatedmanagedmetrics.metrics.cloud.sap + name: federatedmanagedmetrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: FederatedManagedMetric listKind: FederatedManagedMetricList diff --git a/cmd/embedded/crds/metrics.cloud.sap_federatedmetrics.yaml b/config/crd/bases/metrics.openmcp.cloud_federatedmetrics.yaml similarity index 99% rename from cmd/embedded/crds/metrics.cloud.sap_federatedmetrics.yaml rename to config/crd/bases/metrics.openmcp.cloud_federatedmetrics.yaml index 76ba266..d02bfa5 100644 --- a/cmd/embedded/crds/metrics.cloud.sap_federatedmetrics.yaml +++ b/config/crd/bases/metrics.openmcp.cloud_federatedmetrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: federatedmetrics.metrics.cloud.sap + name: federatedmetrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: FederatedMetric listKind: FederatedMetricList diff --git a/config/crd/bases/metrics.cloud.sap_managedmetrics.yaml b/config/crd/bases/metrics.openmcp.cloud_managedmetrics.yaml similarity index 99% rename from config/crd/bases/metrics.cloud.sap_managedmetrics.yaml rename to config/crd/bases/metrics.openmcp.cloud_managedmetrics.yaml index 3c3c554..18254a9 100644 --- a/config/crd/bases/metrics.cloud.sap_managedmetrics.yaml +++ b/config/crd/bases/metrics.openmcp.cloud_managedmetrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: managedmetrics.metrics.cloud.sap + name: managedmetrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: ManagedMetric listKind: ManagedMetricList diff --git a/config/crd/bases/metrics.cloud.sap_metrics.yaml b/config/crd/bases/metrics.openmcp.cloud_metrics.yaml similarity index 99% rename from config/crd/bases/metrics.cloud.sap_metrics.yaml rename to config/crd/bases/metrics.openmcp.cloud_metrics.yaml index eef844f..822ee29 100644 --- a/config/crd/bases/metrics.cloud.sap_metrics.yaml +++ b/config/crd/bases/metrics.openmcp.cloud_metrics.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: metrics.metrics.cloud.sap + name: metrics.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: Metric listKind: MetricList diff --git a/config/crd/bases/metrics.cloud.sap_remoteclusteraccesses.yaml b/config/crd/bases/metrics.openmcp.cloud_remoteclusteraccesses.yaml similarity index 97% rename from config/crd/bases/metrics.cloud.sap_remoteclusteraccesses.yaml rename to config/crd/bases/metrics.openmcp.cloud_remoteclusteraccesses.yaml index f8317e2..c2b0fc4 100644 --- a/config/crd/bases/metrics.cloud.sap_remoteclusteraccesses.yaml +++ b/config/crd/bases/metrics.openmcp.cloud_remoteclusteraccesses.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.17.2 - name: remoteclusteraccesses.metrics.cloud.sap + name: remoteclusteraccesses.metrics.openmcp.cloud spec: - group: metrics.cloud.sap + group: metrics.openmcp.cloud names: kind: RemoteClusterAccess listKind: RemoteClusterAccessList diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index d7d0c8a..ee8fdd3 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,13 +2,13 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/metrics.cloud.sap_metrics.yaml -- bases/metrics.cloud.sap_managedmetrics.yaml -- bases/metrics.cloud.sap_datasinks.yaml -- bases/metrics.cloud.sap_remoteclusteraccesses.yaml -- bases/metrics.cloud.sap_federatedmetrics.yaml -- bases/metrics.cloud.sap_federatedclusteraccesses.yaml -- bases/metrics.cloud.sap_federatedmanagedmetrics.yaml +- bases/metrics.openmcp.cloud_metrics.yaml +- bases/metrics.openmcp.cloud_managedmetrics.yaml +- bases/metrics.openmcp.cloud_datasinks.yaml +- bases/metrics.openmcp.cloud_remoteclusteraccesses.yaml +- bases/metrics.openmcp.cloud_federatedmetrics.yaml +- bases/metrics.openmcp.cloud_federatedclusteraccesses.yaml +- bases/metrics.openmcp.cloud_federatedmanagedmetrics.yaml #+kubebuilder:scaffold:crdkustomizeresource patches: diff --git a/config/crd/patches/cainjection_in_metrics.yaml b/config/crd/patches/cainjection_in_metrics.yaml index 9360ec2..3d14555 100644 --- a/config/crd/patches/cainjection_in_metrics.yaml +++ b/config/crd/patches/cainjection_in_metrics.yaml @@ -4,4 +4,4 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - name: metrics.metrics.cloud.sap + name: metrics.metrics.openmcp.cloud diff --git a/config/crd/patches/webhook_in_metrics.yaml b/config/crd/patches/webhook_in_metrics.yaml index 9d69741..a45ea87 100644 --- a/config/crd/patches/webhook_in_metrics.yaml +++ b/config/crd/patches/webhook_in_metrics.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: metrics.metrics.cloud.sap + name: metrics.metrics.openmcp.cloud spec: conversion: strategy: Webhook diff --git a/config/rbac/clientconfig_editor_role.yaml b/config/rbac/clientconfig_editor_role.yaml index e7afcee..0df8037 100644 --- a/config/rbac/clientconfig_editor_role.yaml +++ b/config/rbac/clientconfig_editor_role.yaml @@ -12,7 +12,7 @@ metadata: name: clientconfig-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clientconfigs verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clientconfigs/status verbs: diff --git a/config/rbac/clientconfig_viewer_role.yaml b/config/rbac/clientconfig_viewer_role.yaml index 3f14327..29cb68c 100644 --- a/config/rbac/clientconfig_viewer_role.yaml +++ b/config/rbac/clientconfig_viewer_role.yaml @@ -12,7 +12,7 @@ metadata: name: clientconfig-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clientconfigs verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clientconfigs/status verbs: diff --git a/config/rbac/clusteraccess_editor_role.yaml b/config/rbac/clusteraccess_editor_role.yaml index 6a59529..59e167b 100644 --- a/config/rbac/clusteraccess_editor_role.yaml +++ b/config/rbac/clusteraccess_editor_role.yaml @@ -8,7 +8,7 @@ metadata: name: clusteraccess-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clusteraccesses verbs: @@ -20,7 +20,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clusteraccesses/status verbs: diff --git a/config/rbac/clusteraccess_viewer_role.yaml b/config/rbac/clusteraccess_viewer_role.yaml index 5e5437c..66f4ec7 100644 --- a/config/rbac/clusteraccess_viewer_role.yaml +++ b/config/rbac/clusteraccess_viewer_role.yaml @@ -8,7 +8,7 @@ metadata: name: clusteraccess-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clusteraccesses verbs: @@ -16,7 +16,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - clusteraccesses/status verbs: diff --git a/config/rbac/datasink_editor_role.yaml b/config/rbac/datasink_editor_role.yaml index 72d3928..0c6cc5f 100644 --- a/config/rbac/datasink_editor_role.yaml +++ b/config/rbac/datasink_editor_role.yaml @@ -12,7 +12,7 @@ metadata: name: datasink-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - datasinks verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - datasinks/status verbs: diff --git a/config/rbac/datasink_viewer_role.yaml b/config/rbac/datasink_viewer_role.yaml index 4cd6082..685e4ce 100644 --- a/config/rbac/datasink_viewer_role.yaml +++ b/config/rbac/datasink_viewer_role.yaml @@ -12,7 +12,7 @@ metadata: name: datasink-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - datasinks verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - datasinks/status verbs: diff --git a/config/rbac/federatedclusteraccess_editor_role.yaml b/config/rbac/federatedclusteraccess_editor_role.yaml index c4587fb..9e6527c 100644 --- a/config/rbac/federatedclusteraccess_editor_role.yaml +++ b/config/rbac/federatedclusteraccess_editor_role.yaml @@ -8,7 +8,7 @@ metadata: name: federatedclusteraccess-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedclusteraccesses verbs: @@ -20,7 +20,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedclusteraccesses/status verbs: diff --git a/config/rbac/federatedclusteraccess_viewer_role.yaml b/config/rbac/federatedclusteraccess_viewer_role.yaml index c864a59..cd8add6 100644 --- a/config/rbac/federatedclusteraccess_viewer_role.yaml +++ b/config/rbac/federatedclusteraccess_viewer_role.yaml @@ -8,7 +8,7 @@ metadata: name: federatedclusteraccess-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedclusteraccesses verbs: @@ -16,7 +16,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedclusteraccesses/status verbs: diff --git a/config/rbac/federatedmanagedmetric_editor_role.yaml b/config/rbac/federatedmanagedmetric_editor_role.yaml index 489f107..e385329 100644 --- a/config/rbac/federatedmanagedmetric_editor_role.yaml +++ b/config/rbac/federatedmanagedmetric_editor_role.yaml @@ -8,7 +8,7 @@ metadata: name: federatedmanagedmetric-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmanagedmetrics verbs: @@ -20,7 +20,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmanagedmetrics/status verbs: diff --git a/config/rbac/federatedmanagedmetric_viewer_role.yaml b/config/rbac/federatedmanagedmetric_viewer_role.yaml index 9e17be9..56c5ea8 100644 --- a/config/rbac/federatedmanagedmetric_viewer_role.yaml +++ b/config/rbac/federatedmanagedmetric_viewer_role.yaml @@ -8,7 +8,7 @@ metadata: name: federatedmanagedmetric-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmanagedmetrics verbs: @@ -16,7 +16,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmanagedmetrics/status verbs: diff --git a/config/rbac/federatedmetric_editor_role.yaml b/config/rbac/federatedmetric_editor_role.yaml index 649e2cd..9c9c253 100644 --- a/config/rbac/federatedmetric_editor_role.yaml +++ b/config/rbac/federatedmetric_editor_role.yaml @@ -8,7 +8,7 @@ metadata: name: federatedmetric-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmetrics verbs: @@ -20,7 +20,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmetrics/status verbs: diff --git a/config/rbac/federatedmetric_viewer_role.yaml b/config/rbac/federatedmetric_viewer_role.yaml index 254a72e..f375f94 100644 --- a/config/rbac/federatedmetric_viewer_role.yaml +++ b/config/rbac/federatedmetric_viewer_role.yaml @@ -8,7 +8,7 @@ metadata: name: federatedmetric-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmetrics verbs: @@ -16,7 +16,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmetrics/status verbs: diff --git a/config/rbac/managedmetric_editor_role.yaml b/config/rbac/managedmetric_editor_role.yaml index 0aa86d1..d9957f4 100644 --- a/config/rbac/managedmetric_editor_role.yaml +++ b/config/rbac/managedmetric_editor_role.yaml @@ -12,7 +12,7 @@ metadata: name: managedmetric-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - managedmetrics verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - managedmetrics/status verbs: diff --git a/config/rbac/managedmetric_viewer_role.yaml b/config/rbac/managedmetric_viewer_role.yaml index fd862d1..dec8365 100644 --- a/config/rbac/managedmetric_viewer_role.yaml +++ b/config/rbac/managedmetric_viewer_role.yaml @@ -12,7 +12,7 @@ metadata: name: managedmetric-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - managedmetrics verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - managedmetrics/status verbs: diff --git a/config/rbac/metric_editor_role.yaml b/config/rbac/metric_editor_role.yaml index 39cde64..de31172 100644 --- a/config/rbac/metric_editor_role.yaml +++ b/config/rbac/metric_editor_role.yaml @@ -12,7 +12,7 @@ metadata: name: metric-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - metrics verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - metrics/status verbs: diff --git a/config/rbac/metric_viewer_role.yaml b/config/rbac/metric_viewer_role.yaml index 23d5e08..af0e44e 100644 --- a/config/rbac/metric_viewer_role.yaml +++ b/config/rbac/metric_viewer_role.yaml @@ -12,7 +12,7 @@ metadata: name: metric-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - metrics verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - metrics/status verbs: diff --git a/config/rbac/remoteclusteraccess_editor_role.yaml b/config/rbac/remoteclusteraccess_editor_role.yaml index c32954a..861022e 100644 --- a/config/rbac/remoteclusteraccess_editor_role.yaml +++ b/config/rbac/remoteclusteraccess_editor_role.yaml @@ -8,7 +8,7 @@ metadata: name: remoteclusteraccess-editor-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - remoteclusteraccesses verbs: @@ -20,7 +20,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - remoteclusteraccesses/status verbs: diff --git a/config/rbac/remoteclusteraccess_viewer_role.yaml b/config/rbac/remoteclusteraccess_viewer_role.yaml index 2ab022a..8076f87 100644 --- a/config/rbac/remoteclusteraccess_viewer_role.yaml +++ b/config/rbac/remoteclusteraccess_viewer_role.yaml @@ -8,7 +8,7 @@ metadata: name: remoteclusteraccess-viewer-role rules: - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - remoteclusteraccesses verbs: @@ -16,7 +16,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - remoteclusteraccesses/status verbs: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index ff05639..476ffb3 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -11,7 +11,7 @@ rules: verbs: - get - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - datasinks verbs: @@ -19,7 +19,7 @@ rules: - list - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmetrics - managedmetrics @@ -33,7 +33,7 @@ rules: - update - watch - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmetrics/finalizers - managedmetrics/finalizers @@ -41,7 +41,7 @@ rules: verbs: - update - apiGroups: - - metrics.cloud.sap + - metrics.openmcp.cloud resources: - federatedmetrics/status - managedmetrics/status diff --git a/config/samples/insight_v1_managedmetric.yaml b/config/samples/insight_v1_managedmetric.yaml deleted file mode 100644 index 0f4454a..0000000 --- a/config/samples/insight_v1_managedmetric.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: metrics.cloud.sap/v1alpha1 -kind: ManagedMetric -metadata: - labels: - app.kubernetes.io/name: managedmetric - app.kubernetes.io/instance: managedmetric-sample - app.kubernetes.io/part-of: metrics-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: metrics-operator - name: managedmetric-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/insight_v1_metric.yaml b/config/samples/insight_v1_metric.yaml deleted file mode 100644 index 4205316..0000000 --- a/config/samples/insight_v1_metric.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: metrics.cloud.sap/v1alpha1 -kind: Metric -metadata: - labels: - app.kubernetes.io/name: metric - app.kubernetes.io/instance: metric-sample - app.kubernetes.io/part-of: metrics-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: metrics-operator - name: metric-sample -spec: - # TODO(user): Add fields here - label: cloud-orchestration diff --git a/config/samples/insight_v1alpha1_remoteclusteraccess.yaml b/config/samples/insight_v1alpha1_remoteclusteraccess.yaml deleted file mode 100644 index d2b9203..0000000 --- a/config/samples/insight_v1alpha1_remoteclusteraccess.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: orchestrate.cloud.sap/v1alpha1 -kind: RemoteClusterAccess -metadata: - labels: - app.kubernetes.io/name: metrics-operator - app.kubernetes.io/managed-by: kustomize - name: remoteclusteraccess-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/insight_v1beta1_clusteraccess.yaml b/config/samples/insight_v1beta1_clusteraccess.yaml deleted file mode 100644 index 3ef793b..0000000 --- a/config/samples/insight_v1beta1_clusteraccess.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: metrics.cloud.sap/v1beta1 -kind: ClusterAccess -metadata: - labels: - app.kubernetes.io/name: metrics-operator - app.kubernetes.io/managed-by: kustomize - name: clusteraccess-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/insight_v1beta1_federatedclusteraccess.yaml b/config/samples/insight_v1beta1_federatedclusteraccess.yaml deleted file mode 100644 index e8ca4db..0000000 --- a/config/samples/insight_v1beta1_federatedclusteraccess.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: metrics.cloud.sap/v1beta1 -kind: FederatedClusterAccess -metadata: - labels: - app.kubernetes.io/name: metrics-operator - app.kubernetes.io/managed-by: kustomize - name: federatedclusteraccess-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/insight_v1beta1_federatedmanagedmetric.yaml b/config/samples/insight_v1beta1_federatedmanagedmetric.yaml deleted file mode 100644 index 998c6dc..0000000 --- a/config/samples/insight_v1beta1_federatedmanagedmetric.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: metrics.cloud.sap/v1beta1 -kind: FederatedManagedMetric -metadata: - labels: - app.kubernetes.io/name: metrics-operator - app.kubernetes.io/managed-by: kustomize - name: federatedmanagedmetric-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/insight_v1beta1_federatedmetric.yaml b/config/samples/insight_v1beta1_federatedmetric.yaml deleted file mode 100644 index a70c93f..0000000 --- a/config/samples/insight_v1beta1_federatedmetric.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: metrics.cloud.sap/v1beta1 -kind: FederatedMetric -metadata: - labels: - app.kubernetes.io/name: metrics-operator - app.kubernetes.io/managed-by: kustomize - name: federatedmetric-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml deleted file mode 100644 index 48c4790..0000000 --- a/config/samples/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ -## Append samples of your project ## -resources: -- insight_v1alpha1_metric.yaml -- insight_v1alpha1_managedmetric.yaml -- insight_v1alpha1_clientconfig.yaml -- insight_v1alpha1_remoteclusteraccess.yaml -- insight_v1beta1_federatedmetric.yaml -- insight_v1beta1_clusteraccess.yaml -- insight_v1beta1_federatedclusteraccess.yaml -- insight_v1beta1_federatedmanagedmetric.yaml -#+kubebuilder:scaffold:manifestskustomizesamples diff --git a/docs/datasink-configuration.md b/docs/datasink-configuration.md index cda7114..e4ebe3e 100644 --- a/docs/datasink-configuration.md +++ b/docs/datasink-configuration.md @@ -11,7 +11,7 @@ DataSink is a custom resource that defines where and how the Metrics Operator sh ### Complete Example ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: production-dynatrace @@ -106,7 +106,7 @@ kubectl create secret generic dynatrace-production-credentials \ Specify the DataSink to use in your metric resources: ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: pod-metrics @@ -128,7 +128,7 @@ spec: If no `dataSinkRef` is specified, the operator automatically uses a DataSink named "default" in the operator's namespace: ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: pod-metrics-default @@ -151,7 +151,7 @@ You can configure multiple DataSinks for different purposes: ```yaml --- # Development environment DataSink -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: dev-dynatrace @@ -167,7 +167,7 @@ spec: key: api-token --- # Production environment DataSink -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: prod-dynatrace @@ -188,7 +188,7 @@ spec: ```yaml --- # Platform team DataSink -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: platform-metrics @@ -204,7 +204,7 @@ spec: key: api-token --- # Application team DataSink -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: app-metrics @@ -227,7 +227,7 @@ All metric resource types support the `dataSinkRef` field: ### Metric ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: service-count @@ -244,7 +244,7 @@ spec: ### ManagedMetric ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: ManagedMetric metadata: name: crossplane-releases @@ -260,7 +260,7 @@ spec: ### FederatedMetric ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedMetric metadata: name: federated-providers @@ -280,7 +280,7 @@ spec: ### FederatedManagedMetric ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedManagedMetric metadata: name: federated-managed-resources @@ -318,7 +318,7 @@ Now you must use DataSink resources: ```yaml --- # 1. Create the DataSink -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: default @@ -443,7 +443,7 @@ To verify your DataSink configuration is working: DataSink supports any HTTP or gRPC endpoint: ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: custom-endpoint @@ -464,7 +464,7 @@ spec: For gRPC endpoints: ```yaml -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: grpc-endpoint diff --git a/examples/basic_metric.yaml b/examples/basic_metric.yaml index b65e81d..df9d8f0 100644 --- a/examples/basic_metric.yaml +++ b/examples/basic_metric.yaml @@ -1,4 +1,4 @@ -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: basic-metric @@ -15,7 +15,7 @@ spec: # dataSinkRef: # name: default --- -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: basic-pods @@ -31,7 +31,7 @@ spec: - name: pod-namespace fieldPath: "metadata.namespace" --- -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: basic-total-pods diff --git a/examples/datasink/basic-datasink.yaml b/examples/datasink/basic-datasink.yaml index a71f642..c7e87e3 100644 --- a/examples/datasink/basic-datasink.yaml +++ b/examples/datasink/basic-datasink.yaml @@ -1,5 +1,5 @@ # Basic DataSink configuration for Dynatrace -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: DataSink metadata: name: default diff --git a/examples/datasink/metric-using-dynatrace-prod.yaml b/examples/datasink/metric-using-dynatrace-prod.yaml index 8ec100d..85fcf18 100644 --- a/examples/datasink/metric-using-dynatrace-prod.yaml +++ b/examples/datasink/metric-using-dynatrace-prod.yaml @@ -1,5 +1,5 @@ # Metric Custom Resource using Dynatrace Production DataSink -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: Metric metadata: name: example-metric-dynatrace-prod diff --git a/examples/fed-managed-resoruces/crossplane-managed.yaml b/examples/fed-managed-resoruces/crossplane-managed.yaml index 1c5e3d6..6854399 100644 --- a/examples/fed-managed-resoruces/crossplane-managed.yaml +++ b/examples/fed-managed-resoruces/crossplane-managed.yaml @@ -1,4 +1,4 @@ -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedManagedMetric metadata: name: xfed-managed diff --git a/examples/federated-resources/crdsdeletion.yaml b/examples/federated-resources/crdsdeletion.yaml index ec8ab4b..6c16fb7 100644 --- a/examples/federated-resources/crdsdeletion.yaml +++ b/examples/federated-resources/crdsdeletion.yaml @@ -1,4 +1,4 @@ -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedMetric metadata: name: xfed-crds-del diff --git a/examples/federated-resources/entitlements.yaml b/examples/federated-resources/entitlements.yaml index 15f47a6..53cab89 100644 --- a/examples/federated-resources/entitlements.yaml +++ b/examples/federated-resources/entitlements.yaml @@ -1,4 +1,4 @@ -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedMetric metadata: name: xfed-entitlements @@ -6,7 +6,7 @@ spec: name: xfed-entitlements description: entitlements target: - group: account.btp.orchestrate.cloud.sap + group: account.btp.sap.crossplane.io kind: Entitlement version: v1alpha1 interval: "1m" # in minutes diff --git a/examples/federated-resources/serviceinstances.yaml b/examples/federated-resources/serviceinstances.yaml index 9931eb6..6c229a4 100644 --- a/examples/federated-resources/serviceinstances.yaml +++ b/examples/federated-resources/serviceinstances.yaml @@ -1,4 +1,4 @@ -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedMetric metadata: name: xfed-instances diff --git a/examples/federated-resources/subaccounts.yaml b/examples/federated-resources/subaccounts.yaml index 8ca22a7..dc2b1cc 100644 --- a/examples/federated-resources/subaccounts.yaml +++ b/examples/federated-resources/subaccounts.yaml @@ -1,4 +1,4 @@ -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: FederatedMetric metadata: name: xfed-subaccounts @@ -6,7 +6,7 @@ spec: name: xfed-subaccounts description: subaccounts target: - group: account.btp.orchestrate.cloud.sap + group: account.btp.sap.crossplane.io kind: Subaccount version: v1alpha1 interval: "1m" # in minutes diff --git a/examples/managed_metric.yaml b/examples/managed_metric.yaml index 50af461..1680e83 100644 --- a/examples/managed_metric.yaml +++ b/examples/managed_metric.yaml @@ -1,4 +1,4 @@ -apiVersion: metrics.cloud.sap/v1alpha1 +apiVersion: metrics.openmcp.cloud/v1alpha1 kind: ManagedMetric metadata: name: managed-metric diff --git a/go.mod b/go.mod index 6f6eac2..8d86645 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/SAP/metrics-operator +module github.com/openmcp-project/metrics-operator go 1.23.0 diff --git a/internal/clientoptl/optel_test.go b/internal/clientoptl/optel_test.go deleted file mode 100644 index 26684ef..0000000 --- a/internal/clientoptl/optel_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package clientoptl - -import ( - "context" - "testing" -) - -func TestNewMetricClient_Real(t *testing.T) { - t.Skip("skipping test") - client, err := NewMetricClient(context.TODO(), "https://canary.eu21.apm.services.cloud.sap/e/1b9c6fb0-eb17-4fce-96b0-088cee0861b3/api/v2/otlp/v1/metrics", "dt0c01..") - - if err != nil { - t.Errorf("Failed to create OTLP exporter: %v", err) - } - - client.SetMeter("federated") - - mr, err := client.NewMetric("xmirza") - - if err != nil { - t.Errorf("Failed to create metric: %v", err) - } - - dp1 := NewDataPoint().AddDimension("location", "US").AddDimension("provider", "Azure").SetValue(3) - dp2 := NewDataPoint().AddDimension("location", "EU").AddDimension("provider", "GCP").SetValue(5) - dp3 := NewDataPoint().AddDimension("location", "AU").AddDimension("provider", "AWS").SetValue(7) - - err = mr.RecordMetrics(context.TODO(), dp1, dp2, dp3) - if err != nil { - t.Errorf("Failed to record metrics: %v", err) - } - err = client.ExportMetrics(context.Background()) - if err != nil { - t.Errorf("Failed to record metrics: %v", err) - } -} diff --git a/internal/common/conditions.go b/internal/common/conditions.go index 16b9d77..dcb0518 100644 --- a/internal/common/conditions.go +++ b/internal/common/conditions.go @@ -3,7 +3,7 @@ package common import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/SAP/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" ) // Creating returns a condition that indicates the resource being monitored is currently being created diff --git a/internal/config/external_config.go b/internal/config/external_config.go index 9349101..9805f41 100644 --- a/internal/config/external_config.go +++ b/internal/config/external_config.go @@ -21,8 +21,8 @@ import ( "k8s.io/client-go/tools/clientcmd" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/orchestrator" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/orchestrator" ) const ( diff --git a/internal/config/external_config_test.go b/internal/config/external_config_test.go index f36b700..9bed736 100644 --- a/internal/config/external_config_test.go +++ b/internal/config/external_config_test.go @@ -12,8 +12,8 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - insight "github.com/SAP/metrics-operator/api/v1alpha1" - orc "github.com/SAP/metrics-operator/internal/orchestrator" + insight "github.com/openmcp-project/metrics-operator/api/v1alpha1" + orc "github.com/openmcp-project/metrics-operator/internal/orchestrator" ) // MockClient is a custom mock implementation of client.Client diff --git a/internal/controller/datasink_utils.go b/internal/controller/datasink_utils.go index 819b1ed..dce0e23 100644 --- a/internal/controller/datasink_utils.go +++ b/internal/controller/datasink_utils.go @@ -28,8 +28,8 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/common" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/common" ) // DataSinkCredentialsRetriever provides common functionality for retrieving DataSink credentials diff --git a/internal/controller/federatedmanagedmetric_controller.go b/internal/controller/federatedmanagedmetric_controller.go index 33a0bfb..e6c3d9f 100644 --- a/internal/controller/federatedmanagedmetric_controller.go +++ b/internal/controller/federatedmanagedmetric_controller.go @@ -31,11 +31,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" - "github.com/SAP/metrics-operator/internal/common" - "github.com/SAP/metrics-operator/internal/config" - orc "github.com/SAP/metrics-operator/internal/orchestrator" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/internal/common" + "github.com/openmcp-project/metrics-operator/internal/config" + orc "github.com/openmcp-project/metrics-operator/internal/orchestrator" ) // NewFederatedManagedMetricReconciler creates a new FederatedManagedMetricReconciler @@ -102,10 +102,10 @@ func (r *FederatedManagedMetricReconciler) shouldReconcile(metric *v1alpha1.Fede } // Reconcile reads that state of the cluster for a FederatedManagedMetric object -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=federatedmanagedmetrics,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=federatedmanagedmetrics/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=federatedmanagedmetrics/finalizers,verbs=update -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=datasinks,verbs=get;list;watch +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=federatedmanagedmetrics,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=federatedmanagedmetrics/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=federatedmanagedmetrics/finalizers,verbs=update +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=datasinks,verbs=get;list;watch // +kubebuilder:rbac:groups="",resources=secrets,verbs=get // //nolint:gocyclo diff --git a/internal/controller/federatedmetric_controller.go b/internal/controller/federatedmetric_controller.go index 84023ae..756b1a8 100644 --- a/internal/controller/federatedmetric_controller.go +++ b/internal/controller/federatedmetric_controller.go @@ -31,11 +31,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" - "github.com/SAP/metrics-operator/internal/common" - "github.com/SAP/metrics-operator/internal/config" - orc "github.com/SAP/metrics-operator/internal/orchestrator" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/internal/common" + "github.com/openmcp-project/metrics-operator/internal/config" + orc "github.com/openmcp-project/metrics-operator/internal/orchestrator" ) // NewFederatedMetricReconciler creates a new FederatedMetricReconciler @@ -102,10 +102,10 @@ func shouldReconcile(metric *v1alpha1.FederatedMetric) bool { return elapsed >= metric.Spec.Interval.Duration } -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=federatedmetrics,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=federatedmetrics/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=federatedmetrics/finalizers,verbs=update -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=datasinks,verbs=get;list;watch +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=federatedmetrics,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=federatedmetrics/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=federatedmetrics/finalizers,verbs=update +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=datasinks,verbs=get;list;watch // +kubebuilder:rbac:groups="",resources=secrets,verbs=get // Reconcile handles the reconciliation of the FederatedMetric object diff --git a/internal/controller/managedmetric_controller.go b/internal/controller/managedmetric_controller.go index cd23ea9..aaac045 100644 --- a/internal/controller/managedmetric_controller.go +++ b/internal/controller/managedmetric_controller.go @@ -32,15 +32,15 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/SAP/metrics-operator/internal/clientoptl" - "github.com/SAP/metrics-operator/internal/common" - "github.com/SAP/metrics-operator/internal/config" - "github.com/SAP/metrics-operator/internal/orchestrator" "github.com/go-logr/logr" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/internal/common" + "github.com/openmcp-project/metrics-operator/internal/config" + "github.com/openmcp-project/metrics-operator/internal/orchestrator" ctrl "sigs.k8s.io/controller-runtime" - "github.com/SAP/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" ) // NewManagedMetricReconciler creates a new ManagedMetricReconciler @@ -91,10 +91,10 @@ func (r *ManagedMetricReconciler) getDataSinkCredentials(ctx context.Context, ma return retriever.GetDataSinkCredentials(ctx, managedMetric.Spec.DataSinkRef, managedMetric, l) } -//+kubebuilder:rbac:groups=metrics.cloud.sap,resources=managedmetrics,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=metrics.cloud.sap,resources=managedmetrics/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=metrics.cloud.sap,resources=managedmetrics/finalizers,verbs=update -//+kubebuilder:rbac:groups=metrics.cloud.sap,resources=datasinks,verbs=get;list;watch +//+kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=managedmetrics,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=managedmetrics/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=managedmetrics/finalizers,verbs=update +//+kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=datasinks,verbs=get;list;watch //+kubebuilder:rbac:groups="",resources=secrets,verbs=get // Reconcile is part of the main kubernetes reconciliation loop which aims to diff --git a/internal/controller/metric_controller.go b/internal/controller/metric_controller.go index 4bd5dd4..da15aed 100644 --- a/internal/controller/metric_controller.go +++ b/internal/controller/metric_controller.go @@ -31,11 +31,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" - "github.com/SAP/metrics-operator/internal/common" - "github.com/SAP/metrics-operator/internal/config" - orc "github.com/SAP/metrics-operator/internal/orchestrator" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/internal/common" + "github.com/openmcp-project/metrics-operator/internal/config" + orc "github.com/openmcp-project/metrics-operator/internal/orchestrator" ) const ( @@ -109,10 +109,10 @@ func (r *MetricReconciler) handleGetError(err error, log logr.Logger) (ctrl.Resu return ctrl.Result{RequeueAfter: RequeueAfterError}, err } -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=metrics,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=metrics/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=metrics/finalizers,verbs=update -// +kubebuilder:rbac:groups=metrics.cloud.sap,resources=datasinks,verbs=get;list;watch +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=metrics,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=metrics/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=metrics/finalizers,verbs=update +// +kubebuilder:rbac:groups=metrics.openmcp.cloud,resources=datasinks,verbs=get;list;watch // +kubebuilder:rbac:groups="",resources=secrets,verbs=get // Reconcile handles the reconciliation of a Metric object diff --git a/internal/controller/metric_controller_test.go b/internal/controller/metric_controller_test.go index 0f954a2..06c0d27 100644 --- a/internal/controller/metric_controller_test.go +++ b/internal/controller/metric_controller_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/common" - orc "github.com/SAP/metrics-operator/internal/orchestrator" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/common" + orc "github.com/openmcp-project/metrics-operator/internal/orchestrator" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/internal/orchestrator/federatedhandler.go b/internal/orchestrator/federatedhandler.go index 120bd05..95d6c3e 100644 --- a/internal/orchestrator/federatedhandler.go +++ b/internal/orchestrator/federatedhandler.go @@ -15,8 +15,8 @@ import ( "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" ) // NewFederatedHandler creates a new FederatedHandler diff --git a/internal/orchestrator/federatedmanagedhandler.go b/internal/orchestrator/federatedmanagedhandler.go index 7190e34..001f906 100644 --- a/internal/orchestrator/federatedmanagedhandler.go +++ b/internal/orchestrator/federatedmanagedhandler.go @@ -14,8 +14,8 @@ import ( "k8s.io/client-go/dynamic" rcli "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" ) // NewFederatedManagedHandler creates a new FederatedManagedHandler diff --git a/internal/orchestrator/managedhandler.go b/internal/orchestrator/managedhandler.go index 2aa43be..1aaaf08 100644 --- a/internal/orchestrator/managedhandler.go +++ b/internal/orchestrator/managedhandler.go @@ -14,8 +14,8 @@ import ( "k8s.io/client-go/dynamic" rcli "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" ) // ManagedHandler is used to monitor the metric diff --git a/internal/orchestrator/metrichandler.go b/internal/orchestrator/metrichandler.go index 39ae333..a63e21d 100644 --- a/internal/orchestrator/metrichandler.go +++ b/internal/orchestrator/metrichandler.go @@ -13,8 +13,8 @@ import ( "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" ) // MetricHandler is used to monitor a metric diff --git a/internal/orchestrator/monitorresult.go b/internal/orchestrator/monitorresult.go index 8741688..8ba0894 100644 --- a/internal/orchestrator/monitorresult.go +++ b/internal/orchestrator/monitorresult.go @@ -1,8 +1,8 @@ package orchestrator import ( - insight "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/extensions" + insight "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/extensions" ) // MonitorResult is used to monitor the metric diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go index 3af74a8..55a6851 100644 --- a/internal/orchestrator/orchestrator.go +++ b/internal/orchestrator/orchestrator.go @@ -6,9 +6,9 @@ import ( "k8s.io/client-go/rest" rcli "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/SAP/metrics-operator/api/v1alpha1" - "github.com/SAP/metrics-operator/internal/clientoptl" - "github.com/SAP/metrics-operator/internal/common" + "github.com/openmcp-project/metrics-operator/api/v1alpha1" + "github.com/openmcp-project/metrics-operator/internal/clientoptl" + "github.com/openmcp-project/metrics-operator/internal/common" ) const ( diff --git a/settings.yaml b/settings.yaml index 3d611f3..29f6a71 100644 --- a/settings.yaml +++ b/settings.yaml @@ -1,4 +1,4 @@ COMPONENT_NAME: metrics-operator -COMPONENT_NAME_PREFIX: github.com/sap +COMPONENT_NAME_PREFIX: github.com/openmcp-project PROVIDER: openmcp-project -COMPONENT_REPO_PREFIX: ghcr.io/sap/metrics-operator +COMPONENT_REPO_PREFIX: ghcr.io/openmcp-project/metrics-operator