mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-14 11:57:59 +00:00
Merge pull request #23 from external-secrets/chore/update-crd-spec
update crd spec
This commit is contained in:
commit
241f26c6c2
5 changed files with 12 additions and 50 deletions
|
@ -121,35 +121,15 @@ 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"`
|
||||
Status corev1.ConditionStatus `json:"status"`
|
||||
Type ExternalSecretConditionType `json:"type"`
|
||||
Status corev1.ConditionStatus `json:"status"`
|
||||
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty"`
|
||||
|
@ -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"`
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -149,8 +149,6 @@ spec:
|
|||
- type
|
||||
type: object
|
||||
type: array
|
||||
phase:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
|
|
Loading…
Reference in a new issue