Skip to content

Commit 9f44c99

Browse files
Merge pull request #114 from pluralsh/fix-gcp-setup
fix gcp setup
2 parents 07a792b + 11c9558 commit 9f44c99

File tree

7 files changed

+41
-15
lines changed

7 files changed

+41
-15
lines changed

charts/plural-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: plural-operator
33
description: A Helm chart for deploying the v1 plural operator, which is primarily responsible for managing our oauth proxy injector admission controller.
44
type: application
5-
version: 0.1.3
5+
version: 0.1.4
66
appVersion: "1.16.0"

charts/plural-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ replicaCount: 1
77
plural:
88
enabled: true
99
image:
10-
repository: dkr.plural.sh/bootstrap/plural-operator
10+
repository: ghcr.io/pluralsh/plural-operator
1111
tag: 0.6.0

helm/external-dns.yaml.liquid

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
enabled: true
22

3+
{% if cluster.distro == "EKS" %}
34
provider: aws
5+
{% endif %}
6+
{% if cluster.distro == "AKS" %}
7+
provider: azure
8+
{% endif %}
9+
{% if cluster.distro == "GKE" %}
10+
provider: google
11+
{% endif %}
412

513
txtOwnerId: plrl-{{ cluster.handle }} # templating in the cluster handle, which is unique, to be the external-dns owner id
614

@@ -9,6 +17,24 @@ policy: sync
917
domainFilters:
1018
- {{ cluster.metadata.dns_zone }} # check terraform/modules/clusters/aws/plural.tf for where this is set
1119

20+
{% if cluster.distro == "EKS" %}
1221
serviceAccount:
1322
annotations:
14-
eks.amazonaws.com/role-arn: {{ cluster.metadata.iam.external_dns }}
23+
eks.amazonaws.com/role-arn: {{ cluster.metadata.iam.external_dns }}
24+
{% endif %}
25+
26+
{% if cluster.distro == "AKS" %}
27+
serviceAccount:
28+
annotations:
29+
azure.workload.identity/client-id: {{ cluster.metadata.iam.external_dns }}
30+
31+
podLabels:
32+
labels:
33+
azure.workload.identity/use: "true"
34+
{% endif %}
35+
36+
{% if cluster.distro == "GKE" %}
37+
serviceAccount:
38+
annotations:
39+
iam.gke.io/gcp-service-account: {{ cluster.metadata.iam.external_dns }}
40+
{% endif %}

terraform/clouds/gcp/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ variable "kubernetes_version" {
2020

2121
variable "node_pools" {
2222
type = list(any)
23-
default = [{ name = "default-node-pool" }]
23+
default = [{ name = "default-node-pool", machine_type = "n2-standard-2" }]
2424
}
2525

2626
variable "node_pools_taints" {

terraform/core-infra/gcp/dns.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
data "google_dns_managed_zone" "prod" {
2-
name = "{{ replace .AppDomain \".\" \"-\" }}"
2+
name = "{{ replace "." "-" .AppDomain }}"
33
project = "{{ .Project }}"
44
}
55

66
resource "google_dns_managed_zone" "dev" {
7-
name = "{{ replace (printf \"dev.%s\" .AppDomain) \".\" \"-\" }}"
7+
name = "{{ replace "." "-" (printf "dev.%s" .AppDomain) }}"
88
dns_name = "dev.{{ .AppDomain }}."
99
project = "{{ .Project }}"
1010
description = "Dev zone for {{ .AppDomain }}"

terraform/modules/clusters/gcp/services.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# annoyingly need to ensure these are enabled
22
resource "google_project_service" "gcr" {
3-
project = var.project_id
3+
project = local.project_id
44
service = "artifactregistry.googleapis.com"
55

66
timeouts {
@@ -12,7 +12,7 @@ resource "google_project_service" "gcr" {
1212
}
1313

1414
resource "google_project_service" "container" {
15-
project = var.project_id
15+
project = local.project_id
1616
service = "container.googleapis.com"
1717

1818
timeouts {
@@ -24,7 +24,7 @@ resource "google_project_service" "container" {
2424
}
2525

2626
resource "google_project_service" "iam" {
27-
project = var.project_id
27+
project = local.project_id
2828
service = "iam.googleapis.com"
2929

3030
timeouts {
@@ -36,7 +36,7 @@ resource "google_project_service" "iam" {
3636
}
3737

3838
resource "google_project_service" "storage" {
39-
project = var.project_id
39+
project = local.project_id
4040
service = "storage.googleapis.com"
4141

4242
timeouts {
@@ -48,7 +48,7 @@ resource "google_project_service" "storage" {
4848
}
4949

5050
resource "google_project_service" "dns" {
51-
project = var.project_id
51+
project = local.project_id
5252
service = "dns.googleapis.com"
5353

5454
timeouts {
@@ -60,7 +60,7 @@ resource "google_project_service" "dns" {
6060
}
6161

6262
resource "google_project_service" "compute" {
63-
project = var.project_id
63+
project = local.project_id
6464
service = "compute.googleapis.com"
6565

6666
timeouts {
@@ -72,7 +72,7 @@ resource "google_project_service" "compute" {
7272
}
7373

7474
resource "google_project_service" "sql" {
75-
project = var.project_id
75+
project = local.project_id
7676
service = "sqladmin.googleapis.com"
7777

7878
timeouts {
@@ -84,7 +84,7 @@ resource "google_project_service" "sql" {
8484
}
8585

8686
resource "google_project_service" "servicenetworking" {
87-
project = var.project_id
87+
project = local.project_id
8888
service = "servicenetworking.googleapis.com"
8989

9090
timeouts {

terraform/modules/clusters/gcp/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ variable "kubernetes_version" {
2424

2525
variable "node_pools" {
2626
type = list(any)
27-
default = [ {name = "default-node-pool"} ]
27+
default = [ {name = "default-node-pool", machine_type = "n2-standard-2"} ]
2828
}
2929

3030
variable "node_pools_taints" {

0 commit comments

Comments
 (0)