mercedes-benz / garm-operator

a k8s operator to run garm
MIT License
20 stars 2 forks source link

Ability to specify same flavor and image under a different pool name #139

Open gustaff-weldon opened 2 months ago

gustaff-weldon commented 2 months ago

What is the feature you would like to have?

We are using logical pool names created not after runner size, but after purpose. Thus we might have two runner pools with the same machine flavor under two names, as we manage underlying machine size independently for each pool. Atm, operator disallows cration of such pools if flavor, image and repository are the same (even if name differs).

Error: failed to create resource: admission webhook "validate.pool.garm-operator.mercedes-benz.com" 
denied the request: can not create pool, pool=medium with same image=ubuntu-22, flavor=e2-standard-4 
and provider=gcp_external already exists for specified GitHubScope=monorepo

We would like ability to lessen that limitation.

Anything else you would like to add?

No response

gustaff-weldon commented 2 months ago

Also, the admission webhook seems to not work properly (race condition) as I was able to create two pools with the same flavor: Screenshot 2024-06-28 at 14 47 27

bavarianbidi commented 2 months ago

Hey @gustaff-weldon thanks for raising this issue and for using the operator :pray:

The reason for that limitation is a garm limitation which exists till v0.1.4. Gabriel removed that limitation in https://github.com/cloudbase/garm/pull/246

I'm not sure yet, if we should extend the operator in that way, that versions <= v0.1.4 are supported or explicitly pin operator versions to certain garm versions.