Skip to content

Commit dec4e39

Browse files
authored
test(mc): Create helm-release module (#1303)
# Description * create helm-release module * delete retina and prometheus modules * refactor integration tests as needed ## Related Issue #1267 ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed ![Screenshot 2025-02-04 093852](https://github.com/user-attachments/assets/d8c806cc-307a-4956-bdea-c12caf33315c) ![Screenshot 2025-02-04 114057](https://github.com/user-attachments/assets/fb46b254-0623-4fa8-9a96-f5abf67c56c0) ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project.
1 parent a1beefd commit dec4e39

File tree

22 files changed

+359
-121
lines changed

22 files changed

+359
-121
lines changed

Diff for: test/multicloud/examples/integration/prometheus-kind/main.tf

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ module "kind" {
44
}
55

66
module "prometheus" {
7-
depends_on = [module.kind]
8-
source = "../../../modules/prometheus"
7+
depends_on = [module.kind]
8+
source = "../../../modules/helm-release"
9+
release_name = var.prometheus_release_name
10+
repository_url = var.prometheus_repository_url
11+
chart_version = var.prometheus_chart_version
12+
chart_name = var.prometheus_chart_name
13+
values = var.prometheus_values
914
}

Diff for: test/multicloud/examples/integration/prometheus-kind/variables.tf

+42
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,45 @@ variable "prefix" {
33
type = string
44
default = "mc"
55
}
6+
7+
variable "prometheus_release_name" {
8+
description = "The name of the Helm release."
9+
type = string
10+
default = "prometheus"
11+
}
12+
13+
variable "prometheus_repository_url" {
14+
description = "The URL of the Helm repository."
15+
type = string
16+
default = "https://prometheus-community.github.io/helm-charts"
17+
}
18+
19+
variable "prometheus_chart_version" {
20+
description = "The version of the Helm chart to install."
21+
type = string
22+
default = "68.4.3"
23+
}
24+
25+
variable "prometheus_chart_name" {
26+
description = "The name of the Helm chart to install."
27+
type = string
28+
default = "kube-prometheus-stack"
29+
}
30+
31+
variable "prometheus_values" {
32+
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
33+
type = list(object({
34+
name = string
35+
value = string
36+
}))
37+
default = [
38+
{
39+
name = "global.prometheus.enabled"
40+
value = "true"
41+
},
42+
{
43+
name = "global.grafana.enabled"
44+
value = "true"
45+
}
46+
]
47+
}

Diff for: test/multicloud/examples/integration/retina-gke/main.tf

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ module "gke" {
77
}
88

99
module "retina" {
10-
depends_on = [module.gke]
11-
source = "../../../modules/retina"
12-
retina_version = var.retina_version
13-
values = var.values
10+
depends_on = [module.gke]
11+
source = "../../../modules/helm-release"
12+
release_name = var.retina_release_name
13+
repository_url = var.retina_repository_url
14+
chart_version = var.retina_chart_version
15+
chart_name = var.retina_chart_name
16+
values = var.retina_values
1417
}

Diff for: test/multicloud/examples/integration/retina-gke/variables.tf

+36-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,48 @@ variable "machine_type" {
2222
default = "e2-standard-4"
2323
}
2424

25-
variable "retina_version" {
26-
description = "The tag to apply to all resources."
25+
variable "retina_release_name" {
26+
description = "The name of the Helm release."
2727
type = string
28+
default = "retina"
2829
}
2930

30-
variable "values" {
31+
variable "retina_repository_url" {
32+
description = "The URL of the Helm repository."
33+
type = string
34+
default = "oci://ghcr.io/microsoft/retina/charts"
35+
}
36+
37+
variable "retina_chart_version" {
38+
description = "The version of the Helm chart to install."
39+
type = string
40+
default = "v0.0.24"
41+
}
42+
43+
variable "retina_chart_name" {
44+
description = "The name of the Helm chart to install."
45+
type = string
46+
default = "retina"
47+
}
48+
49+
variable "retina_values" {
3150
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
3251
type = list(object({
3352
name = string
3453
value = string
3554
}))
55+
default = [
56+
{
57+
name = "image.tag"
58+
value = "v0.0.24"
59+
},
60+
{
61+
name = "operator.tag"
62+
value = "v0.0.24"
63+
},
64+
{
65+
name = "logLevel"
66+
value = "info"
67+
}
68+
]
3669
}

Diff for: test/multicloud/examples/integration/retina-kind/main.tf

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ module "kind" {
55

66
module "retina" {
77
depends_on = [module.kind]
8-
source = "../../../modules/retina"
9-
retina_version = var.retina_version
8+
source = "../../../modules/helm-release"
9+
release_name = var.retina_release_name
10+
repository_url = var.retina_repository_url
11+
chart_version = var.retina_chart_version
12+
chart_name = var.retina_chart_name
13+
values = var.retina_values
1014
}

Diff for: test/multicloud/examples/integration/retina-kind/variables.tf

+43-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,48 @@ variable "prefix" {
44
default = "mc"
55
}
66

7-
variable "retina_version" {
8-
description = "The tag to apply to all resources."
7+
variable "retina_release_name" {
8+
description = "The name of the Helm release."
99
type = string
10-
default = "v0.0.23"
10+
default = "retina"
11+
}
12+
13+
variable "retina_repository_url" {
14+
description = "The URL of the Helm repository."
15+
type = string
16+
default = "oci://ghcr.io/microsoft/retina/charts"
17+
}
18+
19+
variable "retina_chart_version" {
20+
description = "The version of the Helm chart to install."
21+
type = string
22+
default = "v0.0.24"
23+
}
24+
25+
variable "retina_chart_name" {
26+
description = "The name of the Helm chart to install."
27+
type = string
28+
default = "retina"
29+
}
30+
31+
variable "retina_values" {
32+
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
33+
type = list(object({
34+
name = string
35+
value = string
36+
}))
37+
default = [
38+
{
39+
name = "image.tag"
40+
value = "v0.0.24"
41+
},
42+
{
43+
name = "operator.tag"
44+
value = "v0.0.24"
45+
},
46+
{
47+
name = "logLevel"
48+
value = "info"
49+
}
50+
]
1151
}

Diff for: test/multicloud/live/retina-aks/main.tf

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ module "aks" {
77
}
88

99
module "retina" {
10-
depends_on = [module.aks]
11-
source = "../../modules/retina"
10+
depends_on = [module.aks]
11+
source = "../../modules/helm-release"
12+
release_name = var.retina_release_name
13+
repository_url = var.retina_repository_url
14+
chart_version = var.retina_chart_version
15+
chart_name = var.retina_chart_name
16+
values = var.retina_values
1217
}
1318

1419
output "kubeconfig_command" {

Diff for: test/multicloud/live/retina-aks/variables.tf

+47-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,51 @@ variable "prefix" {
2929
variable "labels" {
3030
description = "A map of labels to add to all resources."
3131
type = map(string)
32-
default = {
33-
"env" = "test"
34-
}
32+
default = {}
33+
}
34+
35+
variable "retina_release_name" {
36+
description = "The name of the Helm release."
37+
type = string
38+
default = "retina"
39+
}
40+
41+
variable "retina_repository_url" {
42+
description = "The URL of the Helm repository."
43+
type = string
44+
default = "oci://ghcr.io/microsoft/retina/charts"
45+
}
46+
47+
variable "retina_chart_version" {
48+
description = "The version of the Helm chart to install."
49+
type = string
50+
default = "v0.0.24"
51+
}
52+
53+
variable "retina_chart_name" {
54+
description = "The name of the Helm chart to install."
55+
type = string
56+
default = "retina"
57+
}
58+
59+
variable "retina_values" {
60+
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
61+
type = list(object({
62+
name = string
63+
value = string
64+
}))
65+
default = [
66+
{
67+
name = "image.tag"
68+
value = "v0.0.24"
69+
},
70+
{
71+
name = "operator.tag"
72+
value = "v0.0.24"
73+
},
74+
{
75+
name = "logLevel"
76+
value = "info"
77+
}
78+
]
3579
}

Diff for: test/multicloud/live/retina-gke/main.tf

+7-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ module "gke" {
77
}
88

99
module "retina" {
10-
depends_on = [module.gke]
11-
source = "../../modules/retina"
10+
depends_on = [module.gke]
11+
source = "../../modules/helm-release"
12+
release_name = var.retina_release_name
13+
repository_url = var.retina_repository_url
14+
chart_version = var.retina_chart_version
15+
chart_name = var.retina_chart_name
16+
values = var.retina_values
1217
}

Diff for: test/multicloud/live/retina-gke/variables.tf

+46
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,49 @@ variable "machine_type" {
2121
type = string
2222
default = "e2-standard-4"
2323
}
24+
25+
variable "retina_release_name" {
26+
description = "The name of the Helm release."
27+
type = string
28+
default = "retina"
29+
}
30+
31+
variable "retina_repository_url" {
32+
description = "The URL of the Helm repository."
33+
type = string
34+
default = "oci://ghcr.io/microsoft/retina/charts"
35+
}
36+
37+
variable "retina_chart_version" {
38+
description = "The version of the Helm chart to install."
39+
type = string
40+
default = "v0.0.24"
41+
}
42+
43+
variable "retina_chart_name" {
44+
description = "The name of the Helm chart to install."
45+
type = string
46+
default = "retina"
47+
}
48+
49+
variable "retina_values" {
50+
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
51+
type = list(object({
52+
name = string
53+
value = string
54+
}))
55+
default = [
56+
{
57+
name = "image.tag"
58+
value = "v0.0.24"
59+
},
60+
{
61+
name = "operator.tag"
62+
value = "v0.0.24"
63+
},
64+
{
65+
name = "logLevel"
66+
value = "info"
67+
}
68+
]
69+
}

Diff for: test/multicloud/live/retina-kind/main.tf

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ module "kind" {
44
}
55

66
module "retina" {
7-
depends_on = [module.kind]
8-
source = "../../modules/retina"
7+
depends_on = [module.kind]
8+
source = "../../modules/helm-release"
9+
release_name = var.retina_release_name
10+
repository_url = var.retina_repository_url
11+
chart_version = var.retina_chart_version
12+
chart_name = var.retina_chart_name
13+
values = var.retina_values
914
}

Diff for: test/multicloud/live/retina-kind/variables.tf

+47-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,50 @@ variable "prefix" {
22
description = "A prefix to add to all resources."
33
type = string
44
default = "mc"
5-
}
5+
}
6+
7+
variable "retina_release_name" {
8+
description = "The name of the Helm release."
9+
type = string
10+
default = "retina"
11+
}
12+
13+
variable "retina_repository_url" {
14+
description = "The URL of the Helm repository."
15+
type = string
16+
default = "oci://ghcr.io/microsoft/retina/charts"
17+
}
18+
19+
variable "retina_chart_version" {
20+
description = "The version of the Helm chart to install."
21+
type = string
22+
default = "v0.0.24"
23+
}
24+
25+
variable "retina_chart_name" {
26+
description = "The name of the Helm chart to install."
27+
type = string
28+
default = "retina"
29+
}
30+
31+
variable "retina_values" {
32+
description = "Configuration for set blocks, this corresponds to Helm values.yaml"
33+
type = list(object({
34+
name = string
35+
value = string
36+
}))
37+
default = [
38+
{
39+
name = "image.tag"
40+
value = "v0.0.24"
41+
},
42+
{
43+
name = "operator.tag"
44+
value = "v0.0.24"
45+
},
46+
{
47+
name = "logLevel"
48+
value = "info"
49+
}
50+
]
51+
}

0 commit comments

Comments
 (0)