1
0
Fork 0
mirror of https://github.com/external-secrets/external-secrets.git synced 2024-12-14 11:57:59 +00:00

chore: update crd-spec

see https://github.com/external-secrets/crd-spec/pull/3

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
This commit is contained in:
Moritz Johner 2021-02-06 12:52:14 +01:00
parent e8fb686e05
commit b460153452
5 changed files with 12 additions and 50 deletions

View file

@ -121,34 +121,14 @@ type ExternalSecretSpec struct {
DataFrom []ExternalSecretDataRemoteRef `json:"dataFrom,omitempty"`
}
// ExternalSecretStatusPhase represents the current phase of the Secret sync.
type ExternalSecretStatusPhase string
const (
// ExternalSecret created, controller did not yet sync the ExternalSecret or other dependencies are missing (e.g. secret store or configmap template).
ExternalSecretPending ExternalSecretStatusPhase = "Pending"
// ExternalSecret is being actively synced according to spec.
ExternalSecretSyncing ExternalSecretStatusPhase = "Syncing"
// ExternalSecret can not be synced, this might require user intervention.
ExternalSecretFailing ExternalSecretStatusPhase = "Failing"
// ExternalSecret can not be synced right now and will not able to.
ExternalSecretFailed ExternalSecretStatusPhase = "Failed"
// ExternalSecret was synced successfully (one-time use only).
ExternalSecretCompleted ExternalSecretStatusPhase = "Completed"
)
type ExternalSecretConditionType string
const (
InSync ExternalSecretConditionType = "InSync"
ExternalSecretReady ExternalSecretConditionType = "Ready"
)
type ExternalSecretStatusCondition struct {
Type SecretStoreConditionType `json:"type"`
Type ExternalSecretConditionType `json:"type"`
Status corev1.ConditionStatus `json:"status"`
// +optional
@ -159,14 +139,13 @@ type ExternalSecretStatusCondition struct {
// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// +optional
LastSyncTime metav1.Time `json:"lastSyncTime,omitempty"`
}
type ExternalSecretStatus struct {
// +optional
Phase ExternalSecretStatusPhase `json:"phase"`
// refreshTime is the time and date the external secret was fetched and
// the target secret updated
RefreshTime metav1.Time `json:"refreshTime"`
// +optional
Conditions []ExternalSecretStatusCondition `json:"conditions"`

View file

@ -47,20 +47,10 @@ type SecretStoreProvider struct {
AWSSM *AWSSMProvider `json:"awssm,omitempty"`
}
type SecretStoreStatusPhase string
const (
// E.g. referenced Secret containing credentials is missing.
SecretStorePending SecretStoreStatusPhase = "Pending"
// All dependencies are met, sync.
SecretStoreRunning SecretStoreStatusPhase = "Running"
)
type SecretStoreConditionType string
const (
Ready SecretStoreConditionType = "Ready"
SecretStoreReady SecretStoreConditionType = "Ready"
)
type SecretStoreStatusCondition struct {
@ -79,9 +69,6 @@ type SecretStoreStatusCondition struct {
// SecretStoreStatus defines the observed state of the SecretStore.
type SecretStoreStatus struct {
// +optional
Phase SecretStoreStatusPhase `json:"phase"`
// +optional
Conditions []SecretStoreStatusCondition `json:"conditions"`
}

View file

@ -249,6 +249,7 @@ func (in *ExternalSecretSpec) DeepCopy() *ExternalSecretSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ExternalSecretStatus) DeepCopyInto(out *ExternalSecretStatus) {
*out = *in
in.RefreshTime.DeepCopyInto(&out.RefreshTime)
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]ExternalSecretStatusCondition, len(*in))
@ -272,7 +273,6 @@ func (in *ExternalSecretStatus) DeepCopy() *ExternalSecretStatus {
func (in *ExternalSecretStatusCondition) DeepCopyInto(out *ExternalSecretStatusCondition) {
*out = *in
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
in.LastSyncTime.DeepCopyInto(&out.LastSyncTime)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalSecretStatusCondition.

View file

@ -132,9 +132,6 @@ spec:
conditions:
items:
properties:
lastSyncTime:
format: date-time
type: string
lastTransitionTime:
format: date-time
type: string
@ -151,9 +148,10 @@ spec:
- type
type: object
type: array
phase:
description: ExternalSecretStatusPhase represents the current phase
of the Secret sync.
refreshTime:
description: refreshTime is the time and date the external secret
was fetched and the target secret updated
format: date-time
type: string
type: object
type: object

View file

@ -149,8 +149,6 @@ spec:
- type
type: object
type: array
phase:
type: string
type: object
type: object
served: true