mirror of https://github.com/knative/pkg.git
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:
parent
94316e20e8
commit
870993f63e
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue