add Status.Annotations field (#1317)

* add Status.Annotations field

* add to v1beta1 in case folks use those for making roundtripping / conversion work

* forgot to run update-codegen
This commit is contained in:
Ville Aikas 2020-05-22 14:22:44 -07:00 committed by GitHub
parent 94316e20e8
commit 870993f63e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 0 deletions

View File

@ -45,6 +45,12 @@ type Status struct {
// +patchMergeKey=type
// +patchStrategy=merge
Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// Annotations is additional Status fields for the Resource to save some
// additional State as well as convey more information to the user. This is
// roughly akin to Annotations on any k8s resource, just the reconciler conveying
// richer information outwards.
Annotations map[string]string `json:"annotations,omitempty"`
}
var _ apis.ConditionsAccessor = (*Status)(nil)

View File

@ -428,6 +428,13 @@ func (in *Status) DeepCopyInto(out *Status) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}

View File

@ -63,6 +63,12 @@ type Status struct {
// +patchMergeKey=type
// +patchStrategy=merge
Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// Annotations is additional Status fields for the Resource to save some
// additional State as well as convey more information to the user. This is
// roughly akin to Annotations on any k8s resource, just the reconciler conveying
// richer information outwards.
Annotations map[string]string `json:"annotations,omitempty"`
}
var _ apis.ConditionsAccessor = (*Status)(nil)

View File

@ -374,6 +374,13 @@ func (in *Status) DeepCopyInto(out *Status) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}