diff --git a/apis/spaces/v1alpha1/secretstore_types.go b/apis/spaces/v1alpha1/secretstore_types.go index 1ffebfc..ae8ccfe 100644 --- a/apis/spaces/v1alpha1/secretstore_types.go +++ b/apis/spaces/v1alpha1/secretstore_types.go @@ -15,6 +15,7 @@ package v1alpha1 import ( + xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" "reflect" esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1" @@ -100,6 +101,21 @@ type SharedSecretStoreSpec struct { RefreshInterval int `json:"refreshInterval,omitempty"` } +const ( + // ConditionSecretRefReady indicates the status of any referenced secrets + // for API objects that reference a secret. + ConditionSecretRefReady = xpv1.ConditionType("SecretRefsReady") + + // ReasonSecretRefMissing is added to object if the referenced secret(s) do not exist + ReasonSecretRefMissing = xpv1.ConditionReason("ReferencedSecretNotFound") + // ReasonSecretRefMissingKey is added when the object if the secret(s) exists, but the key data is missing + ReasonSecretRefMissingKey = xpv1.ConditionReason("ReferencedSecretKeyNotFound") + // ReasonSecretRefReady is added when the referenced secret(s) and data are found + ReasonSecretRefReady = xpv1.ConditionReason("ReferencedSecretsReady") + // ReasonSecretRefNone is added when object not reference a secret + ReasonSecretRefNone = xpv1.ConditionReason("NoReferencedSecrets") +) + // SharedSecretStoreStatus defines the observed state of the SecretStore. type SharedSecretStoreStatus struct { @@ -123,6 +139,8 @@ type SharedSecretStoreStatus struct { // +listType=map // +listMapKey=controlPlane Provisioned []SecretStoreProvisioningSuccess `json:"provisioned,omitempty"` + + xpv1.ResourceStatus `json:",inline"` } // SecretStoreProvisioningFailure defines secret store provisioning failure. diff --git a/apis/spaces/v1alpha1/zz_generated.deepcopy.go b/apis/spaces/v1alpha1/zz_generated.deepcopy.go index dd7e2d6..4f0d08c 100644 --- a/apis/spaces/v1alpha1/zz_generated.deepcopy.go +++ b/apis/spaces/v1alpha1/zz_generated.deepcopy.go @@ -970,6 +970,7 @@ func (in *SharedSecretStoreStatus) DeepCopyInto(out *SharedSecretStoreStatus) { *out = make([]SecretStoreProvisioningSuccess, len(*in)) copy(*out, *in) } + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretStoreStatus.