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
Describe the current behavior
Today, we have per-resource ARM API versions, for example:
// +kubebuilder:validation:Enum={"2020-11-01"}
type LoadBalancersSpecApiVersion string
const LoadBalancersSpecApiVersion20201101 = LoadBalancersSpecApiVersion("2020-11-01")
This is used like so:
// ConvertToARM converts from a Kubernetes CRD object to an ARM object
func (loadBalancersSpec *LoadBalancers_Spec) ConvertToARM(name string, resolvedReferences genruntime.ResolvedReferences) (interface{}, error) {
...
result.ApiVersion = LoadBalancersSpecApiVersion20201101
...
Describe the improvement
Since our packages are per-API version anyway, I think we can do away with the per-resource APIVersion and instead just use a package global one, maybe called ARMAPIVersion.
1. Add a new pipeline stage to create (singleton) enum types for API versions
2. Update GetAPIVersion function generation to return this enum value
3. Correct TypeVisitor so it visits the API Version typename (if any) on resource types
4. Add a small hack into the Storage type creation to also copy API versions explicitly
This fixes#1554
Describe the current behavior
Today, we have per-resource ARM API versions, for example:
This is used like so:
Describe the improvement
Since our packages are per-API version anyway, I think we can do away with the per-resource APIVersion and instead just use a package global one, maybe called
ARMAPIVersion
.Then the tests could also use this via:
The text was updated successfully, but these errors were encountered: