kandi background
Explore Kits

sonarqube | Continuous Inspection | Code Analyzer library

 by   SonarSource Java Version: 9.4.0.54424 License: LGPL-3.0

 by   SonarSource Java Version: 9.4.0.54424 License: LGPL-3.0

Download this library from

kandi X-RAY | sonarqube Summary

sonarqube is a Java library typically used in Code Quality, Code Analyzer applications. sonarqube has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has high support. You can download it from GitHub, Maven.
SonarQube [![Build Status](https://app.travis-ci.com/SonarSource/sonarqube.svg?branch=master)](https://app.travis-ci.com/SonarSource/sonarqube) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=org.sonarsource.sonarqube%3Asonarqube&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.sonarsource.sonarqube%3Asonarqube).
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • sonarqube has a highly active ecosystem.
  • It has 6650 star(s) with 1649 fork(s). There are 303 watchers for this library.
  • There were 1 major release(s) in the last 6 months.
  • sonarqube has no issues reported. There are 1 open pull requests and 0 closed requests.
  • It has a negative sentiment in the developer community.
  • The latest version of sonarqube is 9.4.0.54424
sonarqube Support
Best in #Code Analyzer
Average in #Code Analyzer
sonarqube Support
Best in #Code Analyzer
Average in #Code Analyzer

quality kandi Quality

  • sonarqube has 0 bugs and 0 code smells.
sonarqube Quality
Best in #Code Analyzer
Average in #Code Analyzer
sonarqube Quality
Best in #Code Analyzer
Average in #Code Analyzer

securitySecurity

  • sonarqube has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • sonarqube code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
sonarqube Security
Best in #Code Analyzer
Average in #Code Analyzer
sonarqube Security
Best in #Code Analyzer
Average in #Code Analyzer

license License

  • sonarqube is licensed under the LGPL-3.0 License. This license is Weak Copyleft.
  • Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.
sonarqube License
Best in #Code Analyzer
Average in #Code Analyzer
sonarqube License
Best in #Code Analyzer
Average in #Code Analyzer

buildReuse

  • sonarqube releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • sonarqube saves you 1187803 person hours of effort in developing the same functionality from scratch.
  • It has 539567 lines of code, 51223 functions and 9563 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
sonarqube Reuse
Best in #Code Analyzer
Average in #Code Analyzer
sonarqube Reuse
Best in #Code Analyzer
Average in #Code Analyzer
Top functions reviewed by kandi - BETA

kandi has reviewed sonarqube and discovered the below as its top functions. This is intended to give you an instant insight into sonarqube implemented functionality, and help decide if they suit your requirements.

  • Configures the level .
  • Initialize the GUI .
  • A list of component classes .
  • Add scanner components .
  • Build filter map .
  • Define XOO tags .
  • Define generic rule search parameters .
  • Populate level 4 classes .
  • Finds all clones of the given collection .
  • Build the manual transitions .

sonarqube Key Features

Continuous Inspection

default

copy iconCopydownload iconDownload
SonarQube provides the capability to not only show health of an application but also to highlight issues newly introduced. With a Quality Gate in place, you can [Clean As You Code](https://blog.sonarsource.com/clean-as-you-code) and therefore improve code quality systematically.

Links
-----

* [Website](https://www.sonarqube.org)
* [Download](https://www.sonarqube.org/downloads/)
* [Documentation](https://docs.sonarqube.org)
* [Twitter](https://twitter.com/SonarQube)
* [SonarSource](https://www.sonarsource.com), author of SonarQube
* [Issue tracking](https://jira.sonarsource.com/browse/SONAR/), read-only. Only SonarSourcers can create tickets.
* [Responsible Disclosure](https://community.sonarsource.com/t/responsible-vulnerability-disclosure/9317)
* [Dogfood](https://next.sonarqube.com/sonarqube) instance of the next SonarQube version

Have Question or Feedback?
--------------------------

For support questions ("How do I?", "I got this error, why?", ...), please first read the [documentation](https://docs.sonarqube.org) and then head to the [SonarSource Community](https://community.sonarsource.com/c/help/sq/10). The answer to your question has likely already been answered! 🤓

Be aware that this forum is a community, so the standard pleasantries ("Hi", "Thanks", ...) are expected. And if you don't get an answer to your thread, you should sit on your hands for at least three days before bumping it. Operators are not standing by. 😄


Contributing
------------

If you would like to see a new feature, please create a new Community thread: ["Suggest new features"](https://community.sonarsource.com/c/suggestions/features).

Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes.

With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make.

Make sure that you follow our [code style](https://github.com/SonarSource/sonar-developer-toolset#code-style) and all tests are passing (Travis build is executed for each pull request).

Willing to contribute to SonarSource products? We are looking for smart, passionate, and skilled people to help us build world-class code quality solutions. Have a look at our current [job offers here](https://www.sonarsource.com/company/jobs/)!

Building
--------

To build sources locally follow these instructions.

### Build and Run Unit Tests

Execute from project base directory:

    ./gradlew build

The zip distribution file is generated in `sonar-application/build/distributions/`. Unzip it and start server by executing:

    # on linux
    bin/linux-x86-64/sonar.sh start
    # or on MacOS
    bin/macosx-universal-64/sonar.sh start
    # or on Windows
    bin\windows-x86-64\StartSonar.bat

### Open in IDE

If the project has never been built, then build it as usual (see previous section) or use the quicker command:

    ./gradlew ide

Then open the root file `build.gradle` as a project in Intellij or Eclipse.

### Gradle Hints

| ./gradlew command | Description |
|---|---|
| `dependencies`| list dependencies |
| `dependencyCheckAnalyze` | list vulnerable dependencies |
| `dependencyUpdates` | list the dependencies that could be updated |
| `licenseFormat --rerun-tasks` | fix source headers by applying HEADER.txt |
| `wrapper --gradle-version 5.2.1` | upgrade wrapper |

License
-------

Copyright 2008-2021 SonarSource.

Licensed under the [GNU Lesser General Public License, Version 3.0](https://www.gnu.org/licenses/lgpl.txt)

How to set different parameters for different branches in azure pipeline using yml file

copy iconCopydownload iconDownload
variables:
  isDevelopment: $[eq(variables['Build.SourceBranch'], 'refs/heads/development')]

stages:
- stage: A
  jobs:
  - job: A1
    steps:
      - script: echo Hello Stage A!

- stage: B
  condition: and(succeeded(), eq(variables.isDevelopment, 'true'))
  jobs:
  - job: B1
    steps:
      - script: echo Hello Stage B!
      - script: echo $(isDevelopment)

How can I disable "TLS InsecureSkipVerify may be true" error

copy iconCopydownload iconDownload
if cfg.GetRedisTLS() { // #nosec G402
    clientOpts.TLSConfig = &tls.Config{
        MinVersion: tls.VersionTLS12,
        InsecureSkipVerify: cfg.GetRedisInsecure(),
    }
}

SonarQube Not Updating Report - "Line 5 is out of range for file Program.cs. File has 4 lines"

copy iconCopydownload iconDownload
dotnet sonarscanner end /d:sonar.login="<TOKEN>"
dotnet sonarscanner begin /k:"project-key" /d:sonar.login="<token>"
dotnet build <path to solution.sln>
dotnet sonarscanner end /d:sonar.login="<TOKEN>"
-----------------------
dotnet sonarscanner end /d:sonar.login="<TOKEN>"
dotnet sonarscanner begin /k:"project-key" /d:sonar.login="<token>"
dotnet build <path to solution.sln>
dotnet sonarscanner end /d:sonar.login="<TOKEN>"

Regular expression to determine key

copy iconCopydownload iconDownload
/^(?=.{3,60}$)[a-z]+(?:\.[a-z]+)+$/i
/^(?=.{3,60}$)\p{L}+(?:\.\p{L}+)+$/u

Blank Page in Kubernetes Ingress

copy iconCopydownload iconDownload
kubectl get ing -n ingress-nginx
kubectl get ing -n argocd
kubectl get deploy argocd-server -o yaml -n argocd > argocd-server-deployment.yaml
containers:
- command:
  - argocd-server
  env:
containers:
- command:
  - argocd-server
  - --rootpath=/argo-cd
  env:
annotations:
  kubernetes.io/ingress.class: nginx
  nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  nginx.ingress.kubernetes.io/ssl-passthrough: "true"
  nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
-----------------------
kubectl get ing -n ingress-nginx
kubectl get ing -n argocd
kubectl get deploy argocd-server -o yaml -n argocd > argocd-server-deployment.yaml
containers:
- command:
  - argocd-server
  env:
containers:
- command:
  - argocd-server
  - --rootpath=/argo-cd
  env:
annotations:
  kubernetes.io/ingress.class: nginx
  nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  nginx.ingress.kubernetes.io/ssl-passthrough: "true"
  nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
-----------------------
kubectl get ing -n ingress-nginx
kubectl get ing -n argocd
kubectl get deploy argocd-server -o yaml -n argocd > argocd-server-deployment.yaml
containers:
- command:
  - argocd-server
  env:
containers:
- command:
  - argocd-server
  - --rootpath=/argo-cd
  env:
annotations:
  kubernetes.io/ingress.class: nginx
  nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  nginx.ingress.kubernetes.io/ssl-passthrough: "true"
  nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
-----------------------
kubectl get ing -n ingress-nginx
kubectl get ing -n argocd
kubectl get deploy argocd-server -o yaml -n argocd > argocd-server-deployment.yaml
containers:
- command:
  - argocd-server
  env:
containers:
- command:
  - argocd-server
  - --rootpath=/argo-cd
  env:
annotations:
  kubernetes.io/ingress.class: nginx
  nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  nginx.ingress.kubernetes.io/ssl-passthrough: "true"
  nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
-----------------------
kubectl get ing -n ingress-nginx
kubectl get ing -n argocd
kubectl get deploy argocd-server -o yaml -n argocd > argocd-server-deployment.yaml
containers:
- command:
  - argocd-server
  env:
containers:
- command:
  - argocd-server
  - --rootpath=/argo-cd
  env:
annotations:
  kubernetes.io/ingress.class: nginx
  nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  nginx.ingress.kubernetes.io/ssl-passthrough: "true"
  nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"

Error: Exception in thread &quot;Daemon health stats&quot; java.lang.OutOfMemoryError: Java heap space

copy iconCopydownload iconDownload
org.gradle.jvmargs=-Xmx1g

SonarQube keeps complaining about Use try-with-resources or close this &quot;PreparedStatement&quot; in a &quot;finally&quot; clause

copy iconCopydownload iconDownload
public String getUserEmail(String id) throws SQLException {
        String emailAddress = null;
        String sql = "select email from my_table where id=?";
        try(PreparedStatement preparedStatement = this.connection.prepareStatement(sql)) {
            preparedStatement.setString(1, id);
            ResultSet rs = preparedStatement.executeQuery();
            while (rs.next()) {
                emailAddress = rs.getString("email");
            }
        } catch(SQLException e) {
            throw new TuringClientException("Failed to getUserEmail. ", e);
        }
        return emailAddress;
    }
-----------------------
public String getUserEmail(String id) throws SQLException {
    String emailAddress = null;
    String sql = "select email from my_table where id=?";
    try (PreparedStatement preparedStatement = this.connection.prepareStatement(sql) {
        preparedStatement.setString(1, id);
        try (ResultSet rs = preparedStatement.executeQuery()) {
            while (rs.next()) {
                emailAddress = rs.getString("email");
            }
        } catch(SQLException e) {
            throw new TuringClientException("Failed to getUserEmail. ", e);
        }
    }
    return emailAddress;
}

How to send .coverage file to SonarCloud

copy iconCopydownload iconDownload
dotnet sonarscanner begin /k:"myKey" /d:sonar.login="myToken" /o:"myOrg" /d:sonar.cs.vscoveragexml.reportsPaths="C:\TestResults\DotnetCoverage.coveragexml"

dotnet build "pathToSLN"

dotnet test --collect "Code Coverage" --results-directory "C:\TestResults"

CodeCoverage.exe analyze /output:"C:\TestResults\DotnetCoverage.coveragexml" "C:\TestResults\c887677b-b89e-4222-93e4-09e563b48b7a\randomGeneratedFileName.coverage"

dotnet sonarscanner end /d:sonar.login="myToken" 

sonarQube fails to generate coverage file

copy iconCopydownload iconDownload
        <!-- Dependencies needed for creating SonarQube coverage reports -->
         <plugin>
             <groupId>org.jacoco</groupId>
             <artifactId>jacoco-maven-plugin</artifactId>
             <version>0.8.7</version>
             <executions>
                 <execution>
                     <id>prepare-agent</id>
                     <goals>
                         <goal>prepare-agent</goal>
                     </goals>
                 </execution>
                 <execution>
                     <id>report</id>
                     <phase>prepare-package</phase>
                     <goals>
                         <goal>report</goal>
                     </goals>
                 </execution>
                 <execution>
                     <id>post-unit-test</id>
                     <phase>test</phase>
                     <goals>
                         <goal>report</goal>
                     </goals>
                     <configuration>
                         <!-- Sets the path to the file which contains the execution data. -->
                         <dataFile>target/jacoco.exec</dataFile>
                         <!-- Sets the output directory for the code coverage report. -->
                         <outputDirectory>target/jacoco-ut</outputDirectory>
                     </configuration>
                 </execution>
             </executions>
             <configuration>
                 <systemPropertyVariables>
                     <jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
                 </systemPropertyVariables>
             </configuration>
         </plugin>

Issue with Self-signed certificate with Cert-Manager in Kubernetes

copy iconCopydownload iconDownload
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block
-----------------------
$ kubectl apply -f cluster-alpha.yaml
Warning: cert-manager.io/v1alpha2 ClusterIssuer is deprecated in v1.4+, unavailable in v1.6+; use cert-manager.io/v1 ClusterIssuer
$ kubectl apply -f clusterissuer.yaml
clusterissuer.cert-manager.io/selfsigned created

$ kubectl get clusterissuer
NAME         READY   AGE
selfsigned   True    11s
$ kubectl apply -f cert.yaml
certificate.cert-manager.io/selfsigned-certificate created

$ kubectl get cert
NAME                     READY   SECRET                             AGE
selfsigned-certificate   True    hello-deployment-tls-ca-key-pair   7s
$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   False   6s
selfsigned             True    3m50
$ kubectl describe clusterissuer hello-deployment-tls
...
Events:
  Type     Reason         Age                From          Message
  ----     ------         ----               ----          -------
  Warning  ErrGetKeyPair  10s (x5 over 75s)  cert-manager  Error getting keypair for CA issuer: secret "hello-deployment-tls-ca-key-pair" not found
  Warning  ErrInitIssuer  10s (x5 over 75s)  cert-manager  Error initializing issuer: secret "hello-deployment-tls-ca-key-pair" not found
$ kubectl edit deploy cert-manager -n cert-manager

spec:
  containers:
  - args:
    - --v=2
    - --cluster-resource-namespace=default
$ kubectl delete -f clusterissuer2.yaml
clusterissuer.cert-manager.io "hello-deployment-tls" deleted

$ kubectl apply -f clusterissuer2.yaml
clusterissuer.cert-manager.io/hello-deployment-tls created

$ kubectl get clusterissuer
NAME                   READY   AGE
hello-deployment-tls   True    3s
selfsigned             True    5m42s
$ kubectl apply -f cert2.yaml
certificate.cert-manager.io/selfsigned-certificate2 created

$ kubectl get cert
NAME                      READY   SECRET                              AGE
selfsigned-certificate    True    hello-deployment-tls-ca-key-pair    33s
selfsigned-certificate2   True    hello-deployment-tls-ca-key-pair2   6s

$ kubectl get certificaterequest
NAME                            APPROVED   DENIED   READY   ISSUER                 REQUESTOR                                         AGE
selfsigned-certificate-jj98f    True                True    selfsigned             system:serviceaccount:cert-manager:cert-manager   52s
selfsigned-certificate2-jwq5c   True                True    hello-deployment-tls   system:serviceaccount:cert-manager:cert-manager   25s
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Warning  BadConfig  5s    cert-manager              TLS entry 0 is invalid: secret "example-cert" for ingress TLS has no hosts specified
Events:
  Type     Reason             Age                From                      Message
  ----     ------             ----               ----                      -------
Normal   CreateCertificate  4s                 cert-manager              Successfully created Certificate "example-cert"
$ kubectl describe certificaterequest selfsigned-certificate2-45k2c

Events:
  Type     Reason           Age   From          Message
  ----     ------           ----  ----          -------
  Normal   cert-manager.io  41s   cert-manager  Certificate request has been approved by cert-manager.io
  Warning  DecodeError      41s   cert-manager  Failed to decode returned certificate: error decoding certificate PEM block

Community Discussions

Trending Discussions on sonarqube
  • SonarQube Docker Installation CorruptIndexException: checksum failed
  • How to set different parameters for different branches in azure pipeline using yml file
  • Aggregate SonarQube Maven analysis for multiple jobs in GitLab CI pipeline
  • ERROR: Error during SonarScanner execution org.sonar.java.AnalysisException:
  • How can I disable &quot;TLS InsecureSkipVerify may be true&quot; error
  • Jenkins pipeline sonarqube quality gate webhook didn't match the configured webhook secret
  • SonarQube Not Updating Report - &quot;Line 5 is out of range for file Program.cs. File has 4 lines&quot;
  • SonarQube cannot parse Pylint output
  • Regular expression to determine key
  • Code coverage on Android/Kotlin with Kover and Sonar differs on percents
Trending Discussions on sonarqube

QUESTION

SonarQube Docker Installation CorruptIndexException: checksum failed

Asked 2022-Mar-31 at 08:20

I'm trying to create docker container with SonarQube inside it, but I get this error while composing for the first time:

Caused by: java.util.concurrent.ExecutionException: org.apache.lucene.index.CorruptIndexException: checksum failed (hardware problem?) : expected=f736ed01 actual=298dcde2 (resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/opt/sonarqube/data/es7/nodes/0/_state/_7w.fdt")))

I tried installing it on a fresh instance with fresh docker installation, I even tried to install it on a different server to rule out hardware failure, and I still get the same error. What could be the cause of it?

docker-compose.yml

version: "3"

services:
  sonarqube:
    image: sonarqube:community
    depends_on:
      - db
    environment:
      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
      SONAR_JDBC_USERNAME: sonar
      SONAR_JDBC_PASSWORD: sonar
    volumes:
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_logs:/opt/sonarqube/logs
    ports:
      - "9000:9000"
  db:
    image: postgres:12
    environment:
      POSTGRES_USER: sonar
      POSTGRES_PASSWORD: sonar
    volumes:
      - postgresql:/var/lib/postgresql
      - postgresql_data:/var/lib/postgresql/data

volumes:
  sonarqube_data:
  sonarqube_extensions:
  sonarqube_logs:
  postgresql:
  postgresql_data:

ANSWER

Answered 2022-Mar-31 at 08:20

Solved it by using image: sonarqube:9.2.4-developer

Source https://stackoverflow.com/questions/71679132

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install sonarqube

You can download it from GitHub, Maven.
You can use sonarqube like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the sonarqube component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.