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

allow passing X.XX or X.XX.XX as k8s versions #2840

Merged
merged 3 commits into from
Nov 11, 2024
Merged

Conversation

dcmcand
Copy link
Contributor

@dcmcand dcmcand commented Nov 11, 2024

Reference Issues or PRs

Fixes #2822

What does this implement/fix?

Allows specifiying either major and minor versions, major minor and patch versions, or full versions of kubernetes for gcp. Also changes guided init so that if no version is specified, the latest patch version is used.

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

How to test this PR?

  1. Run either nebari init --guided-init and don't specify a kubernetes version or nebari init gcp -p your_project_name -d your_domain_name.org
  2. To validate, you can deploy to GCP or locally using 1.X, 1.X.X, and 1.X.X-gke.x
  3. Use

Any other comments?

@@ -57,7 +57,7 @@ def kubernetes_versions(region: str) -> List[str]:
credentials, project_id = load_credentials()
client = container_v1.ClusterManagerClient(credentials=credentials)
response = client.get_server_config(
name=f"projects/{project_id}/locations/{region}"
name=f"projects/{project_id}/locations/{region}", timeout=300
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was running into GRPC timeouts using the default 20s context timeout, so I set it to 5 minutes

@@ -359,6 +359,7 @@ class GCPNodeGroup(schema.Base):


class GoogleCloudPlatformProvider(schema.Base):
model_config = ConfigDict(coerce_numbers_to_str=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was interpreting 1.29 as a float instead of a string, so I had to make it explicitly use a string

@dcmcand dcmcand merged commit 3147aec into main Nov 11, 2024
24 of 26 checks passed
@dcmcand dcmcand deleted the allow-fuzzy-versions-gcp branch November 11, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

[BUG] - Invalid kubernetes-version provided error on GCP because of GKE patch release version
2 participants