-
Notifications
You must be signed in to change notification settings - Fork 286
feat: add sample for flex reservation #849
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2af4c92
Adding sample for flex reservation
raushan2016 97c2b3f
Fix spacing
raushan2016 e2b9847
Add provider as google-beta
raushan2016 abd112a
formatting
raushan2016 cb3a20c
Moving to separate folder and adding test skip file
raushan2016 f7856d1
fmt
raushan2016 9df7c63
Update gke/standard/zonal/dws/main.tf
raushan2016 f0449f9
fmt
raushan2016 07407a8
Merge branch 'main' into main
glasnt e674a74
Validated change
raushan2016 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| /** | ||
| * Copyright 2025 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| # [START gke_standard_zonal_dws_flex_cluster] | ||
| # DWS Flex currently require project allowlisting, please follow steps from here | ||
| # https://cloud.google.com/kubernetes-engine/docs/concepts/dws | ||
| resource "google_container_cluster" "default" { | ||
| name = "gke-standard-zonal-flex-cluster" | ||
| location = "us-central1-a" | ||
| initial_node_count = 1 | ||
| min_master_version = "1.32.2-gke.1652000" | ||
| release_channel { | ||
| # To use flex-start in GKE, your cluster must use version 1.32.2-gke.1652000 or later. | ||
| channel = "RAPID" | ||
| } | ||
| node_config { | ||
| machine_type = "e2-medium" | ||
| } | ||
| } | ||
| # [END gke_standard_zonal_dws_flex_cluster] | ||
|
|
||
| # [START gke_standard_zonal_dws_non_q_flex] | ||
| resource "google_container_node_pool" "default" { | ||
| provider = google-beta | ||
| name = "gke-standard-zonal-dws-non-q-flex" | ||
| cluster = google_container_cluster.default.name | ||
| location = google_container_cluster.default.location | ||
|
|
||
| autoscaling { | ||
| total_min_node_count = 0 | ||
| total_max_node_count = 1 | ||
| } | ||
|
|
||
| queued_provisioning { | ||
| enabled = false | ||
| } | ||
|
|
||
| # More details on usage https://cloud.google.com/kubernetes-engine/docs/how-to/dws-flex-start-training | ||
| node_config { | ||
| machine_type = "a3-highgpu-8g" | ||
| flex_start = true | ||
|
|
||
| reservation_affinity { | ||
| consume_reservation_type = "NO_RESERVATION" | ||
| } | ||
| } | ||
| } | ||
| # [END gke_standard_zonal_dws_non_q_flex] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # DWS Flex is currently behind project allowlist. https://cloud.google.com/kubernetes-engine/docs/concepts/dws#methods | ||
| apiVersion: blueprints.cloud.google.com/v1alpha1 | ||
| kind: BlueprintTest | ||
| metadata: | ||
| name: gke_standard_zonal_dws | ||
| spec: | ||
| skip: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.