Giter VIP home page Giter VIP logo

epam / edp-sonar-operator Goto Github PK

View Code? Open in Web Editor NEW
8.0 7.0 5.0 1.23 MB

It installs the Sonar EDP Component on a cluster for continuous inspection of a codebase code quality

Home Page: https://solutionshub.epam.com/solution/epam-delivery-platform

License: Apache License 2.0

Dockerfile 0.32% Groovy 0.09% Go 96.25% Smarty 0.58% Makefile 2.69% Shell 0.07%
ci cd cicd edp sonar sonar-operator operator kubernetes k8s quality-gate

edp-sonar-operator's Introduction

codecov

Sonar Operator

โ— Please refer to EDP documentation to get the notion of the main concepts and guidelines.

Get acquainted with the Sonar Operator and the installation process as well as the local development, and architecture scheme.

Overview

Sonar Operator is an EDP operator that is responsible for configuring SonarQube.

NOTE: Operator is platform-independent, that is why there is a unified instruction for deploying.

Prerequisites

  1. Linux machine or Windows Subsystem for Linux instance with Helm 3 installed;
  2. Cluster admin access to the cluster;

Installation

In order to install the EDP Sonar Operator, follow the steps below:

  1. To add the Helm EPAMEDP Charts for local client, run "helm repo add":

    helm repo add epamedp https://epam.github.io/edp-helm-charts/stable
  2. Choose available Helm chart version:

    helm search repo epamedp/sonar-operator -l
    NAME                    CHART VERSION   APP VERSION     DESCRIPTION
    epamedp/sonar-operator  3.1.1           3.1.1           A Helm chart for EDP Sonar Operator
    epamedp/sonar-operator  3.1.0           3.1.0           A Helm chart for EDP Sonar Operator

    NOTE: It is highly recommended to use the latest released version.

  3. Deploy operator:

    Full available chart parameters available in deploy-templates/README.md:

  4. Install operator in the arbitrary (sonar-operator) namespace with the helm command; find below the installation command example:

    helm install sonar-operator epamedp/sonar-operator --version <chart_version> --namespace sonar
  5. Check the sonar namespace that should contain operator deployment with your operator in a running status.

Quick Start

  1. Login into Sonarqube and create user. Attach permissions to user such as quality gates, profiles, user managment etc. Insert user credentials into Kubernetes secret.

    apiVersion: v1
    kind: Secret
    metadata:
      name:  sonar-access
    type: Opaque
    data:
      username: dXNlcg==  # base64-encoded value of "user"
      password: cGFzcw==  # base64-encoded value of "pass"
  2. Create Custom Resource kind: Sonar with Sonar instance URL and secret created on the previous step:

    apiVersion: edp.epam.com/v1alpha1
    kind: Sonar
    metadata:
      name: sonar-sample
    spec:
      url: https://sonar.example.com   # Sonar URL
      secret: sonar-access             # Secret name

    Wait for the .status field with status.connected: true

  3. Create Quality Gate using Custom Resources SonarQualityGate:

    apiVersion: edp.epam.com/v1alpha1
     kind: SonarQualityGate
     metadata:
       name: qualityGate-sample
     spec:
       sonarRef:
         name: sonar-sample # the name of `kind: Sonar`
       name: qualityGate-sample
       default: true
       conditions:
         new_coverage:
         op: LT
         error: "80"
    apiVersion: edp.epam.com/v1alpha1
    kind: SonarQualityProfile
    metadata:
      name: qualityProfile-sample
    spec:
      sonarRef:
        name: sonar-sample # the name of `kind: Sonar`
      name: qualityProfile-sample
      language: java
      default: true
      rules:
        checkstyle:com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck:
        severity: 'MAJOR'

    Inspect CR templates folder for more examples

Local Development

In order to develop the operator, first set up a local environment. For details, please refer to the Local Development page.

Development versions are also available, please refer to the snapshot helm chart repository page.

Related Articles

edp-sonar-operator's People

Contributors

aleksandr-morozov avatar artem-zahumonnyi avatar blobor avatar dependabot[bot] avatar elluvium avatar iryna-churkina avatar mykhailo-b avatar mykysha avatar nikolaymarusenko avatar orfey95 avatar sergk avatar sugar-pack avatar totalalfie avatar victormysyk avatar viktor-voronin avatar yevheniipokhvalii avatar zmotso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

edp-sonar-operator's Issues

Automate rekor uuid in release tag

Acceptance Criteria:

  • as a result of release pipeline we need to automate 'Deployment Certifications and Source Traceability' section creation in release tag;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.