Procházet zdrojové kódy

WIP: Removed status from refs added kubuilder code

Signed-off-by: William Young <will.young@engineerbetter.com>
Signed-off-by: Dominic Meddick <dom.meddick@engineerbetter.com>
William Young před 4 roky
rodič
revize
e4181a0167
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. 6 2
      apis/externalsecrets/v1alpha1/secretsink_types.go

+ 6 - 2
apis/externalsecrets/v1alpha1/secretsink_types.go

@@ -23,8 +23,6 @@ type SecretSinkStoreRef struct {
 	// Name of the SecretStore resource
 	// Name of the SecretStore resource
 	Name string `json:"name"`
 	Name string `json:"name"`
 
 
-	Status string `json:"status"`
-
 	// Kind of the SecretStore resource (SecretStore or ClusterSecretStore)
 	// Kind of the SecretStore resource (SecretStore or ClusterSecretStore)
 	// Defaults to `SecretStore`
 	// Defaults to `SecretStore`
 	// +optional
 	// +optional
@@ -63,6 +61,9 @@ type SecretSinkData struct {
 type SecretSinkConditionType string
 type SecretSinkConditionType string
 
 
 const (
 const (
+	SecretSinkSynced         SecretSinkConditionType = "Synced"
+	SecretSinkNotSynced      SecretSinkConditionType = "NotSynced"
+	SecretSinkError          SecretSinkConditionType = "Error"
 	SecretSinkNotImplemented SecretSinkConditionType = "NotImplemented"
 	SecretSinkNotImplemented SecretSinkConditionType = "NotImplemented"
 )
 )
 
 
@@ -81,6 +82,7 @@ type SecretSinkStatusCondition struct {
 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
 	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
 }
 }
 
 
+// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason`
 // SecretSinkStatus indicates the history of the status of SecretSink.
 // SecretSinkStatus indicates the history of the status of SecretSink.
 type SecretSinkStatus struct {
 type SecretSinkStatus struct {
 	// +nullable
 	// +nullable
@@ -98,6 +100,7 @@ type SecretSinkStatus struct {
 // +kubebuilder:object:root=true
 // +kubebuilder:object:root=true
 // +kubebuilder:storageversion
 // +kubebuilder:storageversion
 // Secretsinks is the Schema for the secretsinks API.
 // Secretsinks is the Schema for the secretsinks API.
+// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason`
 // +kubebuilder:subresource:status
 // +kubebuilder:subresource:status
 // +kubebuilder:resource:scope=Namespaced,categories={secretsinks}
 // +kubebuilder:resource:scope=Namespaced,categories={secretsinks}
 
 
@@ -111,6 +114,7 @@ type SecretSink struct {
 
 
 // +kubebuilder:object:root=true
 // +kubebuilder:object:root=true
 
 
+// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].reason`
 // SecretSinkList contains a list of SecretSink resources.
 // SecretSinkList contains a list of SecretSink resources.
 type SecretSinkList struct {
 type SecretSinkList struct {
 	metav1.TypeMeta `json:",inline"`
 	metav1.TypeMeta `json:",inline"`