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
Copy file name to clipboardExpand all lines: staging/src/k8s.io/api/core/v1/types.go
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4981,6 +4981,20 @@ type ServiceProxyOptions struct {
4981
4981
}
4982
4982
4983
4983
// ObjectReference contains enough information to let you inspect or modify the referred object.
4984
+
// ---
4985
+
// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
4986
+
// 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
4987
+
// 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
4988
+
// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
4989
+
// Those cannot be well described when embedded.
4990
+
// 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4991
+
// 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
4992
+
// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
4993
+
// and the version of the actual struct is irrelevant.
4994
+
// 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
4995
+
// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
4996
+
// Instead of using this type, create a locally provided and used type that is well-focused on your reference.
4997
+
// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
0 commit comments