File tree 5 files changed +52
-8
lines changed 5 files changed +52
-8
lines changed Original file line number Diff line number Diff line change
1
+ variable "kubeconfig" {
2
+ description = " Path to the KUBECONFIG file to connect to the cluster"
3
+ default = " ./kubeconfig"
4
+ }
5
+
6
+ provider "helm" {
7
+ kubernetes {
8
+ config_path = var. kubeconfig
9
+ }
10
+ }
11
+
12
+ resource "helm_release" "calico" {
13
+ name = " tigera-operator"
14
+ repository = " https://projectcalico.docs.tigera.io/charts"
15
+ chart = " tigera-operator"
16
+ namespace = " tigera-operator"
17
+ version = " v3.24.1"
18
+ create_namespace = true
19
+
20
+ values = [
21
+ jsonencode ({
22
+ installation = {
23
+ kubernetesProvider = " EKS"
24
+ }
25
+ })
26
+ ]
27
+ }
Original file line number Diff line number Diff line change 1
- variable settings {}
2
- variable domain_name { default = " test" }
3
- variable kubeconfig { default = " conf" }
4
- variable txt_owner_id { default = " nightly-test" }
1
+ variable " settings" {}
2
+ variable " domain_name" { default = " test" }
3
+ variable " kubeconfig" { default = " conf" }
4
+ variable " txt_owner_id" { default = " nightly-test" }
5
5
6
6
provider "helm" {
7
7
kubernetes {
Original file line number Diff line number Diff line change @@ -26,12 +26,16 @@ plan-cluster:
26
26
@terraform plan -target=module.eks
27
27
28
28
.PHONY : plan-tools
29
- plan-tools : plan-cm-edns plan-cluster-issuer plan-cluster-autoscaler
29
+ plan-tools : plan-calico plan- cm-edns plan-cluster-issuer plan-cluster-autoscaler
30
30
31
31
.PHONY : plan-cluster-autoscaler
32
32
plan-cluster-autoscaler :
33
33
@terraform plan -target=module.cluster-autoscaler
34
34
35
+ .PHONY : plan-calico
36
+ plan-calico :
37
+ @terraform plan -target=module.calico
38
+
35
39
.PHONY : plan-cm-edns
36
40
plan-cm-edns :
37
41
@terraform plan -target=module.certmanager -target=module.externaldns
@@ -45,7 +49,11 @@ apply-cluster:
45
49
@terraform apply -target=module.eks --auto-approve
46
50
47
51
.PHONY : apply-tools
48
- apply-tools : install-cm-edns install-cluster-issuer install-cluster-autoscaler
52
+ apply-tools : install-calico install-cm-edns install-cluster-issuer install-cluster-autoscaler
53
+
54
+ .PHONY : install-calico
55
+ install-calico :
56
+ @terraform apply -target=module.calico --auto-approve
49
57
50
58
.PHONY : install-cluster-autoscaler
51
59
install-cluster-autoscaler :
@@ -64,7 +72,11 @@ destroy-cluster:
64
72
@terraform destroy -target=module.eks --auto-approve
65
73
66
74
.PHONY : destroy-tools
67
- destroy-tools : destroy-cluster-issuer destroy-cm-edns destroy-cluster-autoscaler
75
+ destroy-tools : destroy-calico destroy-cluster-issuer destroy-cm-edns destroy-cluster-autoscaler
76
+
77
+ .PHONY : destroy-calico
78
+ destroy-calico :
79
+ @terraform destroy -target=module.calico --auto-approve
68
80
69
81
.PHONY : destroy-cluster-autoscaler
70
82
destroy-cluster-autoscaler :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ output "url" {
3
3
}
4
4
5
5
output "cluster_name" {
6
- value = var. cluster_name
6
+ value = var. cluster_name
7
7
}
8
8
9
9
output "registry_backend" {
Original file line number Diff line number Diff line change @@ -29,3 +29,8 @@ module "cluster-autoscaler" {
29
29
cluster_id = module. eks . cluster_id
30
30
oidc_provider_arn = module. eks . oidc_provider_arn
31
31
}
32
+
33
+ module "calico" {
34
+ source = " ../../modules/tools/aws-calico"
35
+ kubeconfig = var. kubeconfig
36
+ }
You can’t perform that action at this time.
0 commit comments