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
{{ message }}
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
Some of these params are text, some are other objects. It's unclear from the definition. To make it more confusing, there's also builder methods like "withContainers", which presumably provide same functionality.
Suggestion:
Have a consistent constructor (single name param for named objects, else no param constructor):
local mydep = deployment.new("frontend")
.withReplicas(2)
.withContainers(...);
The text was updated successfully, but these errors were encountered:
If there's no desire to do more, at least all parameters need to be optional! Also, documentation should recommend the usage of named parameters instead of unreadable positional ones!
Rather than have multiple parameters in the constructors, prefer to have a single (or no param) constructor.
Currently the constructors take a variable number of parameters, and it's hard to know what's required. For example:
Deployment - new(name, replicas, containers, podLabels={app: name})
Service - new(name, selector, ports)
Some of these params are text, some are other objects. It's unclear from the definition. To make it more confusing, there's also builder methods like "withContainers", which presumably provide same functionality.
Suggestion:
Have a consistent constructor (single name param for named objects, else no param constructor):
local mydep = deployment.new("frontend")
.withReplicas(2)
.withContainers(...);
The text was updated successfully, but these errors were encountered: