Skip to content

Commit 2d71186

Browse files
authored
upgrade sonarqube version 10.6.1 to 2025.2.0. (#19) (#20)
* upgrade sonarqube chart version and app version from 10.6.1 to 2025.2.0. * add monitoring passcode in call module * add data migration job
1 parent 19db97f commit 2d71186

File tree

12 files changed

+160
-109
lines changed

12 files changed

+160
-109
lines changed

.tflint.hcl

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ plugin "aws" {
55
}
66

77
config {
8-
#Enables module inspection
9-
module = false
10-
force = false
8+
# Enables module inspection (Updated to the correct attribute)
9+
call_module_type = "none"
10+
force = false
1111
}
1212

1313
# Required that all AWS resources have specified tags.
@@ -19,94 +19,93 @@ rule "aws_resource_missing_tags" {
1919
]
2020
}
2121

22-
# Disallow deprecated (0.11-style) interpolation
22+
# Disallow deprecated (0.11-style) interpolation.
2323
rule "terraform_deprecated_interpolation" {
24-
enabled = true
24+
enabled = true
2525
}
2626

2727
# Disallow legacy dot index syntax.
2828
rule "terraform_deprecated_index" {
29-
enabled = true
29+
enabled = true
3030
}
3131

3232
# Disallow variables, data sources, and locals that are declared but never used.
3333
rule "terraform_unused_declarations" {
34-
enabled = true
34+
enabled = true
3535
}
3636

3737
# Disallow // comments in favor of #.
3838
rule "terraform_comment_syntax" {
39-
enabled = false
39+
enabled = false
4040
}
4141

4242
# Disallow output declarations without description.
4343
rule "terraform_documented_outputs" {
44-
enabled = true
44+
enabled = true
4545
}
4646

4747
# Disallow variable declarations without description.
4848
rule "terraform_documented_variables" {
49-
enabled = true
49+
enabled = true
5050
}
5151

5252
# Disallow variable declarations without type.
5353
rule "terraform_typed_variables" {
54-
enabled = true
54+
enabled = true
5555
}
5656

5757
# Disallow specifying a git or mercurial repository as a module source without pinning to a version.
5858
rule "terraform_module_pinned_source" {
59-
enabled = true
59+
enabled = true
6060
}
6161

62-
# Enforces naming conventions
62+
# Enforces naming conventions.
6363
rule "terraform_naming_convention" {
64-
enabled = true
64+
enabled = true
6565

66-
#Require specific naming structure
67-
variable {
68-
format = "snake_case"
69-
}
66+
# Require specific naming structure.
67+
variable {
68+
format = "snake_case"
69+
}
7070

71-
locals {
72-
format = "snake_case"
73-
}
71+
locals {
72+
format = "snake_case"
73+
}
7474

75-
output {
76-
format = "snake_case"
77-
}
75+
output {
76+
format = "snake_case"
77+
}
7878

79-
#Allow any format
80-
resource {
81-
format = "none"
82-
}
79+
# Allow any format.
80+
resource {
81+
format = "none"
82+
}
8383

84-
module {
85-
format = "none"
86-
}
87-
88-
data {
89-
format = "none"
90-
}
84+
module {
85+
format = "none"
86+
}
9187

88+
data {
89+
format = "none"
90+
}
9291
}
9392

9493
# Disallow terraform declarations without require_version.
9594
rule "terraform_required_version" {
96-
enabled = true
95+
enabled = true
9796
}
9897

9998
# Require that all providers have version constraints through required_providers.
10099
rule "terraform_required_providers" {
101-
enabled = true
100+
enabled = true
102101
}
103102

104-
# Ensure that a module complies with the Terraform Standard Module Structure
103+
# Ensure that a module complies with the Terraform Standard Module Structure.
105104
rule "terraform_standard_module_structure" {
106-
enabled = true
105+
enabled = true
107106
}
108107

