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

Fix submodule paths in READMEs. #62

Merged
merged 1 commit into from
Jan 3, 2024
Merged
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
12 changes: 12 additions & 0 deletions hack/update-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

# Update terraform docs
for d in `find . -name '*.tf' -exec dirname {} \; | sort | uniq`; do
echo "###############################################"
echo "# Generating $d"
terraform-docs markdown table \
--output-file README.md \
--output-mode inject \
$d
done
12 changes: 6 additions & 6 deletions modules/cloudevent-broker/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# `cloudevent-broker`

This module provisions a regionalizied Broker abstraction akin to the Knative
"Broker" concept. The dual "Trigger" concept is captured by the sibling
`cloudevent-trigger` module. The intended usage of this module for publishing
"Broker" concept. The dual "Trigger" concept is captured by the sibling
`cloudevent-trigger` module. The intended usage of this module for publishing
events is something like this:

```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"

name = "my-networking"
project_id = var.project_id
Expand All @@ -17,7 +17,7 @@ module "networking" {

// Create the Broker abstraction.
module "cloudevent-broker" {
source = "chainguard-dev/common/infra//cloudevent-broker"
source = "chainguard-dev/common/infra//modules/cloudevent-broker"

name = "my-broker"
project_id = var.project_id
Expand All @@ -28,7 +28,7 @@ module "cloudevent-broker" {
module "foo-emits-events" {
for_each = module.networking.regional-networks

source = "chainguard-dev/common/infra//authorize-private-service"
source = "chainguard-dev/common/infra//modules/authorize-private-service"

project_id = var.project_id
region = each.key
Expand All @@ -40,7 +40,7 @@ module "foo-emits-events" {
// Run a cloud run service as the "foo" service account, and pass in the address
// of the regional ingress endpoint.
module "foo-service" {
source = "chainguard-dev/common/infra//regional-go-service"
source = "chainguard-dev/common/infra//modules/regional-go-service"

project_id = var.project_id
name = "foo"
Expand Down
6 changes: 3 additions & 3 deletions modules/cloudevent-recorder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ intended usage of this module for publishing events is something like this:
```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"

