Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: transition to slo_generator_image #129

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/slo-generator/simple_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ To run this example, you'll need:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| gcr\_project\_id | Google Container registry project where image is hosted | `string` | `"slo-generator-ci-a2b4"` | no |
| labels | Project labels | `map` | `{}` | no |
| project\_id | Project id | `any` | n/a | yes |
| region | Region | `string` | `"us-east1"` | no |
| schedule | Cron-like Cloud Scheduler schedule | `string` | `"* * * * */1"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"latest"` | no |
| slo\_generator\_image | SLO generator image | `string` | `"ghcr.io/google/slo-generator"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"master"` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion examples/slo-generator/simple_example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module "slo-generator" {
config = local.config
slo_configs = local.slo_configs
slo_generator_version = var.slo_generator_version
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
secrets = {
PROJECT_ID = var.project_id
}
Expand Down
8 changes: 4 additions & 4 deletions examples/slo-generator/simple_example/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ variable "region" {
default = "us-east1"
}

variable "gcr_project_id" {
description = "Google Container registry project where image is hosted"
default = "slo-generator-ci-a2b4"
variable "slo_generator_image" {
description = "SLO generator image"
default = "ghcr.io/google/slo-generator"
}

variable "slo_generator_version" {
description = "SLO generator version"
default = "latest"
default = "master"
}

variable "labels" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ To run this example, you'll need:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| gcr\_project\_id | Google Container registry project where image is hosted | `string` | `"slo-generator-ci-a2b4"` | no |
| labels | Project labels | `map` | `{}` | no |
| project\_id | Project id | `any` | n/a | yes |
| region | Region | `string` | `"us-east1"` | no |
| schedule | Cron-like Cloud Scheduler schedule | `string` | `"* * * * */1"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"latest"` | no |
| slo\_generator\_image | SLO generator image | `string` | `"ghcr.io/google/slo-generator"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"master"` | no |

## Outputs

Expand Down
4 changes: 2 additions & 2 deletions examples/slo-generator/sre_export_cloudevent_eventarc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module "slo-generator" {
config = local.config
slo_configs = local.slo_configs
slo_generator_version = var.slo_generator_version
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
secrets = {
PROJECT_ID = var.project_id
PUBSUB_TOPIC_NAME = google_pubsub_topic.topic.name
Expand All @@ -50,7 +50,7 @@ module "slo-generator-export" {
region = var.region
config = local.config_export
slo_generator_version = var.slo_generator_version
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
secrets = {
SRE_PROJECT_ID = var.project_id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ variable "region" {
default = "us-east1"
}

variable "gcr_project_id" {
description = "Google Container registry project where image is hosted"
default = "slo-generator-ci-a2b4"
variable "slo_generator_image" {
description = "SLO generator image"
default = "ghcr.io/google/slo-generator"
}

variable "slo_generator_version" {
description = "SLO generator version"
default = "latest"
default = "master"
}

variable "labels" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ To run this example, you'll need:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| gcr\_project\_id | Google Container Registry project to fetch slo-generator image from | `string` | `"slo-generator-ci-a2b4"` | no |
| project\_id | SRE Project id | `any` | n/a | yes |
| region | Region | `string` | `"us-east1"` | no |
| slo\_generator\_version | Version of slo-generator image | `string` | `"latest"` | no |
| slo\_generator\_image | SLO generator image | `string` | `"ghcr.io/google/slo-generator"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"master"` | no |
| team1\_project\_id | Team 1 project id | `any` | n/a | yes |

## Outputs
Expand Down
4 changes: 2 additions & 2 deletions examples/slo-generator/sre_export_cloudevent_exporter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module "slo-generator" {
region = var.region
config = local.team1_config
slo_configs = local.team1_slo_configs
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
slo_generator_version = var.slo_generator_version
service_account_email = google_service_account.team1_service_account.email
secrets = {
Expand All @@ -64,7 +64,7 @@ module "slo-generator-export" {
project_id = var.project_id
region = var.region
config = local.sre_config
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
slo_generator_version = var.slo_generator_version
service_account_email = local.service_account_email
secrets = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ variable "team1_project_id" {
description = "Team 1 project id"
}

variable "gcr_project_id" {
description = "Google Container Registry project to fetch slo-generator image from"
default = "slo-generator-ci-a2b4"
variable "slo_generator_image" {
description = "SLO generator image"
default = "ghcr.io/google/slo-generator"
}

variable "slo_generator_version" {
description = "Version of slo-generator image"
default = "latest"
description = "SLO generator version"
default = "master"
}
4 changes: 2 additions & 2 deletions examples/slo-generator/sre_service_advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ To run this example, you'll need:
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| bigquery\_dataset\_name | BigQuery dataset to hold SLO reports | `string` | `"slo"` | no |
| gcr\_project\_id | Google Container registry project where image is hosted | `string` | `"slo-generator-ci-a2b4"` | no |
| project\_id | SRE Project id | `any` | n/a | yes |
| pubsub\_topic\_name | PubSub topic name | `string` | `"slo-export"` | no |
| region | Region | `string` | `"us-east1"` | no |
| schedule | Cron-like Cloud Scheduler schedule | `string` | `"* * * * */1"` | no |
| slo\_generator\_version | slo-generator image version | `string` | `"latest"` | no |
| slo\_generator\_image | SLO generator image | `string` | `"ghcr.io/google/slo-generator"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"master"` | no |
| team1\_project\_id | Team 1 project id | `any` | n/a | yes |
| team2\_project\_id | Team 2 project id | `any` | n/a | yes |

Expand Down
2 changes: 1 addition & 1 deletion examples/slo-generator/sre_service_advanced/sre.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module "slo-generator" {
config = local.sre_config
service_account_email = local.service_account_email
slo_configs = local.sre_slo_configs
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
slo_generator_version = var.slo_generator_version
secrets = {
SRE_PROJECT_ID = var.project_id
Expand Down
2 changes: 1 addition & 1 deletion examples/slo-generator/sre_service_advanced/teams.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module "team1-slos" {
region = var.region
config = local.team1_config
slo_configs = local.team1_configs
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
slo_generator_version = var.slo_generator_version
secrets = {
SRE_PROJECT_ID = var.project_id
Expand Down
16 changes: 8 additions & 8 deletions examples/slo-generator/sre_service_advanced/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ variable "team2_project_id" {
description = "Team 2 project id"
}

variable "gcr_project_id" {
description = "Google Container registry project where image is hosted"
default = "slo-generator-ci-a2b4"
variable "slo_generator_image" {
description = "SLO generator image"
default = "ghcr.io/google/slo-generator"
}

variable "slo_generator_version" {
description = "SLO generator version"
default = "master"
}

variable "schedule" {
Expand All @@ -50,8 +55,3 @@ variable "bigquery_dataset_name" {
description = "BigQuery dataset to hold SLO reports"
default = "slo"
}

variable "slo_generator_version" {
description = "slo-generator image version"
default = "latest"
}
4 changes: 2 additions & 2 deletions examples/slo-generator/sre_shared_schedulers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ To run this example, you'll need:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| gcr\_project\_id | Google Container registry project where image is hosted | `string` | `"slo-generator-ci-a2b4"` | no |
| labels | Project labels | `map` | `{}` | no |
| project\_id | Project id | `any` | n/a | yes |
| region | Region | `string` | `"us-east1"` | no |
| schedule | Cron-like Cloud Scheduler schedule | `string` | `"* * * * */1"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"latest"` | no |
| slo\_generator\_image | SLO generator image | `string` | `"ghcr.io/google/slo-generator"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"master"` | no |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion examples/slo-generator/sre_shared_schedulers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module "slo-generator" {
config = local.config
slo_configs = local.slo_configs
slo_generator_version = var.slo_generator_version
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
create_cloud_schedulers = false
secrets = {
PROJECT_ID = var.project_id
Expand Down
8 changes: 4 additions & 4 deletions examples/slo-generator/sre_shared_schedulers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ variable "region" {
default = "us-east1"
}

variable "gcr_project_id" {
description = "Google Container registry project where image is hosted"
default = "slo-generator-ci-a2b4"
variable "slo_generator_image" {
description = "SLO generator image"
default = "ghcr.io/google/slo-generator"
}

variable "slo_generator_version" {
description = "SLO generator version"
default = "latest"
default = "master"
}

variable "labels" {
Expand Down
4 changes: 2 additions & 2 deletions examples/slo-generator/sre_shared_schedulers_pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ To run this example, you'll need:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| gcr\_project\_id | Google Container registry project where image is hosted | `string` | `"slo-generator-ci-a2b4"` | no |
| labels | Project labels | `map` | `{}` | no |
| project\_id | Project id | `any` | n/a | yes |
| region | Region | `string` | `"us-east1"` | no |
| schedule | Cron-like Cloud Scheduler schedule | `string` | `"* * * * */1"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"latest"` | no |
| slo\_generator\_image | SLO generator image | `string` | `"ghcr.io/google/slo-generator"` | no |
| slo\_generator\_version | SLO generator version | `string` | `"master"` | no |

## Outputs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module "slo-generator" {
config = local.config
slo_configs = local.slo_configs
slo_generator_version = var.slo_generator_version
gcr_project_id = var.gcr_project_id
slo_generator_image = var.slo_generator_image
create_cloud_schedulers = false
secrets = {
PROJECT_ID = var.project_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ variable "region" {
default = "us-east1"
}

variable "gcr_project_id" {
description = "Google Container registry project where image is hosted"
default = "slo-generator-ci-a2b4"
variable "slo_generator_image" {
description = "SLO generator image"
default = "ghcr.io/google/slo-generator"
}

variable "slo_generator_version" {
description = "SLO generator version"
default = "latest"
default = "master"
}

variable "labels" {
Expand Down
2 changes: 1 addition & 1 deletion modules/slo-generator/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ resource "google_cloud_run_service" "service" {
service_account_name = local.service_account_email
container_concurrency = var.concurrency
containers {
image = "gcr.io/${var.gcr_project_id}/slo-generator:${var.slo_generator_version}"
image = "${var.slo_generator_image}:${var.slo_generator_version}"
command = ["slo-generator"]
args = [
"api",
Expand Down
10 changes: 5 additions & 5 deletions modules/slo-generator/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ variable "slo_configs" {
default = []
}

variable "gcr_project_id" {
description = "slo-generator image project id"
default = "slo-generator-ci-a2b4"
variable "slo_generator_image" {
description = "SLO generator image"
default = "ghcr.io/google/slo-generator"
}

variable "slo_generator_version" {
description = "slo-generator container image version"
default = "latest"
description = "SLO generator version"
default = "master"
}

variable "service_name" {
Expand Down