Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13 from swisscom/develop
Browse files Browse the repository at this point in the history
add additional cilium dependencies
  • Loading branch information
JamesClonk authored Nov 14, 2022
2 parents 2e61c1f + 6378f09 commit cb850ae
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
21 changes: 17 additions & 4 deletions deployments/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ resource "time_sleep" "wait_for_kubernetes" {
depends_on = [
var.kubernetes_summary,
var.kubernetes_ready,
var.cilium_ready
var.cilium_install_ready,
var.cilium_status_ready
]
}

Expand All @@ -32,7 +33,11 @@ resource "helm_release" "longhorn" {
create_namespace = "true"
wait = "true"

depends_on = [time_sleep.wait_for_kubernetes]
depends_on = [
time_sleep.wait_for_kubernetes,
var.cilium_install_ready,
var.cilium_status_ready
]
}

resource "time_sleep" "wait_for_longhorn" {
Expand Down Expand Up @@ -73,7 +78,11 @@ resource "helm_release" "kured" {
EOT
]

depends_on = [time_sleep.wait_for_kubernetes]
depends_on = [
time_sleep.wait_for_kubernetes,
var.cilium_install_ready,
var.cilium_status_ready
]
}

# ======================================================================================================================
Expand Down Expand Up @@ -104,7 +113,11 @@ resource "helm_release" "ingress_nginx" {
EOT
]

depends_on = [time_sleep.wait_for_kubernetes]
depends_on = [
time_sleep.wait_for_kubernetes,
var.cilium_install_ready,
var.cilium_status_ready
]
}

resource "helm_release" "cert_manager" {
Expand Down
3 changes: 2 additions & 1 deletion deployments/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ variable "client_certificate" {}
variable "client_key" {}
variable "kubernetes_summary" {}
variable "kubernetes_ready" {}
variable "cilium_ready" {}
variable "cilium_install_ready" {}
variable "cilium_status_ready" {}

variable "domain_name" {
default = ""
Expand Down
1 change: 1 addition & 0 deletions kubernetes/cilium.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ resource "null_resource" "k8s_cilium_install" {
# # test connectivity
# cilium connectivity test --timestamp
sleep 60
EOT
]
}
Expand Down
5 changes: 4 additions & 1 deletion kubernetes/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ output "kubernetes_summary" {
output "kubernetes_ready" {
value = module.k3s.kubernetes_ready
}
output "cilium_ready" {
output "cilium_install_ready" {
value = null_resource.k8s_cilium_install
}
output "cilium_status_ready" {
value = null_resource.k8s_cilium_status
}
6 changes: 4 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ resource "time_sleep" "wait_for_kubernetes" {
create_duration = "60s"
depends_on = [
module.kubernetes.kubernetes_ready,
module.kubernetes.cilium_ready
module.kubernetes.cilium_install_ready,
module.kubernetes.cilium_status_ready
]
}

Expand Down Expand Up @@ -167,7 +168,8 @@ module "deployments" {
loadbalancer_ip = module.infrastructure.edge_gateway_external_ip
kubernetes_summary = module.kubernetes.kubernetes_summary
kubernetes_ready = module.kubernetes.kubernetes_ready
cilium_ready = module.kubernetes.cilium_ready
cilium_install_ready = module.kubernetes.cilium_install_ready
cilium_status_ready = module.kubernetes.cilium_status_ready
cluster_api_endpoint = "https://${module.infrastructure.edge_gateway_external_ip}:6443"
cluster_ca_certificate = module.kubernetes.cluster_ca_certificate
client_certificate = module.kubernetes.client_certificate
Expand Down

0 comments on commit cb850ae

Please sign in to comment.