digitalocean / digitalocean-cloud-controller-manager

Kubernetes cloud-controller-manager for DigitalOcean (beta)
Apache License 2.0
527 stars 149 forks source link

CON-7849 / Extract annotation parsing on service objects into the DO package #569

Closed elijahomolo closed 1 year ago

elijahomolo commented 1 year ago

https://jira.internal.digitalocean.com/browse/CON-7849

varshavaradarajan commented 1 year ago

@timoreimann - so, this is the dir structure we were thinking:

cloud-controller-manager/cmd/webhook/main.go -- this sets up controller-runtime's standalone webhook server
cloud-controller-manager/cmd/webhook/Dockerfile -- this builds the webhook image
cloud-controller-manager/do/doks_lb_validator.go -- this contains the validating webhook logic where we use a godo client to make the validate call

And update the Makefile so that cloud-controller-manager/releases/vx.x.x.yaml contains the ValidatingWebhookConfiguration and updates the CCM deployment to have a second container for the webhook server.

Since doks_lb_validator.go is in the do pkg, we thought that it is not necessary to extract the annotation parsing to another pkg.