{"id":28533516,"url":"https://github.com/epam/edp-sonar-operator","last_synced_at":"2025-07-07T20:31:18.741Z","repository":{"id":37442823,"uuid":"324032039","full_name":"epam/edp-sonar-operator","owner":"epam","description":"It installs the Sonar EDP Component on a cluster for continuous inspection of a codebase code quality","archived":false,"fork":false,"pushed_at":"2025-05-16T15:08:15.000Z","size":1372,"stargazers_count":8,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-09T17:07:21.934Z","etag":null,"topics":["cd","ci","cicd","custom-resource","edp","k8s","kubernetes","kuberocketci","operator","quality-gate","sonar","sonar-operator","sonar-scanner-cli","sonarqube","sonarqube-plugin"],"latest_commit_sha":null,"homepage":"https://docs.kuberocketci.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG-pre-2.14.1.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-2.0","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-24T00:49:25.000Z","updated_at":"2025-05-16T15:00:57.000Z","dependencies_parsed_at":"2023-02-16T06:31:30.195Z","dependency_job_id":"5ec5072f-f2ff-4474-bdfe-551506c1ab0d","html_url":"https://github.com/epam/edp-sonar-operator","commit_stats":null,"previous_names":[],"tags_count":446,"template":false,"template_full_name":null,"purl":"pkg:github/epam/edp-sonar-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epam%2Fedp-sonar-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epam%2Fedp-sonar-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epam%2Fedp-sonar-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epam%2Fedp-sonar-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epam","download_url":"https://codeload.github.com/epam/edp-sonar-operator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epam%2Fedp-sonar-operator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264142573,"owners_count":23563522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cd","ci","cicd","custom-resource","edp","k8s","kubernetes","kuberocketci","operator","quality-gate","sonar","sonar-operator","sonar-scanner-cli","sonarqube","sonarqube-plugin"],"created_at":"2025-06-09T17:07:21.511Z","updated_at":"2025-07-07T20:31:18.728Z","avatar_url":"https://github.com/epam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/epam/edp-sonar-operator/branch/master/graph/badge.svg?token=ILSDY1GF7W)](https://codecov.io/gh/epam/edp-sonar-operator)\n\n# Sonar Operator\n\n| :heavy_exclamation_mark: Please refer to [KubeRocketCI documentation](https://docs.kuberocketci.io/) to get the notion of the main concepts and guidelines. |\n| --- |\n\nGet acquainted with the Sonar Operator and the installation process as well as the local development, and architecture scheme.\n\n## Overview\n\nSonar Operator is a KubeRocketCI operator that is responsible for configuring SonarQube.\n\n_**NOTE:** Operator is platform-independent, that is why there is a unified instruction for deploying._\n\n## Prerequisites\n\n1. Linux machine or Windows Subsystem for Linux instance with [Helm 3](https://helm.sh/docs/intro/install/) installed;\n2. Cluster admin access to the cluster;\n\n## Installation\n\nIn order to install the KubeRocketCI Sonar Operator, follow the steps below:\n\n1. To add the Helm EPAMEDP Charts for local client, run \"helm repo add\":\n\n     ```bash\n     helm repo add epamedp https://epam.github.io/edp-helm-charts/stable\n     ```\n\n2. Choose available Helm chart version:\n\n     ```bash\n     helm search repo epamedp/sonar-operator -l\n     NAME                    CHART VERSION   APP VERSION     DESCRIPTION\n     epamedp/sonar-operator  3.1.1           3.1.1           A Helm chart for KRCI Sonar Operator\n     ```\n\n    _**NOTE:** It is highly recommended to use the latest released version._\n\n3. Deploy operator:\n\n    Full available chart parameters available in [deploy-templates/README.md](deploy-templates/README.md):\n\n4. Install operator in the arbitrary (`sonar-operator`) namespace with the helm command; find below the installation command example:\n\n    ```bash\n    helm install sonar-operator epamedp/sonar-operator --version \u003cchart_version\u003e --namespace sonar\n    ```\n\n5. Check the `sonar` namespace that should contain operator deployment with your operator in a running status.\n\n## Quick Start\n\n1. Login into Sonarqube and create user. Attach permissions to user such as quality gates, profiles, user managment etc. Insert user credentials into Kubernetes secret.\n\n    ```yaml\n    apiVersion: v1\n    kind: Secret\n    metadata:\n      name:  sonar-access\n    type: Opaque\n    data:\n      username: dXNlcg==  # base64-encoded value of \"user\"\n      password: cGFzcw==  # base64-encoded value of \"pass\"\n    ```\n\n2. Create Custom Resource `kind: Sonar` with Sonar instance URL and secret created on the previous step:\n\n    ```yaml\n    apiVersion: edp.epam.com/v1alpha1\n    kind: Sonar\n    metadata:\n      name: sonar-sample\n    spec:\n      url: https://sonar.example.com   # Sonar URL\n      secret: sonar-access             # Secret name\n    ```\n\n    Wait for the `.status` field with  `status.connected: true`\n\n4. Create Quality Gate using Custom Resources SonarQualityGate:\n\n   ```yaml\n   apiVersion: edp.epam.com/v1alpha1\n    kind: SonarQualityGate\n    metadata:\n      name: qualityGate-sample\n    spec:\n      sonarRef:\n        name: sonar-sample # the name of `kind: Sonar`\n      name: qualityGate-sample\n      default: true\n      conditions:\n        new_coverage:\n        op: LT\n        error: \"80\"\n    ```\n\n    ```yaml\n    apiVersion: edp.epam.com/v1alpha1\n    kind: SonarQualityProfile\n    metadata:\n      name: qualityProfile-sample\n    spec:\n      sonarRef:\n        name: sonar-sample # the name of `kind: Sonar`\n      name: qualityProfile-sample\n      language: java\n      default: true\n      rules:\n        checkstyle:com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck:\n        severity: 'MAJOR'\n    ```\n\n    Inspect [CR templates folder](./deploy-templates/_crd_examples/) for more examples\n\n## Local Development\n\nIn order to develop the operator, first set up a local environment. For details, please refer to the [Local Development](https://docs.kuberocketci.io/docs/developer-guide/local-development) page.\n\nDevelopment versions are also available, please refer to the [snapshot helm chart repository](https://epam.github.io/edp-helm-charts/snapshot/) page.\n\n### Related Articles\n\n- [Install KubeRocketCI](https://docs.kuberocketci.io/docs/operator-guide/install-kuberocketci)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepam%2Fedp-sonar-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepam%2Fedp-sonar-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepam%2Fedp-sonar-operator/lists"}