From 20b11e522b8b60b3c27a74507c499bcb89f221e8 Mon Sep 17 00:00:00 2001 From: John Blackwell Date: Thu, 9 Jan 2025 15:18:23 -0500 Subject: [PATCH 1/3] fixed scmConnectionRef name --- pages/how-to/deploy/microservice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/how-to/deploy/microservice.md b/pages/how-to/deploy/microservice.md index db050417..8a7b044d 100644 --- a/pages/how-to/deploy/microservice.md +++ b/pages/how-to/deploy/microservice.md @@ -36,7 +36,7 @@ metadata: spec: url: https://github.com/pluralsh/plrl-cd-demo.git scmConnectionRef: - name: github + name: plural namespace: infra ``` From 2a9919f68d966ab553bb727e897e682ea477f2c4 Mon Sep 17 00:00:00 2001 From: John Blackwell Date: Thu, 9 Jan 2025 15:33:37 -0500 Subject: [PATCH 2/3] should be connectionRef --- pages/how-to/deploy/microservice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/how-to/deploy/microservice.md b/pages/how-to/deploy/microservice.md index 8a7b044d..2dabea13 100644 --- a/pages/how-to/deploy/microservice.md +++ b/pages/how-to/deploy/microservice.md @@ -35,7 +35,7 @@ metadata: name: cd-demo spec: url: https://github.com/pluralsh/plrl-cd-demo.git - scmConnectionRef: + connectionRef: name: plural namespace: infra ``` From 98b4d9e7df03c11c5b03f0a8949ca698226a83e6 Mon Sep 17 00:00:00 2001 From: John Blackwell Date: Thu, 9 Jan 2025 16:07:46 -0500 Subject: [PATCH 3/3] add dns_zone field --- pages/how-to/deploy/microservice.md | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/pages/how-to/deploy/microservice.md b/pages/how-to/deploy/microservice.md index 2dabea13..83d896b2 100644 --- a/pages/how-to/deploy/microservice.md +++ b/pages/how-to/deploy/microservice.md @@ -79,6 +79,43 @@ spec: The `clusterRef` field on a service deployment is immutable. If you happen to chose the wrong one, it's not a big deal, but you'll need to delete that ServiceDeployment CRD manually then let the underlying service recreate it from scratch. This can be done in the Plural Kubernetes dashboard UI easily. {% /callout %} +You will also need to add the `dns_zone` field to the `plural cluster metadata` in `plural.tf`. Set the `dns_zone = "dev.plural.sh"`. + +```yaml +resource "plural_cluster" "this" { + handle = var.cluster + name = var.cluster + tags = { + fleet = var.fleet + tier = var.tier + role = "workload" + } + + metadata = jsonencode({ + iam = { + load_balancer = module.addons.gitops_metadata.aws_load_balancer_controller_iam_role_arn + cluster_autoscaler = module.addons.gitops_metadata.cluster_autoscaler_iam_role_arn + external_dns = module.externaldns_irsa_role.iam_role_arn + } + dns_zone = "dev.plural.sh" # <- make sure to add this field + }) + + kubeconfig = { + host = module.eks.cluster_endpoint + cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data) + token = data.aws_eks_cluster_auth.cluster.token + } + + depends_on = [ + module.vpc, + module.addons, + module.ebs_csi_irsa_role, + module.vpc_cni_irsa_role, + module.externaldns_irsa_role + ] +} +``` + ## Push to Deploy We registered all these manifests under the root `bootstrap` folder a `plural up`-derived management cluster listens to by default, so all you should need to do is either: