-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(kubernetes): Change UID validation #6869
base: master
Are you sure you want to change the base?
fix(kubernetes): Change UID validation #6869
Conversation
api/src/backend/api/models.py
Outdated
value, | ||
): | ||
raise ModelValidationError( | ||
detail="The value must either be a valid Kubernetes UID (up to 63 characters, " | ||
"starting and ending with a lowercase letter or number, containing only " | ||
"lowercase alphanumeric characters and hyphens) or a valid EKS ARN.", | ||
"lowercase alphanumeric characters and hyphens) or a valid AWS EKS ARN, GCP GKE ID or Azure AKS ID.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MrCloudSec could you please review the wording here? Thanks!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6869 +/- ##
==========================================
+ Coverage 93.40% 93.45% +0.05%
==========================================
Files 70 71 +1
Lines 6412 6446 +34
==========================================
+ Hits 5989 6024 +35
+ Misses 423 422 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description
Change Kubernetes provider validation:
^[a-z0-9][A-Za-z0-9_.:\/-]{1,250}$
Now the following K8s cluster names from AWS EKS, AKS and GKE can be added:
arn:aws:eks:us-east-1:111122223333:cluster/test-cluster-name-longer-than-63-characters
gke_aaaa-dev_europe-test1_dev-aaaa-cluster-name-longer-than-63-characters
Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.