Remove ready field from status

The usage of such a field is considered deprecated, conditions
should be used instead.

If there is a use-case that is not covered by conditions only
we can always reconsider adding an extra field to the status.

See the k8s guidelines for more details on the deprecation:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
This commit is contained in:
Joris Coenen
2022-06-22 11:39:54 +02:00
parent ffab2cfdab
commit 867e699030
4 changed files with 23 additions and 24 deletions

View File

@@ -36,9 +36,6 @@ type OnePasswordItemStatus struct {
// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
// Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html
Conditions []OnePasswordItemCondition `json:"conditions"`
// True when the Kubernetes secret is ready for use.
Ready *bool `json:"ready,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -51,7 +48,7 @@ type OnePasswordItem struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
// Kubernetes secret type. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
Type string `json:"type,omitempty"`
Type string `json:"type,omitempty"`
Spec OnePasswordItemSpec `json:"spec,omitempty"`
Status OnePasswordItemStatus `json:"status,omitempty"`

View File

@@ -113,11 +113,6 @@ func (in *OnePasswordItemStatus) DeepCopyInto(out *OnePasswordItemStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Ready != nil {
in, out := &in.Ready, &out.Ready
*out = new(bool)
**out = **in
}
return
}