109108
# terraform.workspace should not be used with a "remote" backend with remote execution.
110109
rule "terraform_workspace_remote" {
111-
enabled = true
110+
enabled = true
112111
}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,19 @@ No modules.
7272
| Name | Type |
7373
|------|------|
7474
| [helm_release.sonarqube](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
75+
| [kubernetes_manifest.migration_job](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/manifest) | resource |
7576
| [kubernetes_namespace.sonarqube](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource |
77+
| [random_password.monitoringPasscode](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
7678
| [random_password.postgresql_password](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
7779
| [random_password.sonarqube_password](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
7880

7981
## Inputs
8082

8183
| Name | Description | Type | Default | Required |
8284
|------|-------------|------|---------|:--------:|
83-
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | Version of the Jenkins chart that will be used to deploy Jenkins application. | `string` | `"10.6.1"` | no |
85+
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | Version of the Jenkins chart that will be used to deploy Jenkins application. | `string` | `"2025.2.0"` | no |
8486
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Name of the Kubernetes namespace where the Jenkins deployment will be deployed. | `string` | `"sonarqube"` | no |
85-
| <a name="input_sonarqube_config"></a> [sonarqube\_config](#input\_sonarqube\_config) | Specify the configuration settings for Sonarqube, including the hostname, storage options, and custom YAML values. | `any` | <pre>{<br> "grafana_monitoring_enabled": false,<br> "hostname": "",<br> "postgresql_external_server_url": "",<br> "postgresql_password_external": "",<br> "postgresql_volume_size": "",<br> "sonarqube_volume_size": "",<br> "storage_class_name": "",<br> "values_yaml": ""<br>}</pre> | no |
87+
| <a name="input_sonarqube_config"></a> [sonarqube\_config](#input\_sonarqube\_config) | Specify the configuration settings for Sonarqube, including the hostname, storage options, and custom YAML values. | `any` | <pre>{<br/> "grafana_monitoring_enabled": false,<br/> "hostname": "",<br/> "postgresql_external_server_url": "",<br/> "postgresql_password_external": "",<br/> "postgresql_volume_size": "",<br/> "sonarqube_volume_size": "",<br/> "storage_class_name": "",<br/> "values_yaml": ""<br/>}</pre> | no |
8688

8789
## Outputs
8890

examples/complete/aws/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ No requirements.
5050

5151
| Name | Source | Version |
5252
|------|--------|---------|
53-
54-
| <a name="module_sonarqube"></a> [sonarqube](#module\_sonarqube) | squareops/sonarqube/kubernetes | 3.0.1 |
53+
| <a name="module_sonarqube"></a> [sonarqube](#module\_sonarqube) | squareops/sonarqube/kubernetes | 3.1.0 |
5554

5655
## Resources
5756

examples/complete/aws/helm/values.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
resources:
22
limits:
3-
cpu: 500m
4-
memory: 2Gi
3+
cpu: 700m
4+
memory: 6144M
55
requests:
6-
cpu: 200m
7-
memory: 1.5Gi
6+
cpu: 300m
7+
memory: 2048M
8+
89
affinity:
910
nodeAffinity:
1011
requiredDuringSchedulingIgnoredDuringExecution:

examples/complete/aws/main.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ locals {
1010
}
1111

1212
module "sonarqube" {
13-
source = "squareops/sonarqube/kubernetes"
14-
version = "3.0.1"
13+
source = "squareops/sonarqube/kubernetes"
14+
version = "3.1.0"
1515
sonarqube_config = {
1616
hostname = "sonarqube.squareops.in"
1717
values_yaml = file("./helm/values.yaml")
1818
storage_class_name = "gp2"
1919
sonarqube_volume_size = "5Gi"
20-
postgresql_volume_size = "20Gi"
20+
postgresql_volume_size = "10Gi"
2121
grafana_monitoring_enabled = false
22+
monitoringPasscode = "xxxxxxx"
23+
sonarqube_current_password = "xxxxxxx" # if you upgrade sonarqube then you have to provide your previous sonarqube password ##Secret name=sonarqube-postgresql
24+
postgresql_current_password = "xxxxxxxxxxx" # if you upgrade sonarqube then you have to provide your previous postgresql password ##Secret name=sonarqube-sonarqube-admin-password
2225
postgresql_password_external = ""
2326
postgresql_external_server_url = ""
2427
}

examples/complete/azure/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ No requirements.
5050

5151
| Name | Source | Version |
5252
|------|--------|---------|
53-
| <a name="module_sonarqube"></a> [sonarqube](#module\_sonarqube) | squareops/sonarqube/kubernetes | 3.0.1 |
53+
| <a name="module_sonarqube"></a> [sonarqube](#module\_sonarqube) | squareops/sonarqube/kubernetes | 3.1.0 |
5454

5555
## Resources
5656

examples/complete/azure/main.tf

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
locals {
2-
name = "sonarqube"
2+
name = ""
33
region = ""
4-
environment = "prod"
4+
environment = ""
55
additional_tags = {
66
Owner = "organization_name"
77
Expires = "Never"
@@ -10,16 +10,19 @@ locals {
1010
}
1111

1212
module "sonarqube" {
13-
source = "squareops/sonarqube/kubernetes"
14-
version = "3.0.1"
13+
source = "squareops/sonarqube/kubernetes"
14+
version = "3.1.0"
1515
sonarqube_config = {
16-
hostname = "sonarqube.skaf.squareops.in"
16+
hostname = "sonarqube.squareops.in"
1717
values_yaml = file("./helm/values.yaml")
18-
storage_class_name = "infra-service-sc"
18+
storage_class_name = "gp2"
1919
sonarqube_volume_size = "5Gi"
20-
postgresql_volume_size = "20Gi"
20+
postgresql_volume_size = "10Gi"
2121
grafana_monitoring_enabled = false
22-
postgresql_password_external = "admin"
22+
monitoringPasscode = "xxxxxxx"
23+
sonarqube_current_password = "xxxxxxx" # if you upgrade sonarqube then you have to provide your previous sonarqube password ##Secret name=sonarqube-postgresql
24+
postgresql_current_password = "xxxxxxxxxxx" # if you upgrade sonarqube then you have to provide your previous postgresql password ##Secret name=sonarqube-sonarqube-admin-password
25+
postgresql_password_external = ""
2326
postgresql_external_server_url = ""
2427
}
2528
}

examples/complete/gcp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ No requirements.
5050

5151
| Name | Source | Version |
5252
|------|--------|---------|
53-
| <a name="module_sonarqube"></a> [sonarqube](#module\_sonarqube) | squareops/sonarqube/kubernetes | 3.0.1 |
53+
| <a name="module_sonarqube"></a> [sonarqube](#module\_sonarqube) | squareops/sonarqube/kubernetes | 3.1.0 |
5454

5555
## Resources
5656

examples/complete/gcp/main.tf

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
locals {
2-
name = "sonarqube"
2+
name = ""
33
region = ""
4-
environment = "prod"
4+
environment = ""
55
additional_tags = {
66
Owner = "organization_name"
77
Expires = "Never"
@@ -10,15 +10,18 @@ locals {
1010
}
1111

1212
module "sonarqube" {
13-
source = "squareops/sonarqube/kubernetes"
14-
version = "3.0.1"
13+
source = "squareops/sonarqube/kubernetes"
14+
version = "3.1.0"
1515
sonarqube_config = {
1616
hostname = "sonarqube.squareops.in"
1717
values_yaml = file("./helm/values.yaml")
1818
storage_class_name = "gp2"
1919
sonarqube_volume_size = "5Gi"
20-
postgresql_volume_size = "20Gi"
20+
postgresql_volume_size = "10Gi"
2121
grafana_monitoring_enabled = false
22+
monitoringPasscode = "xxxxxxx"
23+
sonarqube_current_password = "xxxxxxx" # if you upgrade sonarqube then you have to provide your previous sonarqube password ##Secret name=sonarqube-postgresql
24+
postgresql_current_password = "xxxxxxxxxxx" # if you upgrade sonarqube then you have to provide your previous postgresql password ##Secret name=sonarqube-sonarqube-admin-password
2225
postgresql_password_external = ""
2326
postgresql_external_server_url = ""
2427
}

0 commit comments

Comments
 (0)