Skip to content

Commit d2316b0

Browse files
committed
separate: add patch keys to types
1 parent 06252ae commit d2316b0

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

pkg/deploy/apis/apps/v1/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ type DeploymentConfigStatus struct {
299299
// This could be based on a change made by the user or caused by an automatic trigger
300300
Details *DeploymentDetails `json:"details,omitempty" protobuf:"bytes,7,opt,name=details"`
301301
// Conditions represents the latest available observations of a deployment config's current state.
302+
// +patchMergeKey=type
303+
// +patchStrategy=merge
302304
Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,8,rep,name=conditions"`
303305
// Total number of ready pods targeted by this deployment.
304306
ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,9,opt,name=readyReplicas"`

pkg/image/apis/image/v1/types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type Image struct {
2828
// DockerImageReference is the string that can be used to pull this image.
2929
DockerImageReference string `json:"dockerImageReference,omitempty" protobuf:"bytes,2,opt,name=dockerImageReference"`
3030
// DockerImageMetadata contains metadata about this image
31+
// +patchStrategy=replace
3132
DockerImageMetadata runtime.RawExtension `json:"dockerImageMetadata,omitempty" patchStrategy:"replace" protobuf:"bytes,3,opt,name=dockerImageMetadata"`
3233
// DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0"
3334
DockerImageMetadataVersion string `json:"dockerImageMetadataVersion,omitempty" protobuf:"bytes,4,opt,name=dockerImageMetadataVersion"`
@@ -36,6 +37,8 @@ type Image struct {
3637
// DockerImageLayers represents the layers in the image. May not be set if the image does not define that data.
3738
DockerImageLayers []ImageLayer `json:"dockerImageLayers" protobuf:"bytes,6,rep,name=dockerImageLayers"`
3839
// Signatures holds all signatures of the image.
40+
// +patchMergeKey=name
41+
// +patchStrategy=merge
3942
Signatures []ImageSignature `json:"signatures,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=signatures"`
4043
// DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.
4144
DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty" protobuf:"bytes,8,rep,name=dockerImageSignatures"`
@@ -70,6 +73,8 @@ type ImageSignature struct {
7073
// Required: An opaque binary string which is an image's signature.
7174
Content []byte `json:"content" protobuf:"bytes,3,opt,name=content"`
7275
// Conditions represent the latest available observations of a signature's current state.
76+
// +patchMergeKey=type
77+
// +patchStrategy=merge
7378
Conditions []SignatureCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"`
7479

7580
// Following metadata fields will be set by server if the signature content is successfully parsed and

pkg/oauth/apis/oauth/v1/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ type OAuthClient struct {
8989
RespondWithChallenges bool `json:"respondWithChallenges,omitempty" protobuf:"varint,4,opt,name=respondWithChallenges"`
9090

9191
// RedirectURIs is the valid redirection URIs associated with a client
92+
// +patchStrategy=merge
9293
RedirectURIs []string `json:"redirectURIs,omitempty" patchStrategy:"merge" protobuf:"bytes,5,rep,name=redirectURIs"`
9394

9495
// GrantMethod determines how to handle grants for this client. If no method is provided, the

0 commit comments

Comments
 (0)