mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Add XMapType to the extensions API
This commit is contained in:
		@@ -527,6 +527,7 @@ API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiexten
 | 
				
			|||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XIntOrString
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XIntOrString
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XListMapKeys
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XListMapKeys
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XListType
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XListType
 | 
				
			||||||
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XMapType
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XPreserveUnknownFields
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XPreserveUnknownFields
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrArray,JSONSchemas
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrArray,JSONSchemas
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrArray,Schema
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrArray,Schema
 | 
				
			||||||
@@ -542,6 +543,7 @@ API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiexten
 | 
				
			|||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XIntOrString
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XIntOrString
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XListMapKeys
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XListMapKeys
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XListType
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XListType
 | 
				
			||||||
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XMapType
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XPreserveUnknownFields
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XPreserveUnknownFields
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrArray,JSONSchemas
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrArray,JSONSchemas
 | 
				
			||||||
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrArray,Schema
 | 
					API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrArray,Schema
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -284,5 +284,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if in.XMapType != nil {
 | 
				
			||||||
 | 
							in, out := &in.XMapType, &out.XMapType
 | 
				
			||||||
 | 
							*out = new(string)
 | 
				
			||||||
 | 
							**out = **in
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return out
 | 
						return out
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -109,6 +109,18 @@ type JSONSchemaProps struct {
 | 
				
			|||||||
	//      used to identify them. Order is preserved upon merge. The map tag
 | 
						//      used to identify them. Order is preserved upon merge. The map tag
 | 
				
			||||||
	//      must only be used on a list with elements of type object.
 | 
						//      must only be used on a list with elements of type object.
 | 
				
			||||||
	XListType *string
 | 
						XListType *string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// x-kubernetes-map-type annotates an object to further describe its topology.
 | 
				
			||||||
 | 
						// This extension must only be used when type is object and may have 2 possible values:
 | 
				
			||||||
 | 
						//
 | 
				
			||||||
 | 
						// 1) `granular`:
 | 
				
			||||||
 | 
						//      These maps are actual maps (key-value pairs) and each fields are independent
 | 
				
			||||||
 | 
						//      from each other (they can each be manipulated by separate actors). This is
 | 
				
			||||||
 | 
						//      the default behaviour for all maps.
 | 
				
			||||||
 | 
						// 2) `atomic`: the list is treated as a single entity, like a scalar.
 | 
				
			||||||
 | 
						//      Atomic maps will be entirely replaced when updated.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						XMapType *string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// JSON represents any valid JSON value.
 | 
					// JSON represents any valid JSON value.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -244,5 +244,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if in.XMapType != nil {
 | 
				
			||||||
 | 
							in, out := &in.XMapType, &out.XMapType
 | 
				
			||||||
 | 
							*out = new(string)
 | 
				
			||||||
 | 
							**out = **in
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return out
 | 
						return out
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,6 +117,18 @@ type JSONSchemaProps struct {
 | 
				
			|||||||
	// Defaults to atomic for arrays.
 | 
						// Defaults to atomic for arrays.
 | 
				
			||||||
	// +optional
 | 
						// +optional
 | 
				
			||||||
	XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"`
 | 
						XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// x-kubernetes-map-type annotates an object to further describe its topology.
 | 
				
			||||||
 | 
						// This extension must only be used when type is object and may have 2 possible values:
 | 
				
			||||||
 | 
						//
 | 
				
			||||||
 | 
						// 1) `granular`:
 | 
				
			||||||
 | 
						//      These maps are actual maps (key-value pairs) and each fields are independent
 | 
				
			||||||
 | 
						//      from each other (they can each be manipulated by separate actors). This is
 | 
				
			||||||
 | 
						//      the default behaviour for all maps.
 | 
				
			||||||
 | 
						// 2) `atomic`: the list is treated as a single entity, like a scalar.
 | 
				
			||||||
 | 
						//      Atomic maps will be entirely replaced when updated.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// JSON represents any valid JSON value.
 | 
					// JSON represents any valid JSON value.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -260,5 +260,11 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if in.XMapType != nil {
 | 
				
			||||||
 | 
							in, out := &in.XMapType, &out.XMapType
 | 
				
			||||||
 | 
							*out = new(string)
 | 
				
			||||||
 | 
							**out = **in
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return out
 | 
						return out
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,6 +117,18 @@ type JSONSchemaProps struct {
 | 
				
			|||||||
	// Defaults to atomic for arrays.
 | 
						// Defaults to atomic for arrays.
 | 
				
			||||||
	// +optional
 | 
						// +optional
 | 
				
			||||||
	XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"`
 | 
						XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// x-kubernetes-map-type annotates an object to further describe its topology.
 | 
				
			||||||
 | 
						// This extension must only be used when type is object and may have 2 possible values:
 | 
				
			||||||
 | 
						//
 | 
				
			||||||
 | 
						// 1) `granular`:
 | 
				
			||||||
 | 
						//      These maps are actual maps (key-value pairs) and each fields are independent
 | 
				
			||||||
 | 
						//      from each other (they can each be manipulated by separate actors). This is
 | 
				
			||||||
 | 
						//      the default behaviour for all maps.
 | 
				
			||||||
 | 
						// 2) `atomic`: the list is treated as a single entity, like a scalar.
 | 
				
			||||||
 | 
						//      Atomic maps will be entirely replaced when updated.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// JSON represents any valid JSON value.
 | 
					// JSON represents any valid JSON value.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -246,6 +246,7 @@ func newExtensions(s *apiextensions.JSONSchemaProps) (*Extensions, error) {
 | 
				
			|||||||
		XIntOrString:      s.XIntOrString,
 | 
							XIntOrString:      s.XIntOrString,
 | 
				
			||||||
		XListMapKeys:      s.XListMapKeys,
 | 
							XListMapKeys:      s.XListMapKeys,
 | 
				
			||||||
		XListType:         s.XListType,
 | 
							XListType:         s.XListType,
 | 
				
			||||||
 | 
							XMapType:          s.XMapType,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if s.XPreserveUnknownFields != nil {
 | 
						if s.XPreserveUnknownFields != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,6 +84,9 @@ func (x *Extensions) toGoOpenAPI(ret *spec.Schema) {
 | 
				
			|||||||
	if x.XListType != nil {
 | 
						if x.XListType != nil {
 | 
				
			||||||
		ret.VendorExtensible.AddExtension("x-kubernetes-list-type", *x.XListType)
 | 
							ret.VendorExtensible.AddExtension("x-kubernetes-list-type", *x.XListType)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if x.XMapType != nil {
 | 
				
			||||||
 | 
							ret.VendorExtensible.AddExtension("x-kubernetes-map-type", *x.XMapType)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (v *ValueValidation) toGoOpenAPI(ret *spec.Schema) {
 | 
					func (v *ValueValidation) toGoOpenAPI(ret *spec.Schema) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -115,6 +115,18 @@ type Extensions struct {
 | 
				
			|||||||
	//      used to identify them. Order is preserved upon merge. The map tag
 | 
						//      used to identify them. Order is preserved upon merge. The map tag
 | 
				
			||||||
	//      must only be used on a list with elements of type object.
 | 
						//      must only be used on a list with elements of type object.
 | 
				
			||||||
	XListType *string
 | 
						XListType *string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// x-kubernetes-map-type annotates an object to further describe its topology.
 | 
				
			||||||
 | 
						// This extension must only be used when type is object and may have 2 possible values:
 | 
				
			||||||
 | 
						//
 | 
				
			||||||
 | 
						// 1) `granular`:
 | 
				
			||||||
 | 
						//      These maps are actual maps (key-value pairs) and each fields are independent
 | 
				
			||||||
 | 
						//      from each other (they can each be manipulated by separate actors). This is
 | 
				
			||||||
 | 
						//      the default behaviour for all maps.
 | 
				
			||||||
 | 
						// 2) `atomic`: the list is treated as a single entity, like a scalar.
 | 
				
			||||||
 | 
						//      Atomic maps will be entirely replaced when updated.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						XMapType *string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// +k8s:deepcopy-gen=true
 | 
					// +k8s:deepcopy-gen=true
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user