Skip to content

Commit 68f6186

Browse files
committed
[single-cluster/aws] Install Calico as the CNI
Fixes #12953 This PR updates the EKS single cluster reference guides to install calico as the CNI. This is important for the network policies tools to work. For GKE and AKS, There are already options to do the same which we use already instead of doing it like this. Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent 8b94c54 commit 68f6186

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
provider "helm" {
2+
kubernetes {
3+
config_path = var.kubeconfig
4+
}
5+
}
6+
7+
resource "kubernetes_manifest" "calico" {
8+
provisioner "local-exec" {
9+
command = "kubectl patch ds -n kube-system aws-node -p '{\"spec\":{\"template\":{\"spec\":{\"nodeSelector\":{\"non-calico\": \"true\"}}}}}'"
10+
}
11+
12+
provisioner "local-exec" {
13+
command = "kubectl apply -f https://docs.projectcalico.org/manifests/calico-vxlan.yaml"
14+
}
15+
}

install/infra/modules/tools/azure-external-dns/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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" }
55

66
provider "helm" {
77
kubernetes {

install/infra/single-cluster/aws/output.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ output "url" {
33
}
44

55
output "cluster_name" {
6-
value = var.cluster_name
6+
value = var.cluster_name
77
}
88

99
output "registry_backend" {

install/infra/single-cluster/aws/tools.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ module "cluster-autoscaler" {
2929
cluster_id = module.eks.cluster_id
3030
oidc_provider_arn = module.eks.oidc_provider_arn
3131
}
32+
33+
module "calico" {
34+
source = "../../modules/tools/aws-calico"
35+
kubeconfig = var.kubeconfig
36+
}

0 commit comments

Comments
 (0)