Skip to content

Commit

Permalink
Merge pull request kubernetes#7370 from michelle192837/migrate
Browse files Browse the repository at this point in the history
Add a subscription to gs://kubernetes-ci-logs.
  • Loading branch information
k8s-ci-robot authored Oct 10, 2024
2 parents 383d0e1 + 8313027 commit 2704baf
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions infra/gcp/terraform/kubernetes-public/k8s-kettle.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,26 @@ resource "google_pubsub_subscription_iam_binding" "subscription_binding" {
"serviceAccount:${module.aaa_kettle_sa.email}"
]
}

// Create a subscription in this project to the kubernetes-ci-logs-updates topic in k8s-infra-prow.
data "google_pubsub_topic" "kubernetes_ci_logs_topic" {
name = "kubernetes-ci-logs-updates"
project = "k8s-infra-prow"
}

resource "google_pubsub_subscription" "kettle_ci_logs_subscription" {
name = "k8s-infra-kettle"
topic = data.google_pubsub_topic.kubernetes_ci_logs_topic.name
project = data.google_project.project.project_id

filter = "attributes.eventType = \"OBJECT_FINALIZE\""
}

resource "google_pubsub_subscription_iam_binding" "ci_logs_subscription_binding" {
project = data.google_project.project.project_id
subscription = google_pubsub_subscription.kettle_ci_logs_subscription.name
role = "roles/pubsub.editor"
members = [
"serviceAccount:${module.aaa_kettle_sa.email}"
]
}

0 comments on commit 2704baf

Please sign in to comment.