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
Extension values are inferred from composego.ServiceConfig
Extension values get parsed from composego.ServiceConfig.Extensions
Result of step 2 gets merged into result of step 1. This has some implications:
a. This code below will get overwritten by the parsed value, so it's important that Validate() is very strict as it's run against the result of the merge. https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/config/extensions.go#L187
b. If the result of Step 2 has a field that contains the zero value of the type (eg. Boolean false, int 0) then those values are ignored so it's important to keep that in mind.
Essentially validation now happens earlier and more formally, this means that the function project_service.go performs is no longer as relevant because this could be replaced with an adapter/converter that essentially takes a valid K8SConfiguration and produces the necessary K8S-specific values for manifests.
The text was updated successfully, but these errors were encountered:
project_service used to deal with the different labels as a just in time validator that supported the converter.
Example:
https://github.com/appvia/kev/blob/master/pkg/kev/converter/kubernetes/project_service.go#L55
Now this validation should be done at the moment when extensions get inferred, parsed and merged.
https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/config/extensions.go#L111
The new process is:
a. This code below will get overwritten by the parsed value, so it's important that Validate() is very strict as it's run against the result of the merge. https://github.com/appvia/kev/blob/5a1c05c568427024fb3ef76a9fc0a5d6bdd1e341/pkg/kev/config/extensions.go#L187
b. If the result of Step 2 has a field that contains the zero value of the type (eg. Boolean false, int 0) then those values are ignored so it's important to keep that in mind.
Essentially validation now happens earlier and more formally, this means that the function project_service.go performs is no longer as relevant because this could be replaced with an adapter/converter that essentially takes a valid K8SConfiguration and produces the necessary K8S-specific values for manifests.
The text was updated successfully, but these errors were encountered: