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: config/crd/bases/core.k8sgpt.ai_mutations.yaml
+51-63Lines changed: 51 additions & 63 deletions
Original file line number
Diff line number
Diff line change
@@ -116,78 +116,66 @@ spec:
116
116
resourceGVK:
117
117
type: string
118
118
result:
119
-
description: Result is the Schema for the results API
119
+
description: |-
120
+
ObjectReference contains enough information to let you inspect or modify the referred object.
121
+
---
122
+
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
123
+
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.
124
+
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
125
+
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
126
+
Those cannot be well described when embedded.
127
+
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.
128
+
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
129
+
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
130
+
and the version of the actual struct is irrelevant.
131
+
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
132
+
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
133
+
134
+
135
+
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
136
+
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
120
137
properties:
121
138
apiVersion:
139
+
description: API version of the referent.
140
+
type: string
141
+
fieldPath:
122
142
description: |-
123
-
APIVersion defines the versioned schema of this representation of an object.
124
-
Servers should convert recognized schemas to the latest internal value, and
125
-
may reject unrecognized values.
126
-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
143
+
If referring to a piece of an object instead of an entire object, this string
144
+
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
145
+
For example, if the object reference is to a container within a pod, this would take on a value like:
146
+
"spec.containers{name}" (where "name" refers to the name of the container that triggered
147
+
the event) or if no container name is specified "spec.containers[2]" (container with
148
+
index 2 in this pod). This syntax is chosen only to have some well-defined way of
149
+
referencing a part of an object.
150
+
TODO: this design is not final and this field is subject to change in the future.
127
151
type: string
128
152
kind:
129
153
description: |-
130
-
Kind is a string value representing the REST resource this object represents.
131
-
Servers may infer this from the endpoint the client submits requests to.
132
-
Cannot be updated.
133
-
In CamelCase.
154
+
Kind of the referent.
134
155
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
135
156
type: string
136
-
metadata:
137
-
type: object
138
-
spec:
139
-
description: ResultSpec defines the desired state of Result
140
-
properties:
141
-
autoRemediationStatus:
142
-
properties:
143
-
phase:
144
-
description: Enum for Phase
145
-
type: integer
146
-
type: object
147
-
backend:
148
-
type: string
149
-
details:
150
-
type: string
151
-
error:
152
-
items:
153
-
properties:
154
-
sensitive:
155
-
items:
156
-
properties:
157
-
masked:
158
-
type: string
159
-
unmasked:
160
-
type: string
161
-
type: object
162
-
type: array
163
-
text:
164
-
type: string
165
-
type: object
166
-
type: array
167
-
kind:
168
-
type: string
169
-
name:
170
-
type: string
171
-
parentObject:
172
-
type: string
173
-
required:
174
-
- autoRemediationStatus
175
-
- backend
176
-
- details
177
-
- error
178
-
- kind
179
-
- name
180
-
- parentObject
181
-
type: object
182
-
status:
183
-
description: ResultStatus defines the observed state of Result
184
-
properties:
185
-
lifecycle:
186
-
type: string
187
-
webhook:
188
-
type: string
189
-
type: object
157
+
name:
158
+
description: |-
159
+
Name of the referent.
160
+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
161
+
type: string
162
+
namespace:
163
+
description: |-
164
+
Namespace of the referent.
165
+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
166
+
type: string
167
+
resourceVersion:
168
+
description: |-
169
+
Specific resourceVersion to which this reference is made, if any.
170
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
171
+
type: string
172
+
uid:
173
+
description: |-
174
+
UID of the referent.
175
+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
176
+
type: string
190
177
type: object
178
+
x-kubernetes-map-type: atomic
191
179
similarityScore:
192
180
description: |-
193
181
INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
0 commit comments