name = "my-networking"
project_id = var.project_id
Expand All @@ -18,7 +18,7 @@ module "networking" {

// Create the Broker abstraction.
module "cloudevent-broker" {
source = "chainguard-dev/common/infra//cloudevent-broker"
source = "chainguard-dev/common/infra//modules/cloudevent-broker"

name = "my-broker"
project_id = var.project_id
Expand All @@ -27,7 +27,7 @@ module "cloudevent-broker" {

// Record cloudevents of type com.example.foo and com.example.bar
module "foo-emits-events" {
source = "chainguard-dev/common/infra//cloudevent-recorder"
source = "chainguard-dev/common/infra//modules/cloudevent-recorder"

name = "my-recorder"
project_id = var.project_id
Expand Down
14 changes: 7 additions & 7 deletions modules/cloudevent-trigger/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# `cloudevent-trigger`

This module provisions regionalizied event-triggered services using a Trigger
abstraction akin to the Knative "Trigger" concept. The dual "Broker" concept
is captured by the sibling `cloudevent-broker` module. The intended usage of
this module for consuming events is something like this:
abstraction akin to the Knative "Trigger" concept. The dual "Broker" concept is
captured by the sibling `cloudevent-broker` module. The intended usage of this
module for consuming events is something like this:

```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"

name = "my-networking"
project_id = var.project_id
Expand All @@ -17,15 +17,15 @@ module "networking" {

// Create the Broker abstraction.
module "cloudevent-broker" {
source = "chainguard-dev/common/infra//cloudevent-broker"
source = "chainguard-dev/common/infra//modules/cloudevent-broker"

name = "my-broker"
project_id = var.project_id
regions = module.networking.regional-networks
}

module "bar-service" {
source = "chainguard-dev/common/infra//regional-go-service"
source = "chainguard-dev/common/infra//modules/regional-go-service"

project_id = var.project_id
name = "bar"
Expand All @@ -48,7 +48,7 @@ module "bar-service" {
module "cloudevent-trigger" {
for_each = module.networking.regional-networks

source = "chainguard-dev/common/infra//cloudevent-trigger"
source = "chainguard-dev/common/infra//modules/cloudevent-trigger"

name = "bar"
project_id = var.project_id
Expand Down
16 changes: 10 additions & 6 deletions modules/dashboard/cloudevent-receiver/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# `dashboard/cloudevent-receiver`

This module provisions a Google Cloud Monitoring dashboard for a regionalized Cloud Run service that receives Cloud Events from one or more `cloudevent-trigger`.
This module provisions a Google Cloud Monitoring dashboard for a regionalized
Cloud Run service that receives Cloud Events from one or more
`cloudevent-trigger`.

It assumes the service has the same name in all regions.

```hcl
// Create a network with several regional subnets
module "networking" {
source = "chainguard-dev/common/infra//networking"
source = "chainguard-dev/common/infra//modules/networking"

name = "my-networking"
project_id = var.project_id
Expand All @@ -16,7 +18,7 @@ module "networking" {

// Run a regionalized cloud run service "receiver" to handle events.
module "receiver" {
source = "chainguard-dev/common/infra//regional-go-service"
source = "chainguard-dev/common/infra//modules/regional-go-service"

project_id = var.project_id
name = "receiver"
Expand All @@ -37,7 +39,7 @@ module "receiver" {
module "cloudevent-trigger" {
for_each = module.networking.regional-networks

source = "chainguard-dev/common/infra//cloudevent-trigger"
source = "chainguard-dev/common/infra//modules/cloudevent-trigger"

name = "my-trigger"
project_id = var.project_id
Expand All @@ -53,7 +55,7 @@ module "cloudevent-trigger" {

// Set up a dashboard for a regionalized event handler named "receiver".
module "receiver-dashboard" {
source = "chainguard-dev/common/infra//dashboard/cloudevent-receiver"
source = "chainguard-dev/common/infra//modules/dashboard/cloudevent-receiver"
service_name = "receiver"

triggers = {
Expand All @@ -62,7 +64,9 @@ module "receiver-dashboard" {
}
```

The dashboard it creates includes widgets for service logs, request count, latency (p50,p95,p99), instance count grouped by revision, CPU and memory utilization, startup latency, and sent/received bytes.
The dashboard it creates includes widgets for service logs, request count,
latency (p50,p95,p99), instance count grouped by revision, CPU and memory
utilization, startup latency, and sent/received bytes.

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand Down
5 changes: 3 additions & 2 deletions modules/dashboard/job/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ resource "google_cloud_run_v2_job" "sync" {

// Set up a dashboard for a regionalized job named "sync".
module "job-dashboard" {
source = "chainguard-dev/common/infra//dashboard/job"
source = "chainguard-dev/common/infra//modules/dashboard/job"
service_name = google_cloud_run_v2_job.name
}
```

The dashboard it creates includes widgets for job logs, CPU and memory utilization, startup latency, and sent/received bytes.
The dashboard it creates includes widgets for job logs, CPU and memory
utilization, startup latency, and sent/received bytes.

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand Down
35 changes: 35 additions & 0 deletions modules/dashboard/sections/alerts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_alert"></a> [alert](#module\_alert) | ../../widgets/alert | n/a |
| <a name="module_collapsible"></a> [collapsible](#module\_collapsible) | ../collapsible | n/a |
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_alert"></a> [alert](#input\_alert) | n/a | `string` | n/a | yes |
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |
<!-- END_TF_DOCS -->
33 changes: 33 additions & 0 deletions modules/dashboard/sections/collapsible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_tiles"></a> [tiles](#input\_tiles) | n/a | `any` | n/a | yes |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |
<!-- END_TF_DOCS -->
39 changes: 39 additions & 0 deletions modules/dashboard/sections/grpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_collapsible"></a> [collapsible](#module\_collapsible) | ../collapsible | n/a |
| <a name="module_incoming_latency"></a> [incoming\_latency](#module\_incoming\_latency) | ../../widgets/latency | n/a |
| <a name="module_outbound_latency"></a> [outbound\_latency](#module\_outbound\_latency) | ../../widgets/latency | n/a |
| <a name="module_outbound_request_count"></a> [outbound\_request\_count](#module\_outbound\_request\_count) | ../../widgets/xy | n/a |
| <a name="module_request_count"></a> [request\_count](#module\_request\_count) | ../../widgets/xy | n/a |
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_filter"></a> [filter](#input\_filter) | n/a | `list(string)` | n/a | yes |
| <a name="input_service_name"></a> [service\_name](#input\_service\_name) | n/a | `string` | n/a | yes |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |
<!-- END_TF_DOCS -->
39 changes: 39 additions & 0 deletions modules/dashboard/sections/http/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_collapsible"></a> [collapsible](#module\_collapsible) | ../collapsible | n/a |
| <a name="module_incoming_latency"></a> [incoming\_latency](#module\_incoming\_latency) | ../../widgets/latency | n/a |
| <a name="module_outbound_request_count"></a> [outbound\_request\_count](#module\_outbound\_request\_count) | ../../widgets/xy | n/a |
| <a name="module_outbound_request_latency"></a> [outbound\_request\_latency](#module\_outbound\_request\_latency) | ../../widgets/latency | n/a |
| <a name="module_request_count"></a> [request\_count](#module\_request\_count) | ../../widgets/xy | n/a |
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_collapsed"></a> [collapsed](#input\_collapsed) | n/a | `bool` | `false` | no |
| <a name="input_filter"></a> [filter](#input\_filter) | n/a | `list(string)` | n/a | yes |
| <a name="input_service_name"></a> [service\_name](#input\_service\_name) | n/a | `string` | n/a | yes |
| <a name="input_title"></a> [title](#input\_title) | n/a | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_section"></a> [section](#output\_section) | n/a |
<!-- END_TF_DOCS -->
31 changes: 31 additions & 0 deletions modules/dashboard/sections/layout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

No requirements.

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_width"></a> [width](#module\_width) | ../width | n/a |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_sections"></a> [sections](#input\_sections) | n/a | `any` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_tiles"></a> [tiles](#output\_tiles) | n/a |
<!-- END_TF_DOCS -->
Loading
Loading