gefyrahq / gefyra

Blazingly-fast :rocket:, rock-solid, local application development :arrow_right: with Kubernetes.
https://gefyra.dev
Apache License 2.0
680 stars 28 forks source link

Gyfera Operator, minimal PVC size #670

Open trin4ik opened 2 months ago

trin4ik commented 2 months ago

What is the new feature about?

https://github.com/gefyrahq/gefyra/blob/8d1137de00e18dc2d1272d63ec75a0dadfeead31/operator/gefyra/connection/stowaway/resources/statefulsets.py#L80 Need to modify size of PVC

Why would such a feature be important to you?

Hi, my k8s provider can create network disk with 5Gi minimal size, but gefyra operator try to create 50Mi. And when i try gefyra install | k apply -f - i have error:

Warning  ProvisioningFailed    16s (x3 over 35s)   disk-csi-driver.mks.ycloud.io_mk8s-master-cattjqnan62e85cq7aet_b6b201f2-0fd9-4083-994c-4319642f178c  (combined from similar events): failed to provision volume with StorageClass "yc-network-hdd": rpc error: code = InvalidArgument desc = Disk creation (name:"pvc-69cf5c1f-ab35-4d5f-a7b7-0245685630cf" capacity_range:<required_bytes:52428800 > volume_capabilities:<mount:<fs_type:"ext4" > access_mode:<mode:SINGLE_NODE_WRITER > > parameters:<key:"type" value:"network-hdd" > accessibility_requirements:<requisite:<segments:<key:"failure-domain.beta.kubernetes.io/zone" value:"ru-central1-d" > > preferred:<segments:<key:"failure-domain.beta.kubernetes.io/zone" value:"ru-central1-d" > > > ) failed: request-id = 793b902b-3842-4f2e-bb64-c2ada4d9597e rpc error: code = InvalidArgument desc = Request validation error: disk size must be multiple of 4194304

I created the pvc manually and everything works. I think need something like values.yaml in helm for similar problems. It might make sense to make a similar feature, it would be just as useful for presets. If you make the template as you want to see it in your project at least at the level of current presets, I'll make a PR for my problem

Anything else we need to know?

No response

SteinRobert commented 2 months ago

We'll look into that. It seems a quite provider specific problem - I'll check with the team.

Schille commented 2 weeks ago

@trin4ik You are right. Do you have the capacity to provide a PR to make this field variable, as an ENV for the operator? Subsequently, we could make it part of the installation script as an option to the gefyra install command, here:

https://github.com/gefyrahq/gefyra/blob/8d1137de00e18dc2d1272d63ec75a0dadfeead31/client/gefyra/misc/comps/deployment.py#L44-L52