Skip to content

Commit

Permalink
Add condition status to SharedSecretStoreStatus
Browse files Browse the repository at this point in the history
Signed-off-by: Jean du Plessis <[email protected]>
  • Loading branch information
jeanduplessis committed Aug 1, 2024
1 parent dcc89c1 commit 12f6309
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions apis/spaces/v1alpha1/secretstore_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package v1alpha1

import (
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"

Check failure on line 18 in apis/spaces/v1alpha1/secretstore_types.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed with -local github.com/upbound (goimports)
"reflect"

esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
Expand Down Expand Up @@ -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 {

Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions apis/spaces/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 12f6309

Please sign in to comment.