-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add checks for seed existence in the create state #623
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
if !seedAvailable { | ||
msg := fmt.Sprintf("Seed for region %s doesn't exist", s.instance.Spec.Shoot.Region) |
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.
Alignment with KEB is:
- We provide in the error a list of available regions which include a seed
- We use a dedicated Error-Type for Seed-Not-Found reason
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.
Long term solution is to reply an JSON string in the error-reply to be able to provide structured data to KEB.
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.
Done
var seedList gardener_types.SeedList | ||
var regionsWithSeeds []string | ||
|
||
err := client.List(context.TODO(), &seedList) |
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.
We can pass context from sFnCreateShoot
function state here.
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.
Done.
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.
Regarding previous comment, I've learned from @akgalwas that
- It is intended for it to work like that (regarding resources consumption, there is a separate issue for labeling clusters for billings)
- Will be configured in KEB (not yet done)
@tobiscr could you check if that's how you envisioned it should work? If so, please remove the do-not-merge/hold
label to merge it (I've left LGTM, but I won't be available tomorrow to approve it).
This would indicate a misbehaviour - the cluster should not be created if we cannot fulfil the requirement that Seed and Shoot are in the same region. It would not help to create the cluster as customers don't want a shoot in a different region than the seed.
When a customer creates a Kyma runtime via BTP cockpit, they can set a checkbox to inform us, that the created shoot has to be in the same region as the seed. So, yes - KEB is setting the field in RuntimeCR, but the decision if this field is TRUE or FALSE comes from customers. |
Description
Changes proposed in this pull request:
Related issue(s)
#561