You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#845 introduces an ability to deploy multiple kong addons into a cluster.
environment.Builder allows adding addons via WithAddons()
The problem with the current implementation is that it silently overwrites already added addons by name. So for instance if based on #845 we were to write:
This would silently pass but the cluster would only get 1 addon deployed.
func (b *Builder) WithAddons(addons ...clusters.Addon) *Builder doesn't return an error so it cannot act when called with an addon that has a name that's already added.
Proposed solution
We have several options to address this:
make Builder.addons a slice not a map (of type type Addons map[AddonName]Addon)
make Builder.addons return an error when an addon with the same name (and type?) already exists
The text was updated successfully, but these errors were encountered:
Problem statement
#845 introduces an ability to deploy multiple kong addons into a cluster.
environment.Builder
allows adding addons viaWithAddons()
The problem with the current implementation is that it silently overwrites already added addons by name. So for instance if based on #845 we were to write:
This would silently pass but the cluster would only get 1 addon deployed.
func (b *Builder) WithAddons(addons ...clusters.Addon) *Builder
doesn't return an error so it cannot act when called with an addon that has a name that's already added.Proposed solution
We have several options to address this:
Builder.addons
a slice not amap
(of typetype Addons map[AddonName]Addon
)Builder.addons
return anerror
when an addon with the same name (and type?) already existsThe text was updated successfully, but these errors were encountered: