Skip to content

Commit e3a7bf4

Browse files
authored
fix(dagster-gcp): fix dagster logs on gcp + remove user code example (#630)
1 parent 4b8e9d6 commit e3a7bf4

File tree

8 files changed

+19
-28
lines changed

8 files changed

+19
-28
lines changed

dagster/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM gcr.io/pluralsh/dagster/user-code-example:1.2.2
2+
3+
RUN pip install dagster-gcp

dagster/helm/dagster/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: dagster
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.1.28
5+
version: 0.1.29
66
appVersion: 1.2.2
77
dependencies:
88
- name: postgres

dagster/helm/dagster/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,3 @@ dagster:
9696
- "--python-file"
9797
- "/example_project/example_repo/repo.py"
9898
port: 3030
99-
envSecrets:
100-
- name: dagster-aws-env

dagster/helm/dagster/values.yaml.tpl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{ $isGcp := or (eq .Provider "google") (eq .Provider "gcp") }}
2+
13
global:
24
application:
35
links:
@@ -61,7 +63,7 @@ dagster:
6163
{{ end }}
6264
{{ end }}
6365

64-
{{ if eq .Provider "gcp" }}
66+
{{ if $isGcp }}
6567
computeLogManager:
6668
type: GCSComputeLogManager
6769
config:
@@ -75,14 +77,16 @@ dagster:
7577
eks.amazonaws.com/role-arn: "arn:aws:iam::{{ .Project }}:role/{{ .Cluster }}-dagster"
7678
{{ end }}
7779

78-
{{ if eq .Provider "gcp" }}
80+
{{ if $isGcp }}
7981
serviceAccount:
8082
annotations:
8183
iam.gke.io/gcp-service-account: {{ importValue "Terraform" "service_account_email" }}
8284
{{ end }}
8385

86+
{{ if not $isGcp }}
8487
runLauncher:
8588
config:
8689
k8sRunLauncher:
8790
envSecrets:
88-
- name: dagster-aws-env
91+
- name: dagster-aws-env
92+
{{ end }}

dagster/terraform/gcp/deps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: plural.sh/v1alpha1
22
kind: Dependencies
33
metadata:
44
description: dagster gcp setup
5-
version: 0.1.6
5+
version: 0.1.7
66
spec:
77
dependencies:
88
- name: gcp-bootstrap

dagster/terraform/gcp/main.tf

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,6 @@ module "gcs_buckets" {
2626
project_id = var.project_id
2727
bucket_names = [var.dagster_bucket]
2828
service_account_email = module.dagster-workload-identity.gcp_service_account_email
29+
location = var.bucket_location
2930
}
3031

31-
resource "google_storage_hmac_key" "dagster" {
32-
service_account_email = module.dagster-workload-identity.gcp_service_account_email
33-
}
34-
35-
resource "google_service_account_key" "dagster_key" {
36-
service_account_id = module.dagster-workload-identity.gcp_service_account.name
37-
}
38-
39-
resource "kubernetes_secret" "dagster_s3_secret" {
40-
metadata {
41-
name = "dagster-aws-env"
42-
namespace = kubernetes_namespace.dagster.id
43-
}
44-
45-
data = {
46-
"AWS_ACCESS_KEY_ID" = google_storage_hmac_key.dagster.access_id
47-
"AWS_SECRET_ACCESS_KEY" = google_storage_hmac_key.dagster.secret
48-
"GOOGLE_APPLICATION_CREDENTIALS" = base64decode(google_service_account_key.dagster_key.private_key)
49-
}
50-
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
namespace = {{ .Namespace | quote }}
22
dagster_bucket = {{ .Values.dagsterBucket | quote }}
33
cluster_name = {{ .Cluster | quote }}
4-
project_id = {{ .Project | quote }}
4+
project_id = {{ .Project | quote }}
5+
bucket_location = {{ .Context.BucketLocation | quote }}

dagster/terraform/gcp/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@ variable "cluster_name" {
1313

1414
variable "project_id" {
1515
type = string
16+
}
17+
18+
variable "bucket_location" {
19+
type = string
1620
}

0 commit comments

Comments
 (0)