Skip to content

Commit

Permalink
Add a new scheduler size to deployment schema (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ichung08 authored Aug 6, 2024
1 parent f7586a6 commit 4691be4
Show file tree
Hide file tree
Showing 11 changed files with 334 additions and 54 deletions.
20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,18 @@ build:
go generate ./...

.PHONY: api_client_gen
api_client_gen: $(ENVTEST_ASSETS_DIR)
# Install correct oapi-codegen version if not installed
@{ $(OAPI_CODEGEN) --version | grep $(DESIRED_OAPI_CODEGEN_VERSION) > /dev/null; } || go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@$(DESIRED_OAPI_CODEGEN_VERSION)
$(OAPI_CODEGEN) -include-tags=User,Invite,Team,ApiToken -generate=types,client -package=iam "${CORE_IAM_OPENAPI_SPEC}" > ./internal/clients/iam/api.gen.go
$(OAPI_CODEGEN) -include-tags=Organization,Workspace,Cluster,Options,Deployment,Role -generate=types,client -package=platform "${CORE_PLATFORM_OPENAPI_SPEC}" > ./internal/clients/platform/api.gen.go
api_client_gen:
@echo "Checking oapi-codegen installation..."
@if ! command -v oapi-codegen >/dev/null 2>&1; then \
echo "oapi-codegen not found. Installing..."; \
go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@$(DESIRED_OAPI_CODEGEN_VERSION); \
elif ! oapi-codegen --version | grep -q $(DESIRED_OAPI_CODEGEN_VERSION); then \
echo "Updating oapi-codegen to desired version..."; \
go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@$(DESIRED_OAPI_CODEGEN_VERSION); \
else \
echo "Correct version of oapi-codegen is already installed."; \
fi
@echo "Generating IAM API client..."
oapi-codegen -include-tags=User,Invite,Team,ApiToken -generate=types,client -package=iam "$(CORE_IAM_OPENAPI_SPEC)" > ./internal/clients/iam/api.gen.go
@echo "Generating Platform API client..."
oapi-codegen -include-tags=Organization,Workspace,Cluster,Options,Deployment,Role -generate=types,client -package=platform "$(CORE_PLATFORM_OPENAPI_SPEC)" > ./internal/clients/platform/api.gen.go
21 changes: 21 additions & 0 deletions docs/data-sources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ data "astro_cluster" "example" {
- `cloud_provider` (String) Cluster cloud provider
- `created_at` (String) Cluster creation timestamp
- `db_instance_type` (String) Cluster database instance type
- `health_status` (Attributes) Cluster health status (see [below for nested schema](#nestedatt--health_status))
- `is_limited` (Boolean) Whether the cluster is limited
- `metadata` (Attributes) Cluster metadata (see [below for nested schema](#nestedatt--metadata))
- `name` (String) Cluster name
Expand All @@ -47,12 +48,32 @@ data "astro_cluster" "example" {
- `vpc_subnet_range` (String) Cluster VPC subnet range
- `workspace_ids` (Set of String) Cluster workspace IDs

<a id="nestedatt--health_status"></a>
### Nested Schema for `health_status`

Read-Only:

- `details` (Attributes Set) Cluster health status details (see [below for nested schema](#nestedatt--health_status--details))
- `value` (String) Cluster health status value

<a id="nestedatt--health_status--details"></a>
### Nested Schema for `health_status.details`

Read-Only:

- `code` (String) Cluster health status detail code
- `description` (String) Cluster health status detail description
- `severity` (String) Cluster health status detail severity



<a id="nestedatt--metadata"></a>
### Nested Schema for `metadata`

Read-Only:

- `external_ips` (Set of String) Cluster external IPs
- `kube_dns_ip` (String) Cluster kube DNS IP
- `oidc_issuer_url` (String) Cluster OIDC issuer URL


Expand Down
21 changes: 21 additions & 0 deletions docs/data-sources/clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Read-Only:
- `cloud_provider` (String) Cluster cloud provider
- `created_at` (String) Cluster creation timestamp
- `db_instance_type` (String) Cluster database instance type
- `health_status` (Attributes) Cluster health status (see [below for nested schema](#nestedatt--clusters--health_status))
- `is_limited` (Boolean) Whether the cluster is limited
- `metadata` (Attributes) Cluster metadata (see [below for nested schema](#nestedatt--clusters--metadata))
- `name` (String) Cluster name
Expand All @@ -65,12 +66,32 @@ Read-Only:
- `vpc_subnet_range` (String) Cluster VPC subnet range
- `workspace_ids` (Set of String) Cluster workspace IDs

<a id="nestedatt--clusters--health_status"></a>
### Nested Schema for `clusters.health_status`

Read-Only:

- `details` (Attributes Set) Cluster health status details (see [below for nested schema](#nestedatt--clusters--health_status--details))
- `value` (String) Cluster health status value

<a id="nestedatt--clusters--health_status--details"></a>
### Nested Schema for `clusters.health_status.details`

Read-Only:

- `code` (String) Cluster health status detail code
- `description` (String) Cluster health status detail description
- `severity` (String) Cluster health status detail severity



<a id="nestedatt--clusters--metadata"></a>
### Nested Schema for `clusters.metadata`

Read-Only:

- `external_ips` (Set of String) Cluster external IPs
- `kube_dns_ip` (String) Cluster kube DNS IP
- `oidc_issuer_url` (String) Cluster OIDC issuer URL


Expand Down
21 changes: 21 additions & 0 deletions docs/resources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ resource "astro_cluster" "imported_cluster" {

- `created_at` (String) Cluster creation timestamp
- `db_instance_type` (String) Cluster database instance type
- `health_status` (Attributes) Cluster health status (see [below for nested schema](#nestedatt--health_status))
- `id` (String) Cluster identifier
- `is_limited` (Boolean) Whether the cluster is limited
- `metadata` (Attributes) Cluster metadata (see [below for nested schema](#nestedatt--metadata))
Expand All @@ -108,12 +109,32 @@ Optional:
- `update` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).


<a id="nestedatt--health_status"></a>
### Nested Schema for `health_status`

Read-Only:

- `details` (Attributes Set) Cluster health status details (see [below for nested schema](#nestedatt--health_status--details))
- `value` (String) Cluster health status value

<a id="nestedatt--health_status--details"></a>
### Nested Schema for `health_status.details`

Read-Only:

- `code` (String) Cluster health status detail code
- `description` (String) Cluster health status detail description
- `severity` (String) Cluster health status detail severity



<a id="nestedatt--metadata"></a>
### Nested Schema for `metadata`

Read-Only:

- `external_ips` (Set of String) Cluster external IPs
- `kube_dns_ip` (String) Cluster kube DNS IP
- `oidc_issuer_url` (String) Cluster OIDC issuer URL


Expand Down
91 changes: 67 additions & 24 deletions internal/clients/platform/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4691be4

Please sign in to comment.