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
Map restrictions are sometimes required to apply CEL validation rules. Those rules can't be used at the moment because we don't offer a way to configure the topology.
/** * Annotates a map or object to further describe its topology. * <p> * Emits {@code x-kubernetes-map-type} * </p> */@Inherited@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface MapType {
/** * @return the map type */Typevalue() defaultType.GRANULAR;
/** * The Kubernetes Map Type */enumType {
/** * These maps are actual maps (key-value pairs) and each field is independent * of each other (they can each be manipulated by separate actors). This is * the default behaviour for all maps. */GRANULAR,
/** * The map is treated as a single entity, like a scalar. * Atomic maps will be entirely replaced when updated. */ATOMIC
}
}
Is your enhancement related to a problem? Please describe
In Kubernetes the topology of maps can be described further:
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#jsonschemaprops-v1-apiextensions-k8s-io
Map restrictions are sometimes required to apply CEL validation rules. Those rules can't be used at the moment because we don't offer a way to configure the topology.
Relates to #5881
Describe the solution you'd like
Suggested Annotation:
Describe alternatives you've considered
No response
Additional context
Example:
https://github.com/baloo42/crd-generator-victools/blob/main/test/src/test/java/io/fabric8/crd/generator/victools/approvaltests/maptype/MapTypeSpec.java
https://github.com/baloo42/crd-generator-victools/blob/main/test/src/test/resources/io/fabric8/crd/generator/victools/approvaltests/CRDGeneratorVictoolsApprovalTest.approvalTest.maptypes.samples.fabric8.io.v1.approved.yml
The text was updated successfully, but these errors were encountered: