diff --git a/go.mod b/go.mod index 73dd5aa12..05a4f3ef0 100644 --- a/go.mod +++ b/go.mod @@ -22,12 +22,10 @@ require ( kmodules.xyz/client-go v0.25.6 kmodules.xyz/custom-resources v0.25.0 kmodules.xyz/monitoring-agent-api v0.25.0 - kubedb.dev/apimachinery v0.28.4-0.20220918140426-7263b50309d2 - stash.appscode.dev/apimachinery v0.22.1-0.20220918134206-55dff33147a0 + kubedb.dev/apimachinery v0.28.4-0.20220924164625-f5eabfc23811 + stash.appscode.dev/apimachinery v0.22.1-0.20220924053358-8821fa34c13f ) -require kmodules.xyz/apiversion v0.2.0 // indirect - require ( cloud.google.com/go v0.99.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect @@ -118,6 +116,7 @@ require ( k8s.io/apiextensions-apiserver v0.25.1 // indirect k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea // indirect k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 // indirect + kmodules.xyz/apiversion v0.2.0 // indirect kmodules.xyz/objectstore-api v0.25.0 // indirect kmodules.xyz/offshoot-api v0.25.0 // indirect kmodules.xyz/prober v0.25.0 // indirect diff --git a/go.sum b/go.sum index 616944e00..69f90fed9 100644 --- a/go.sum +++ b/go.sum @@ -997,8 +997,8 @@ kmodules.xyz/offshoot-api v0.25.0 h1:Svq9da/+sg5afOjpgo9vx2J/Lu90Mo0aFxkdQmgKnGI kmodules.xyz/offshoot-api v0.25.0/go.mod h1:ysEBn7LJuT3+s8ynAQA/OG0BSsJugXa6KGtDLMRjlKo= kmodules.xyz/prober v0.25.0 h1:R5uRLHJEvEtEoogj+vaTAob0Btph6+PX5IlS6hPh8PA= kmodules.xyz/prober v0.25.0/go.mod h1:z4RTnjaajNQa/vPltsiOnO3xI716I/ziD2ac2Exm+1M= -kubedb.dev/apimachinery v0.28.4-0.20220918140426-7263b50309d2 h1:ic4TMCl+Yk3H3t5J9blQWyjEiLFTsKwC7pLtLgQ3+Ak= -kubedb.dev/apimachinery v0.28.4-0.20220918140426-7263b50309d2/go.mod h1:rRH1iTGsGM/1lFii5MqE/7SOd/iQSbeS3YaXhF+s2m8= +kubedb.dev/apimachinery v0.28.4-0.20220924164625-f5eabfc23811 h1:Xp/vSFvwHclqLrJ+SRXXHCwTxICUv9OdL6WJaD/2gxc= +kubedb.dev/apimachinery v0.28.4-0.20220924164625-f5eabfc23811/go.mod h1:BNR4wQVfhzoucxS8MNcH0zcpDcYelXwqsevnPBxtIo0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -1012,5 +1012,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kF sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -stash.appscode.dev/apimachinery v0.22.1-0.20220918134206-55dff33147a0 h1:GHSuGopU1TXoFnaPLWrXLmwTthd7XWkz0Yj19pLK1qo= -stash.appscode.dev/apimachinery v0.22.1-0.20220918134206-55dff33147a0/go.mod h1:f1yvcracYbBFRbabEdX3VFhzgXjOLER2QFvyyBNdeik= +stash.appscode.dev/apimachinery v0.22.1-0.20220924053358-8821fa34c13f h1:N2jMJ6yOvgveZSHzlNpXZCbp8QFPACiqdOKXLcJIV6k= +stash.appscode.dev/apimachinery v0.22.1-0.20220924053358-8821fa34c13f/go.mod h1:Tb1y/+h1r3+YdBvI5RYIC0tW1b8S+0pIb3iG0X7BOjo= diff --git a/pkg/describer/elasticsearch.go b/pkg/describer/elasticsearch.go index 8732aba07..f36381f91 100644 --- a/pkg/describer/elasticsearch.go +++ b/pkg/describer/elasticsearch.go @@ -86,7 +86,7 @@ func (d *ElasticsearchDescriber) describeElasticsearch(item *api.Elasticsearch, showWorkload(d.client, item.Namespace, selector, w) - secrets := make(map[string]*core.LocalObjectReference) + secrets := make(map[string]*api.SecretReference) if item.Spec.AuthSecret != nil { secrets["Auth"] = item.Spec.AuthSecret } diff --git a/pkg/describer/helper.go b/pkg/describer/helper.go index 4e6ba1aba..b173647c7 100644 --- a/pkg/describer/helper.go +++ b/pkg/describer/helper.go @@ -242,7 +242,7 @@ func showWorkload(client kubernetes.Interface, namespace string, selector labels } } -func showSecret(client kubernetes.Interface, namespace string, secrets map[string]*core.LocalObjectReference, w describe.PrefixWriter) { +func showSecret(client kubernetes.Interface, namespace string, secrets map[string]*api.SecretReference, w describe.PrefixWriter) { sc := client.CoreV1().Secrets(namespace) for key, sv := range secrets { diff --git a/pkg/describer/mongodb.go b/pkg/describer/mongodb.go index 92111a3f4..a45f03eb0 100644 --- a/pkg/describer/mongodb.go +++ b/pkg/describer/mongodb.go @@ -86,7 +86,7 @@ func (d *MongoDBDescriber) describeMongoDB(item *api.MongoDB, selector labels.Se showWorkload(d.client, item.Namespace, selector, w) - secrets := make(map[string]*core.LocalObjectReference) + secrets := make(map[string]*api.SecretReference) if item.Spec.AuthSecret != nil { secrets["Auth"] = item.Spec.AuthSecret } diff --git a/pkg/describer/mysql.go b/pkg/describer/mysql.go index 154d67538..1c04fd11d 100644 --- a/pkg/describer/mysql.go +++ b/pkg/describer/mysql.go @@ -86,7 +86,7 @@ func (d *MySQLDescriber) describeMySQL(item *api.MySQL, selector labels.Selector showWorkload(d.client, item.Namespace, selector, w) - secrets := make(map[string]*core.LocalObjectReference) + secrets := make(map[string]*api.SecretReference) if item.Spec.AuthSecret != nil { secrets["Auth"] = item.Spec.AuthSecret } diff --git a/pkg/describer/postgres.go b/pkg/describer/postgres.go index 9d79038f3..8916b8e5f 100644 --- a/pkg/describer/postgres.go +++ b/pkg/describer/postgres.go @@ -86,7 +86,7 @@ func (d *PostgresDescriber) describePostgres(item *api.Postgres, selector labels showWorkload(d.client, item.Namespace, selector, w) - secrets := make(map[string]*core.LocalObjectReference) + secrets := make(map[string]*api.SecretReference) if item.Spec.AuthSecret != nil { secrets["Auth"] = item.Spec.AuthSecret } diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_types.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_types.go index 29834cd9b..cd5fd3fa4 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_types.go @@ -17,6 +17,8 @@ limitations under the License. package v1alpha1 import ( + opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1" + core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -60,6 +62,9 @@ type ElasticsearchAutoscaler struct { type ElasticsearchAutoscalerSpec struct { DatabaseRef *core.LocalObjectReference `json:"databaseRef"` + // This field will be used to control the behaviour of ops-manager + OpsRequestOptions *ElasticsearchOpsRequestOptions `json:"opsRequestOptions,omitempty"` + Compute *ElasticsearchComputeAutoscalerSpec `json:"compute,omitempty"` Storage *ElasticsearchStorageAutoscalerSpec `json:"storage,omitempty"` } @@ -86,6 +91,18 @@ type ElasticsearchStorageTopologyAutoscalerSpec struct { Ingest *StorageAutoscalerSpec `json:"ingest,omitempty"` } +type ElasticsearchOpsRequestOptions struct { + // Specifies the Readiness Criteria + ReadinessCriteria *opsapi.ElasticsearchReplicaReadinessCriteria `json:"readinessCriteria,omitempty"` + + // Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure. + Timeout *metav1.Duration `json:"timeout,omitempty"` + + // ApplyOption is to control the execution of OpsRequest depending on the database state. + // +kubebuilder:default="IfReady" + Apply opsapi.ApplyOption `json:"apply,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ElasticsearchAutoscalerList is a list of ElasticsearchAutoscaler objects. type ElasticsearchAutoscalerList struct { diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_webhook.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_webhook.go index e5f38a626..2a6f06152 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/elasticsearch_webhook.go @@ -20,6 +20,7 @@ import ( "errors" dbapi "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" + opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/builder" @@ -48,6 +49,8 @@ func (in *ElasticsearchAutoscaler) Default() { } func (in *ElasticsearchAutoscaler) setDefaults() { + in.setOpsReqOptsDefaults() + if in.Spec.Storage != nil { setDefaultStorageValues(in.Spec.Storage.Node) if in.Spec.Storage.Topology != nil { @@ -66,6 +69,17 @@ func (in *ElasticsearchAutoscaler) setDefaults() { } } +func (in *ElasticsearchAutoscaler) setOpsReqOptsDefaults() { + if in.Spec.OpsRequestOptions == nil { + in.Spec.OpsRequestOptions = &ElasticsearchOpsRequestOptions{} + } + // Timeout is defaulted to 600s in ops-manager retries.go (to retry 120 times with 5sec pause between each) + // OplogMaxLagSeconds & ObjectsCountDiffPercentage are defaults to 0 + if in.Spec.OpsRequestOptions.Apply == "" { + in.Spec.OpsRequestOptions.Apply = opsapi.ApplyOptionIfReady + } +} + // +kubebuilder:webhook:path=/validate-schema-kubedb-com-v1alpha1-elasticsearchautoscaler,mutating=false,failurePolicy=fail,sideEffects=None,groups=schema.kubedb.com,resources=elasticsearchautoscalers,verbs=create;update;delete,versions=v1alpha1,name=velasticsearchautoscaler.kb.io,admissionReviewVersions={v1,v1beta1} var _ webhook.Validator = &ElasticsearchAutoscaler{} diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_types.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_types.go index cc84019e4..02abd6a1d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_types.go @@ -17,6 +17,8 @@ limitations under the License. package v1alpha1 import ( + opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1" + core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -58,6 +60,9 @@ type MariaDBAutoscaler struct { type MariaDBAutoscalerSpec struct { DatabaseRef *core.LocalObjectReference `json:"databaseRef"` + // This field will be used to control the behaviour of ops-manager + OpsRequestOptions *MariaDBOpsRequestOptions `json:"opsRequestOptions,omitempty"` + Compute *MariaDBComputeAutoscalerSpec `json:"compute,omitempty"` Storage *MariaDBStorageAutoscalerSpec `json:"storage,omitempty"` } @@ -70,6 +75,18 @@ type MariaDBStorageAutoscalerSpec struct { MariaDB *StorageAutoscalerSpec `json:"mariadb,omitempty"` } +type MariaDBOpsRequestOptions struct { + // Specifies the Readiness Criteria + ReadinessCriteria *opsapi.MariaDBReplicaReadinessCriteria `json:"readinessCriteria,omitempty"` + + // Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure. + Timeout *metav1.Duration `json:"timeout,omitempty"` + + // ApplyOption is to control the execution of OpsRequest depending on the database state. + // +kubebuilder:default="IfReady" + Apply opsapi.ApplyOption `json:"apply,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // MariaDBAutoscalerList is a list of MariaDBAutoscaler objects. type MariaDBAutoscalerList struct { diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_webhook.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_webhook.go index 655237ac4..f8d456eec 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/mariadb_webhook.go @@ -19,6 +19,8 @@ package v1alpha1 import ( "errors" + opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1" + "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/builder" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -46,6 +48,8 @@ func (in *MariaDBAutoscaler) Default() { } func (in *MariaDBAutoscaler) setDefaults() { + in.setOpsReqOptsDefaults() + if in.Spec.Storage != nil { setDefaultStorageValues(in.Spec.Storage.MariaDB) } @@ -54,6 +58,17 @@ func (in *MariaDBAutoscaler) setDefaults() { } } +func (in *MariaDBAutoscaler) setOpsReqOptsDefaults() { + if in.Spec.OpsRequestOptions == nil { + in.Spec.OpsRequestOptions = &MariaDBOpsRequestOptions{} + } + // Timeout is defaulted to 600s in ops-manager retries.go (to retry 120 times with 5sec pause between each) + // OplogMaxLagSeconds & ObjectsCountDiffPercentage are defaults to 0 + if in.Spec.OpsRequestOptions.Apply == "" { + in.Spec.OpsRequestOptions.Apply = opsapi.ApplyOptionIfReady + } +} + // +kubebuilder:webhook:path=/validate-schema-kubedb-com-v1alpha1-mariadbautoscaler,mutating=false,failurePolicy=fail,sideEffects=None,groups=schema.kubedb.com,resources=mariadbautoscalers,verbs=create;update;delete,versions=v1alpha1,name=vmariadbautoscaler.kb.io,admissionReviewVersions={v1,v1beta1} var _ webhook.Validator = &MariaDBAutoscaler{} diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go index 7784fe8fb..8420a3542 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/openapi_generated.go @@ -432,6 +432,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchComputeAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchComputeAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchComputeTopologyAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchComputeTopologyAutoscalerSpec(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchOpsRequestOptions": schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchOpsRequestOptions(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchStorageAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchStorageAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchStorageTopologyAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchStorageTopologyAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.EtcdAutoscaler": schema_apimachinery_apis_autoscaling_v1alpha1_EtcdAutoscaler(ref), @@ -445,6 +446,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBAutoscalerList": schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBAutoscalerList(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBComputeAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBComputeAutoscalerSpec(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBOpsRequestOptions": schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBOpsRequestOptions(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBStorageAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBStorageAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MemcachedAutoscaler": schema_apimachinery_apis_autoscaling_v1alpha1_MemcachedAutoscaler(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MemcachedAutoscalerBehavior": schema_apimachinery_apis_autoscaling_v1alpha1_MemcachedAutoscalerBehavior(ref), @@ -468,6 +470,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBAutoscalerList": schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBAutoscalerList(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBComputeAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBComputeAutoscalerSpec(ref), + "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBOpsRequestOptions": schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBOpsRequestOptions(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBStorageAutoscalerSpec": schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBStorageAutoscalerSpec(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PgBouncerAutoscaler": schema_apimachinery_apis_autoscaling_v1alpha1_PgBouncerAutoscaler(ref), "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PgBouncerAutoscalerBehavior": schema_apimachinery_apis_autoscaling_v1alpha1_PgBouncerAutoscalerBehavior(ref), @@ -21309,6 +21312,12 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchAutoscalerSpec(r Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, + "opsRequestOptions": { + SchemaProps: spec.SchemaProps{ + Description: "This field will be used to control the behaviour of ops-manager", + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchOpsRequestOptions"), + }, + }, "compute": { SchemaProps: spec.SchemaProps{ Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchComputeAutoscalerSpec"), @@ -21324,7 +21333,7 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchAutoscalerSpec(r }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchStorageAutoscalerSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchOpsRequestOptions", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.ElasticsearchStorageAutoscalerSpec"}, } } @@ -21381,6 +21390,39 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchComputeTopologyA } } +func schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchOpsRequestOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "readinessCriteria": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the Readiness Criteria", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchReplicaReadinessCriteria"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "apply": { + SchemaProps: spec.SchemaProps{ + Description: "ApplyOption is to control the execution of OpsRequest depending on the database state.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchReplicaReadinessCriteria"}, + } +} + func schema_apimachinery_apis_autoscaling_v1alpha1_ElasticsearchStorageAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21856,6 +21898,12 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBAutoscalerSpec(ref com Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, + "opsRequestOptions": { + SchemaProps: spec.SchemaProps{ + Description: "This field will be used to control the behaviour of ops-manager", + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBOpsRequestOptions"), + }, + }, "compute": { SchemaProps: spec.SchemaProps{ Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBComputeAutoscalerSpec"), @@ -21871,7 +21919,7 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBAutoscalerSpec(ref com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBStorageAutoscalerSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBOpsRequestOptions", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.MariaDBStorageAutoscalerSpec"}, } } @@ -21894,6 +21942,39 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBComputeAutoscalerSpec( } } +func schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBOpsRequestOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "readinessCriteria": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the Readiness Criteria", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBReplicaReadinessCriteria"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "apply": { + SchemaProps: spec.SchemaProps{ + Description: "ApplyOption is to control the execution of OpsRequest depending on the database state.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBReplicaReadinessCriteria"}, + } +} + func schema_apimachinery_apis_autoscaling_v1alpha1_MariaDBStorageAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -22744,6 +22825,12 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBAutoscalerSpec(r Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, + "opsRequestOptions": { + SchemaProps: spec.SchemaProps{ + Description: "This field will be used to control the behaviour of ops-manager", + Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBOpsRequestOptions"), + }, + }, "compute": { SchemaProps: spec.SchemaProps{ Ref: ref("kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBComputeAutoscalerSpec"), @@ -22759,7 +22846,7 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBAutoscalerSpec(r }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBStorageAutoscalerSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBComputeAutoscalerSpec", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBOpsRequestOptions", "kubedb.dev/apimachinery/apis/autoscaling/v1alpha1.PerconaXtraDBStorageAutoscalerSpec"}, } } @@ -22782,6 +22869,39 @@ func schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBComputeAutoscale } } +func schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBOpsRequestOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "readinessCriteria": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the Readiness Criteria", + Ref: ref("kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBReplicaReadinessCriteria"), + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "apply": { + SchemaProps: spec.SchemaProps{ + Description: "ApplyOption is to control the execution of OpsRequest depending on the database state.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBReplicaReadinessCriteria"}, + } +} + func schema_apimachinery_apis_autoscaling_v1alpha1_PerconaXtraDBStorageAutoscalerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_types.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_types.go index cbfb3b3a9..93a26dcbb 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_types.go @@ -17,6 +17,8 @@ limitations under the License. package v1alpha1 import ( + opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1" + core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -58,6 +60,9 @@ type PerconaXtraDBAutoscaler struct { type PerconaXtraDBAutoscalerSpec struct { DatabaseRef *core.LocalObjectReference `json:"databaseRef"` + // This field will be used to control the behaviour of ops-manager + OpsRequestOptions *PerconaXtraDBOpsRequestOptions `json:"opsRequestOptions,omitempty"` + Compute *PerconaXtraDBComputeAutoscalerSpec `json:"compute,omitempty"` Storage *PerconaXtraDBStorageAutoscalerSpec `json:"storage,omitempty"` } @@ -70,6 +75,18 @@ type PerconaXtraDBStorageAutoscalerSpec struct { PerconaXtraDB *StorageAutoscalerSpec `json:"perconaxtradb,omitempty"` } +type PerconaXtraDBOpsRequestOptions struct { + // Specifies the Readiness Criteria + ReadinessCriteria *opsapi.PerconaXtraDBReplicaReadinessCriteria `json:"readinessCriteria,omitempty"` + + // Timeout for each step of the ops request in second. If a step doesn't finish within the specified timeout, the ops request will result in failure. + Timeout *metav1.Duration `json:"timeout,omitempty"` + + // ApplyOption is to control the execution of OpsRequest depending on the database state. + // +kubebuilder:default="IfReady" + Apply opsapi.ApplyOption `json:"apply,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // PerconaXtraDBAutoscalerList is a list of PerconaXtraDBAutoscaler objects. type PerconaXtraDBAutoscalerList struct { diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_webhook.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_webhook.go index e0a472030..ff6a5de5f 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/perconaxtradb_webhook.go @@ -19,6 +19,8 @@ package v1alpha1 import ( "errors" + opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1" + "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/builder" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -46,6 +48,8 @@ func (in *PerconaXtraDBAutoscaler) Default() { } func (in *PerconaXtraDBAutoscaler) setDefaults() { + in.setOpsReqOptsDefaults() + if in.Spec.Storage != nil { setDefaultStorageValues(in.Spec.Storage.PerconaXtraDB) } @@ -54,6 +58,17 @@ func (in *PerconaXtraDBAutoscaler) setDefaults() { } } +func (in *PerconaXtraDBAutoscaler) setOpsReqOptsDefaults() { + if in.Spec.OpsRequestOptions == nil { + in.Spec.OpsRequestOptions = &PerconaXtraDBOpsRequestOptions{} + } + // Timeout is defaulted to 600s in ops-manager retries.go (to retry 120 times with 5sec pause between each) + // OplogMaxLagSeconds & ObjectsCountDiffPercentage are defaults to 0 + if in.Spec.OpsRequestOptions.Apply == "" { + in.Spec.OpsRequestOptions.Apply = opsapi.ApplyOptionIfReady + } +} + // +kubebuilder:webhook:path=/validate-schema-kubedb-com-v1alpha1-perconaxtradbautoscaler,mutating=false,failurePolicy=fail,sideEffects=None,groups=schema.kubedb.com,resources=perconaxtradbautoscalers,verbs=create;update;delete,versions=v1alpha1,name=vperconaxtradbautoscaler.kb.io,admissionReviewVersions={v1,v1beta1} var _ webhook.Validator = &PerconaXtraDBAutoscaler{} diff --git a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go index c6f4a4a6f..2041d3ad7 100644 --- a/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go @@ -274,6 +274,11 @@ func (in *ElasticsearchAutoscalerSpec) DeepCopyInto(out *ElasticsearchAutoscaler *out = new(corev1.LocalObjectReference) **out = **in } + if in.OpsRequestOptions != nil { + in, out := &in.OpsRequestOptions, &out.OpsRequestOptions + *out = new(ElasticsearchOpsRequestOptions) + (*in).DeepCopyInto(*out) + } if in.Compute != nil { in, out := &in.Compute, &out.Compute *out = new(ElasticsearchComputeAutoscalerSpec) @@ -354,6 +359,32 @@ func (in *ElasticsearchComputeTopologyAutoscalerSpec) DeepCopy() *ElasticsearchC return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ElasticsearchOpsRequestOptions) DeepCopyInto(out *ElasticsearchOpsRequestOptions) { + *out = *in + if in.ReadinessCriteria != nil { + in, out := &in.ReadinessCriteria, &out.ReadinessCriteria + *out = new(opsv1alpha1.ElasticsearchReplicaReadinessCriteria) + **out = **in + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticsearchOpsRequestOptions. +func (in *ElasticsearchOpsRequestOptions) DeepCopy() *ElasticsearchOpsRequestOptions { + if in == nil { + return nil + } + out := new(ElasticsearchOpsRequestOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ElasticsearchStorageAutoscalerSpec) DeepCopyInto(out *ElasticsearchStorageAutoscalerSpec) { *out = *in @@ -670,6 +701,11 @@ func (in *MariaDBAutoscalerSpec) DeepCopyInto(out *MariaDBAutoscalerSpec) { *out = new(corev1.LocalObjectReference) **out = **in } + if in.OpsRequestOptions != nil { + in, out := &in.OpsRequestOptions, &out.OpsRequestOptions + *out = new(MariaDBOpsRequestOptions) + (*in).DeepCopyInto(*out) + } if in.Compute != nil { in, out := &in.Compute, &out.Compute *out = new(MariaDBComputeAutoscalerSpec) @@ -714,6 +750,32 @@ func (in *MariaDBComputeAutoscalerSpec) DeepCopy() *MariaDBComputeAutoscalerSpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MariaDBOpsRequestOptions) DeepCopyInto(out *MariaDBOpsRequestOptions) { + *out = *in + if in.ReadinessCriteria != nil { + in, out := &in.ReadinessCriteria, &out.ReadinessCriteria + *out = new(opsv1alpha1.MariaDBReplicaReadinessCriteria) + **out = **in + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MariaDBOpsRequestOptions. +func (in *MariaDBOpsRequestOptions) DeepCopy() *MariaDBOpsRequestOptions { + if in == nil { + return nil + } + out := new(MariaDBOpsRequestOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MariaDBStorageAutoscalerSpec) DeepCopyInto(out *MariaDBStorageAutoscalerSpec) { *out = *in @@ -1337,6 +1399,11 @@ func (in *PerconaXtraDBAutoscalerSpec) DeepCopyInto(out *PerconaXtraDBAutoscaler *out = new(corev1.LocalObjectReference) **out = **in } + if in.OpsRequestOptions != nil { + in, out := &in.OpsRequestOptions, &out.OpsRequestOptions + *out = new(PerconaXtraDBOpsRequestOptions) + (*in).DeepCopyInto(*out) + } if in.Compute != nil { in, out := &in.Compute, &out.Compute *out = new(PerconaXtraDBComputeAutoscalerSpec) @@ -1381,6 +1448,32 @@ func (in *PerconaXtraDBComputeAutoscalerSpec) DeepCopy() *PerconaXtraDBComputeAu return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PerconaXtraDBOpsRequestOptions) DeepCopyInto(out *PerconaXtraDBOpsRequestOptions) { + *out = *in + if in.ReadinessCriteria != nil { + in, out := &in.ReadinessCriteria, &out.ReadinessCriteria + *out = new(opsv1alpha1.PerconaXtraDBReplicaReadinessCriteria) + **out = **in + } + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(metav1.Duration) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaXtraDBOpsRequestOptions. +func (in *PerconaXtraDBOpsRequestOptions) DeepCopy() *PerconaXtraDBOpsRequestOptions { + if in == nil { + return nil + } + out := new(PerconaXtraDBOpsRequestOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PerconaXtraDBStorageAutoscalerSpec) DeepCopyInto(out *PerconaXtraDBStorageAutoscalerSpec) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go index 64f262adb..b180c255d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/config/v1alpha1/openapi_generated.go @@ -20765,7 +20765,7 @@ func schema_apimachinery_apis_config_v1alpha1_GaleraArbitratorConfiguration(ref return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "GaleraArbitratorConfiguration defines Galera ARBitrator Daemon (garbd) configuration. Ref: https://galeracluster.com/library/documentation/arbitrator.html\n\t\thttps://galeracluster.com/library/documentation/backup-cluster.html", + Description: "GaleraArbitratorConfiguration defines Galera ARBitrator Daemon (garbd) configuration. Ref: https://galeracluster.com/library/documentation/arbitrator.html\n\n\thttps://galeracluster.com/library/documentation/backup-cluster.html", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha1/conversion.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha1/conversion.go index 7e11dcc13..5384cff99 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha1/conversion.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha1/conversion.go @@ -89,8 +89,10 @@ func Convert_v1alpha1_ElasticsearchSpec_To_v1alpha2_ElasticsearchSpec(in *Elasti // WARNING: in.CertificateSecret requires manual conversion: does not exist in peer-type // WARNING: in.AuthPlugin requires manual conversion: does not exist in peer-type if in.DatabaseSecret != nil { - out.AuthSecret = &v1.LocalObjectReference{ - Name: in.DatabaseSecret.SecretName, + out.AuthSecret = &v1alpha2.SecretReference{ + LocalObjectReference: v1.LocalObjectReference{ + Name: in.DatabaseSecret.SecretName, + }, } } out.StorageType = v1alpha2.StorageType(in.StorageType) @@ -262,8 +264,10 @@ func Convert_v1alpha1_EtcdSpec_To_v1alpha2_EtcdSpec(in *EtcdSpec, out *v1alpha2. out.StorageType = v1alpha2.StorageType(in.StorageType) out.Storage = (*v1.PersistentVolumeClaimSpec)(unsafe.Pointer(in.Storage)) if in.DatabaseSecret != nil { - out.AuthSecret = &v1.LocalObjectReference{ - Name: in.DatabaseSecret.SecretName, + out.AuthSecret = &v1alpha2.SecretReference{ + LocalObjectReference: v1.LocalObjectReference{ + Name: in.DatabaseSecret.SecretName, + }, } } if in.Init != nil { @@ -352,8 +356,10 @@ func Convert_v1alpha1_MariaDBSpec_To_v1alpha2_MariaDBSpec(in *MariaDBSpec, out * out.StorageType = v1alpha2.StorageType(in.StorageType) out.Storage = (*v1.PersistentVolumeClaimSpec)(unsafe.Pointer(in.Storage)) if in.DatabaseSecret != nil { - out.AuthSecret = &v1.LocalObjectReference{ - Name: in.DatabaseSecret.SecretName, + out.AuthSecret = &v1alpha2.SecretReference{ + LocalObjectReference: v1.LocalObjectReference{ + Name: in.DatabaseSecret.SecretName, + }, } } if in.Init != nil { @@ -544,8 +550,10 @@ func Convert_v1alpha1_MongoDBSpec_To_v1alpha2_MongoDBSpec(in *MongoDBSpec, out * out.StorageType = v1alpha2.StorageType(in.StorageType) out.Storage = (*v1.PersistentVolumeClaimSpec)(unsafe.Pointer(in.Storage)) if in.DatabaseSecret != nil { - out.AuthSecret = &v1.LocalObjectReference{ - Name: in.DatabaseSecret.SecretName, + out.AuthSecret = &v1alpha2.SecretReference{ + LocalObjectReference: v1.LocalObjectReference{ + Name: in.DatabaseSecret.SecretName, + }, } } // FIXIT @@ -729,8 +737,10 @@ func Convert_v1alpha1_MySQLSpec_To_v1alpha2_MySQLSpec(in *MySQLSpec, out *v1alph out.StorageType = v1alpha2.StorageType(in.StorageType) out.Storage = (*v1.PersistentVolumeClaimSpec)(unsafe.Pointer(in.Storage)) if in.DatabaseSecret != nil { - out.AuthSecret = &v1.LocalObjectReference{ - Name: in.DatabaseSecret.SecretName, + out.AuthSecret = &v1alpha2.SecretReference{ + LocalObjectReference: v1.LocalObjectReference{ + Name: in.DatabaseSecret.SecretName, + }, } } if in.Init != nil { @@ -849,8 +859,10 @@ func Convert_v1alpha1_PerconaXtraDBSpec_To_v1alpha2_PerconaXtraDBSpec(in *Percon out.StorageType = v1alpha2.StorageType(in.StorageType) out.Storage = (*v1.PersistentVolumeClaimSpec)(unsafe.Pointer(in.Storage)) if in.DatabaseSecret != nil { - out.AuthSecret = &v1.LocalObjectReference{ - Name: in.DatabaseSecret.SecretName, + out.AuthSecret = &v1alpha2.SecretReference{ + LocalObjectReference: v1.LocalObjectReference{ + Name: in.DatabaseSecret.SecretName, + }, } } if in.Init != nil { @@ -952,8 +964,10 @@ func Convert_v1alpha1_PostgresSpec_To_v1alpha2_PostgresSpec(in *PostgresSpec, ou out.LeaderElection = nil } if in.DatabaseSecret != nil { - out.AuthSecret = &v1.LocalObjectReference{ - Name: in.DatabaseSecret.SecretName, + out.AuthSecret = &v1alpha2.SecretReference{ + LocalObjectReference: v1.LocalObjectReference{ + Name: in.DatabaseSecret.SecretName, + }, } } out.StorageType = v1alpha2.StorageType(in.StorageType) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_helpers.go index b2d3f2442..1c45bfcd6 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_helpers.go @@ -730,8 +730,10 @@ func (e *Elasticsearch) setDefaultInternalUsersAndRoleMappings(esVersion *catalo if userSpec.SecretName == "" { userSpec.SecretName = e.DefaultUserCredSecretName(username) } - e.Spec.AuthSecret = &core.LocalObjectReference{ - Name: userSpec.SecretName, + e.Spec.AuthSecret = &SecretReference{ + LocalObjectReference: core.LocalObjectReference{ + Name: userSpec.SecretName, + }, } } } else if userSpec.SecretName == "" { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_types.go index d17722f75..d30492a20 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/elasticsearch_types.go @@ -77,7 +77,7 @@ type ElasticsearchSpec struct { // Database authentication secret // +optional - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + AuthSecret *SecretReference `json:"authSecret,omitempty"` // StorageType can be durable (default) or ephemeral StorageType StorageType `json:"storageType,omitempty"` @@ -364,6 +364,8 @@ type ElasticsearchStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/etcd_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/etcd_types.go index b2632e177..caa57e978 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/etcd_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/etcd_types.go @@ -64,7 +64,8 @@ type EtcdSpec struct { Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` // Database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // Init is used to initialize database // +optional @@ -119,6 +120,8 @@ type EtcdStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mariadb_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mariadb_types.go index 47ec4d50d..0e954e122 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mariadb_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mariadb_types.go @@ -68,7 +68,8 @@ type MariaDBSpec struct { Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` // Database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // Init is used to initialize database // +optional @@ -144,6 +145,8 @@ type MariaDBStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mongodb_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mongodb_types.go index ae1a379f2..8deb8c9b4 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mongodb_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mongodb_types.go @@ -77,7 +77,8 @@ type MongoDBSpec struct { EphemeralStorage *core.EmptyDirVolumeSource `json:"ephemeralStorage,omitempty"` // Database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // ClusterAuthMode for replicaset or sharding. (default will be x509 if sslmode is not `disabled`.) // See available ClusterAuthMode: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-clusterauthmode @@ -326,6 +327,8 @@ type MongoDBStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mysql_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mysql_types.go index 8bf0f9156..4b910fb99 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mysql_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mysql_types.go @@ -91,7 +91,8 @@ type MySQLSpec struct { Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` // Database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // Init is used to initialize database // +optional @@ -261,6 +262,8 @@ type MySQLStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go index 24d520345..6968076ce 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go @@ -420,6 +420,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/offshoot-api/api/v1.ServicePort": schema_kmodulesxyz_offshoot_api_api_v1_ServicePort(ref), "kmodules.xyz/offshoot-api/api/v1.ServiceSpec": schema_kmodulesxyz_offshoot_api_api_v1_ServiceSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ServiceTemplateSpec": schema_kmodulesxyz_offshoot_api_api_v1_ServiceTemplateSpec(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age": schema_apimachinery_apis_kubedb_v1alpha2_Age(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers": schema_apimachinery_apis_kubedb_v1alpha2_AllowedConsumers(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec": schema_apimachinery_apis_kubedb_v1alpha2_AutoOpsSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ConnectionPoolConfig": schema_apimachinery_apis_kubedb_v1alpha2_ConnectionPoolConfig(ref), @@ -503,6 +504,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RedisSpec": schema_apimachinery_apis_kubedb_v1alpha2_RedisSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RedisStatus": schema_apimachinery_apis_kubedb_v1alpha2_RedisStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ScriptSourceSpec": schema_apimachinery_apis_kubedb_v1alpha2_ScriptSourceSpec(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference": schema_apimachinery_apis_kubedb_v1alpha2_SecretReference(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SemiSyncSpec": schema_apimachinery_apis_kubedb_v1alpha2_SemiSyncSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SystemUserSecretsSpec": schema_apimachinery_apis_kubedb_v1alpha2_SystemUserSecretsSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.TLSPolicy": schema_apimachinery_apis_kubedb_v1alpha2_TLSPolicy(ref), @@ -20868,6 +20870,27 @@ func schema_kmodulesxyz_offshoot_api_api_v1_ServiceTemplateSpec(ref common.Refer } } +func schema_apimachinery_apis_kubedb_v1alpha2_Age(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "lastUpdateTimestamp": { + SchemaProps: spec.SchemaProps{ + Description: "Populated by Provisioner when authSecret is created or Ops Manager when authSecret is updated.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_AllowedConsumers(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21490,7 +21513,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ElasticsearchSpec(ref common.Refer "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "storageType": { @@ -21632,7 +21655,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ElasticsearchSpec(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ElasticsearchClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ElasticsearchRoleMapSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ElasticsearchUserSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KernelSettings", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ElasticsearchClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ElasticsearchRoleMapSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ElasticsearchUserSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KernelSettings", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -21670,11 +21693,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ElasticsearchStatus(ref common.Ref }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -21956,7 +21984,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_EtcdSpec(ref common.ReferenceCallb "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "init": { @@ -22017,7 +22045,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_EtcdSpec(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.TLSPolicy"}, + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.TLSPolicy"}, } } @@ -22055,11 +22083,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_EtcdStatus(ref common.ReferenceCal }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -22269,7 +22302,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "init": { @@ -22363,7 +22396,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBSpec(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -22401,11 +22434,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MariaDBStatus(ref common.Reference }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -23104,7 +23142,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBSpec(ref common.ReferenceCa "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "clusterAuthMode": { @@ -23229,7 +23267,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBSpec(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoArbiterNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBReplicaSet", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardingTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoHiddenNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"}, + "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoArbiterNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBReplicaSet", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoDBShardingTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MongoHiddenNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -23267,11 +23305,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MongoDBStatus(ref common.Reference }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -23562,7 +23605,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MySQLSpec(ref common.ReferenceCall "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "init": { @@ -23670,7 +23713,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MySQLSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MySQLTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MySQLTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -23708,11 +23751,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MySQLStatus(ref common.ReferenceCa }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -24026,8 +24074,8 @@ func schema_apimachinery_apis_kubedb_v1alpha2_PerconaXtraDBSpec(ref common.Refer }, "authSecret": { SchemaProps: spec.SchemaProps{ - Description: "AuthSecret specifies database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Description: "Database authentication secret", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "init": { @@ -24127,7 +24175,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_PerconaXtraDBSpec(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SystemUserSecretsSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SystemUserSecretsSpec"}, } } @@ -24165,11 +24213,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_PerconaXtraDBStatus(ref common.Ref }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -24637,7 +24690,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_PostgresSpec(ref common.ReferenceC "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "storageType": { @@ -24758,7 +24811,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_PostgresSpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.PostgreLeaderElectionConfig"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.PostgreLeaderElectionConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -24796,11 +24849,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_PostgresStatus(ref common.Referenc }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -25031,7 +25089,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLSpec(ref common.ReferenceC "authSecret": { SchemaProps: spec.SchemaProps{ Description: "ProxySQL secret containing username and password for root user and proxysql user", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "monitor": { @@ -25092,7 +25150,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLSpec(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLBackendSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLConfiguration"}, + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLBackendSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLConfiguration", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -25130,11 +25188,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLStatus(ref common.Referenc }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -25489,7 +25552,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_RedisSentinelSpec(ref common.Refer "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "disableAuth": { @@ -25531,7 +25594,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_RedisSentinelSpec(ref common.Refer }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"}, + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -25569,11 +25632,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_RedisSentinelStatus(ref common.Ref }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -25639,7 +25707,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_RedisSpec(ref common.ReferenceCall "authSecret": { SchemaProps: spec.SchemaProps{ Description: "Database authentication secret", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "disableAuth": { @@ -25733,7 +25801,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_RedisSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RedisClusterSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RedisSentinelRef"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AllowedConsumers", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.AutoOpsSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RedisClusterSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RedisSentinelRef", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -25771,11 +25839,16 @@ func schema_apimachinery_apis_kubedb_v1alpha2_RedisStatus(ref common.ReferenceCa }, }, }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"), + }, + }, }, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.Condition"}, + "kmodules.xyz/client-go/api/v1.Condition", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Age"}, } } @@ -25973,6 +26046,31 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ScriptSourceSpec(ref common.Refere } } +func schema_apimachinery_apis_kubedb_v1alpha2_SecretReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + Type: []string{"string"}, + Format: "", + }, + }, + "externallyManaged": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_SemiSyncSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -26016,20 +26114,20 @@ func schema_apimachinery_apis_kubedb_v1alpha2_SystemUserSecretsSpec(ref common.R "replicationUserSecret": { SchemaProps: spec.SchemaProps{ Description: "ReplicationUserSecret contains replication system user credentials", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, "monitorUserSecret": { SchemaProps: spec.SchemaProps{ Description: "MonitorUserSecret contains monitor system user credentials", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/perconaxtradb_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/perconaxtradb_types.go index f087ec643..021fd35d3 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/perconaxtradb_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/perconaxtradb_types.go @@ -67,8 +67,9 @@ type PerconaXtraDBSpec struct { // Storage spec to specify how storage shall be used. Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` - // AuthSecret specifies database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // Database authentication secret + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // Init is used to initialize database // +optional @@ -148,6 +149,8 @@ type PerconaXtraDBStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go index afa353e97..33c7532e4 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/postgres_types.go @@ -72,7 +72,8 @@ type PostgresSpec struct { LeaderElection *PostgreLeaderElectionConfig `json:"leaderElection,omitempty"` // Database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // StorageType can be durable (default) or ephemeral StorageType StorageType `json:"storageType,omitempty"` @@ -215,6 +216,8 @@ type PostgresStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/proxysql_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/proxysql_types.go index 72676d10e..0c3602db7 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/proxysql_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/proxysql_types.go @@ -145,7 +145,8 @@ type ProxySQLSpec struct { Backend *ProxySQLBackendSpec `json:"backend,omitempty"` // ProxySQL secret containing username and password for root user and proxysql user - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // Monitor is used monitor proxysql instance // +optional @@ -207,6 +208,8 @@ type ProxySQLStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_sentinel_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_sentinel_types.go index f0976b33b..dbb060832 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_sentinel_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_sentinel_types.go @@ -73,7 +73,8 @@ type RedisSentinelSpec struct { Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` // Database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // If disable Auth true then don't create any auth secret // +optional @@ -108,6 +109,8 @@ type RedisSentinelStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_types.go index 0b314f3f9..9d2f2615a 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/redis_types.go @@ -86,7 +86,8 @@ type RedisSpec struct { Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` // Database authentication secret - AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // +optional + AuthSecret *SecretReference `json:"authSecret,omitempty"` // If disable Auth true then don't create any auth secret // +optional @@ -178,6 +179,8 @@ type RedisStatus struct { // Conditions applied to the database, such as approval or denial. // +optional Conditions []kmapi.Condition `json:"conditions,omitempty"` + // +optional + AuthSecret *Age `json:"authSecret,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go index a8e9a7811..dc84b7fb0 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/types.go @@ -18,6 +18,7 @@ package v1alpha2 import ( core "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ofst "kmodules.xyz/offshoot-api/api/v1" ) @@ -150,9 +151,19 @@ type AutoOpsSpec struct { type SystemUserSecretsSpec struct { // ReplicationUserSecret contains replication system user credentials // +optional - ReplicationUserSecret *core.LocalObjectReference `json:"replicationUserSecret,omitempty"` + ReplicationUserSecret *SecretReference `json:"replicationUserSecret,omitempty"` // MonitorUserSecret contains monitor system user credentials // +optional - MonitorUserSecret *core.LocalObjectReference `json:"monitorUserSecret,omitempty"` + MonitorUserSecret *SecretReference `json:"monitorUserSecret,omitempty"` +} + +type SecretReference struct { + core.LocalObjectReference `json:",inline,omitempty"` + ExternallyManaged bool `json:"externallyManaged,omitempty"` +} + +type Age struct { + // Populated by Provisioner when authSecret is created or Ops Manager when authSecret is updated. + LastUpdateTimestamp metav1.Time `json:"lastUpdateTimestamp,omitempty"` } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go index f679a0663..d56ee3132 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/zz_generated.deepcopy.go @@ -31,6 +31,23 @@ import ( offshootapiapiv1 "kmodules.xyz/offshoot-api/api/v1" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Age) DeepCopyInto(out *Age) { + *out = *in + in.LastUpdateTimestamp.DeepCopyInto(&out.LastUpdateTimestamp) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Age. +func (in *Age) DeepCopy() *Age { + if in == nil { + return nil + } + out := new(Age) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AllowedConsumers) DeepCopyInto(out *AllowedConsumers) { *out = *in @@ -422,7 +439,7 @@ func (in *ElasticsearchSpec) DeepCopyInto(out *ElasticsearchSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Storage != nil { @@ -516,6 +533,11 @@ func (in *ElasticsearchStatus) DeepCopyInto(out *ElasticsearchStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -655,7 +677,7 @@ func (in *EtcdSpec) DeepCopyInto(out *EtcdSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Init != nil { @@ -704,6 +726,11 @@ func (in *EtcdStatus) DeepCopyInto(out *EtcdStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -836,7 +863,7 @@ func (in *MariaDBSpec) DeepCopyInto(out *MariaDBSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Init != nil { @@ -897,6 +924,11 @@ func (in *MariaDBStatus) DeepCopyInto(out *MariaDBStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -1301,7 +1333,7 @@ func (in *MongoDBSpec) DeepCopyInto(out *MongoDBSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Init != nil { @@ -1381,6 +1413,11 @@ func (in *MongoDBStatus) DeepCopyInto(out *MongoDBStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -1585,7 +1622,7 @@ func (in *MySQLSpec) DeepCopyInto(out *MySQLSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Init != nil { @@ -1651,6 +1688,11 @@ func (in *MySQLStatus) DeepCopyInto(out *MySQLStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -1840,7 +1882,7 @@ func (in *PerconaXtraDBSpec) DeepCopyInto(out *PerconaXtraDBSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Init != nil { @@ -1906,6 +1948,11 @@ func (in *PerconaXtraDBStatus) DeepCopyInto(out *PerconaXtraDBStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -2165,7 +2212,7 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Storage != nil { @@ -2231,6 +2278,11 @@ func (in *PostgresStatus) DeepCopyInto(out *PostgresStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -2401,7 +2453,7 @@ func (in *ProxySQLSpec) DeepCopyInto(out *ProxySQLSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Monitor != nil { @@ -2451,6 +2503,11 @@ func (in *ProxySQLStatus) DeepCopyInto(out *ProxySQLStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -2678,7 +2735,7 @@ func (in *RedisSentinelSpec) DeepCopyInto(out *RedisSentinelSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Monitor != nil { @@ -2710,6 +2767,11 @@ func (in *RedisSentinelStatus) DeepCopyInto(out *RedisSentinelStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -2749,7 +2811,7 @@ func (in *RedisSpec) DeepCopyInto(out *RedisSpec) { } if in.AuthSecret != nil { in, out := &in.AuthSecret, &out.AuthSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.Init != nil { @@ -2810,6 +2872,11 @@ func (in *RedisStatus) DeepCopyInto(out *RedisStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(Age) + (*in).DeepCopyInto(*out) + } return } @@ -2840,6 +2907,23 @@ func (in *ScriptSourceSpec) DeepCopy() *ScriptSourceSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretReference) DeepCopyInto(out *SecretReference) { + *out = *in + out.LocalObjectReference = in.LocalObjectReference + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference. +func (in *SecretReference) DeepCopy() *SecretReference { + if in == nil { + return nil + } + out := new(SecretReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SemiSyncSpec) DeepCopyInto(out *SemiSyncSpec) { *out = *in @@ -2867,12 +2951,12 @@ func (in *SystemUserSecretsSpec) DeepCopyInto(out *SystemUserSecretsSpec) { *out = *in if in.ReplicationUserSecret != nil { in, out := &in.ReplicationUserSecret, &out.ReplicationUserSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } if in.MonitorUserSecret != nil { in, out := &in.MonitorUserSecret, &out.MonitorUserSecret - *out = new(corev1.LocalObjectReference) + *out = new(SecretReference) **out = **in } return diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go index 7ccf7a3ab..6ac65b14f 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/constant.go @@ -46,7 +46,7 @@ const ( FailedToReconfigureDB = "FailedToReconfigureDB" SuccessfullyRestartedDBMembers = "SuccessfullyRestartedDBMembers" FailToRestartDBMembers = "FailToRestartDBMembers" - SuccessfullyRestatedStatefulSet = "SuccessfullyRestatedStatefulSet" + SuccessfullyRestartedStatefulSet = "SuccessfullyRestartedStatefulSet" FailedToRestartStatefulSet = "FailedToRestartStatefulSet" SuccessfullyRemovedTLSConfig = "SuccessfullyRemovedTLSConfig" FailedToRemoveTLSConfig = "FailedToRemoveTLSConfig" diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/elasticsearch_ops_types.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/elasticsearch_ops_types.go index 1565878cc..e63b039ca 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/elasticsearch_ops_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/elasticsearch_ops_types.go @@ -75,6 +75,9 @@ type ElasticsearchOpsRequestSpec struct { Apply ApplyOption `json:"apply,omitempty"` } +// ElasticsearchReplicaReadinessCriteria is the criteria for checking readiness of an Elasticsearch database +type ElasticsearchReplicaReadinessCriteria struct{} + type ElasticsearchUpgradeSpec struct { // Specifies the target version name from catalog TargetVersion string `json:"targetVersion,omitempty"` diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/mariadb_ops_types.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/mariadb_ops_types.go index 2a2a8312b..1bf0fa827 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/mariadb_ops_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/mariadb_ops_types.go @@ -75,6 +75,9 @@ type MariaDBOpsRequestSpec struct { Apply ApplyOption `json:"apply,omitempty"` } +// MariaDBReplicaReadinessCriteria is the criteria for checking readiness of an MariaDB database +type MariaDBReplicaReadinessCriteria struct{} + type MariaDBUpgradeSpec struct { // Specifies the target version name from catalog TargetVersion string `json:"targetVersion,omitempty"` diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go index cb2749b6e..804c8f64e 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/openapi_generated.go @@ -428,6 +428,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchOpsRequest": schema_apimachinery_apis_ops_v1alpha1_ElasticsearchOpsRequest(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchOpsRequestList": schema_apimachinery_apis_ops_v1alpha1_ElasticsearchOpsRequestList(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchOpsRequestSpec": schema_apimachinery_apis_ops_v1alpha1_ElasticsearchOpsRequestSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchReplicaReadinessCriteria": schema_apimachinery_apis_ops_v1alpha1_ElasticsearchReplicaReadinessCriteria(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchUpgradeSpec": schema_apimachinery_apis_ops_v1alpha1_ElasticsearchUpgradeSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_ElasticsearchVerticalScalingSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.ElasticsearchVerticalScalingTopologySpec": schema_apimachinery_apis_ops_v1alpha1_ElasticsearchVerticalScalingTopologySpec(ref), @@ -450,6 +451,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBOpsRequest": schema_apimachinery_apis_ops_v1alpha1_MariaDBOpsRequest(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBOpsRequestList": schema_apimachinery_apis_ops_v1alpha1_MariaDBOpsRequestList(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBOpsRequestSpec": schema_apimachinery_apis_ops_v1alpha1_MariaDBOpsRequestSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBReplicaReadinessCriteria": schema_apimachinery_apis_ops_v1alpha1_MariaDBReplicaReadinessCriteria(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBTLSSpec": schema_apimachinery_apis_ops_v1alpha1_MariaDBTLSSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBUpgradeSpec": schema_apimachinery_apis_ops_v1alpha1_MariaDBUpgradeSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.MariaDBVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_MariaDBVerticalScalingSpec(ref), @@ -494,6 +496,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBOpsRequest": schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBOpsRequest(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBOpsRequestList": schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBOpsRequestList(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBOpsRequestSpec": schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBOpsRequestSpec(ref), + "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBReplicaReadinessCriteria": schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBReplicaReadinessCriteria(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBTLSSpec": schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBTLSSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBUpgradeSpec": schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBUpgradeSpec(ref), "kubedb.dev/apimachinery/apis/ops/v1alpha1.PerconaXtraDBVerticalScalingSpec": schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBVerticalScalingSpec(ref), @@ -21294,6 +21297,17 @@ func schema_apimachinery_apis_ops_v1alpha1_ElasticsearchOpsRequestSpec(ref commo } } +func schema_apimachinery_apis_ops_v1alpha1_ElasticsearchReplicaReadinessCriteria(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ElasticsearchReplicaReadinessCriteria is the criteria for checking readiness of an Elasticsearch database", + Type: []string{"object"}, + }, + }, + } +} + func schema_apimachinery_apis_ops_v1alpha1_ElasticsearchUpgradeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -22141,6 +22155,17 @@ func schema_apimachinery_apis_ops_v1alpha1_MariaDBOpsRequestSpec(ref common.Refe } } +func schema_apimachinery_apis_ops_v1alpha1_MariaDBReplicaReadinessCriteria(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "MariaDBReplicaReadinessCriteria is the criteria for checking readiness of an MariaDB database", + Type: []string{"object"}, + }, + }, + } +} + func schema_apimachinery_apis_ops_v1alpha1_MariaDBTLSSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -23844,6 +23869,17 @@ func schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBOpsRequestSpec(ref commo } } +func schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBReplicaReadinessCriteria(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PerconaXtraDBReplicaReadinessCriteria is the criteria for checking readiness of an PerconaXtraDB database", + Type: []string{"object"}, + }, + }, + } +} + func schema_apimachinery_apis_ops_v1alpha1_PerconaXtraDBTLSSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/perconaxtradb_ops_types.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/perconaxtradb_ops_types.go index b22f077e6..a4273cf5e 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/perconaxtradb_ops_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/perconaxtradb_ops_types.go @@ -75,6 +75,9 @@ type PerconaXtraDBOpsRequestSpec struct { Apply ApplyOption `json:"apply,omitempty"` } +// PerconaXtraDBReplicaReadinessCriteria is the criteria for checking readiness of an PerconaXtraDB database +type PerconaXtraDBReplicaReadinessCriteria struct{} + type PerconaXtraDBUpgradeSpec struct { // Specifies the target version name from catalog TargetVersion string `json:"targetVersion,omitempty"` diff --git a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go index f6e193d02..659081499 100644 --- a/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/ops/v1alpha1/zz_generated.deepcopy.go @@ -322,6 +322,22 @@ func (in *ElasticsearchOpsRequestSpec) DeepCopy() *ElasticsearchOpsRequestSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ElasticsearchReplicaReadinessCriteria) DeepCopyInto(out *ElasticsearchReplicaReadinessCriteria) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticsearchReplicaReadinessCriteria. +func (in *ElasticsearchReplicaReadinessCriteria) DeepCopy() *ElasticsearchReplicaReadinessCriteria { + if in == nil { + return nil + } + out := new(ElasticsearchReplicaReadinessCriteria) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ElasticsearchUpgradeSpec) DeepCopyInto(out *ElasticsearchUpgradeSpec) { *out = *in @@ -1000,6 +1016,22 @@ func (in *MariaDBOpsRequestSpec) DeepCopy() *MariaDBOpsRequestSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MariaDBReplicaReadinessCriteria) DeepCopyInto(out *MariaDBReplicaReadinessCriteria) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MariaDBReplicaReadinessCriteria. +func (in *MariaDBReplicaReadinessCriteria) DeepCopy() *MariaDBReplicaReadinessCriteria { + if in == nil { + return nil + } + out := new(MariaDBReplicaReadinessCriteria) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MariaDBTLSSpec) DeepCopyInto(out *MariaDBTLSSpec) { *out = *in @@ -2277,6 +2309,22 @@ func (in *PerconaXtraDBOpsRequestSpec) DeepCopy() *PerconaXtraDBOpsRequestSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PerconaXtraDBReplicaReadinessCriteria) DeepCopyInto(out *PerconaXtraDBReplicaReadinessCriteria) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerconaXtraDBReplicaReadinessCriteria. +func (in *PerconaXtraDBReplicaReadinessCriteria) DeepCopy() *PerconaXtraDBReplicaReadinessCriteria { + if in == nil { + return nil + } + out := new(PerconaXtraDBReplicaReadinessCriteria) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PerconaXtraDBTLSSpec) DeepCopyInto(out *PerconaXtraDBTLSSpec) { *out = *in diff --git a/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/publisher_types.go b/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/publisher_types.go index 611058d50..8377253f9 100644 --- a/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/publisher_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/publisher_types.go @@ -120,7 +120,7 @@ const ( PublisherConditionTypeAllTablesFound PublisherConditionType = "AllTablesFound" PublisherMessageAllTablesNotFound PublisherMessage = "All tables are not found" - PublisherMessageAllTablesFound PublisherMessage = "All tables are not found" + PublisherMessageAllTablesFound PublisherMessage = "All tables are found" PublisherConditionTypePublicationSuccessful PublisherConditionType = "PublicationSuccessful" PublisherMessagePublicationIsSuccessful PublisherMessage = "Publication is successful" diff --git a/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/subscriber_types.go b/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/subscriber_types.go index a5c76b31f..82a8f56ae 100644 --- a/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/subscriber_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/postgres/v1alpha1/subscriber_types.go @@ -139,7 +139,7 @@ const ( SubscriberConditionTypeAllTablesFound SubscriberConditionType = "AllTablesFound" SubscriberMessageAllTablesNotFound SubscriberMessage = "All tables are not found" - SubscriberMessageAllTablesFound SubscriberMessage = "All tables are not found" + SubscriberMessageAllTablesFound SubscriberMessage = "All tables are found" SubscriberConditionTypeSubscriptionIsSuccessful SubscriberConditionType = "SubscriptionIsSuccessful" SubscriberMessageSubscriptionIsSuccessful SubscriberMessage = "Subscription is successful" @@ -158,7 +158,7 @@ const ( // +k8s:openapi-gen=true // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true -// +kubebuilder:resource:path=subscribers,singular=subsriber,shortName=sub,categories={datastore,kubedb,appscode,all} +// +kubebuilder:resource:path=subscribers,singular=subscriber,shortName=sub,categories={datastore,kubedb,appscode,all} // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_elasticsearchautoscalers.yaml b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_elasticsearchautoscalers.yaml index f75615172..a9a187cce 100644 --- a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_elasticsearchautoscalers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_elasticsearchautoscalers.yaml @@ -220,6 +220,19 @@ spec: type: string type: object x-kubernetes-map-type: atomic + opsRequestOptions: + properties: + apply: + default: IfReady + enum: + - IfReady + - Always + type: string + readinessCriteria: + type: object + timeout: + type: string + type: object storage: properties: node: diff --git a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mariadbautoscalers.yaml b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mariadbautoscalers.yaml index cc46f740f..bd615c8d2 100644 --- a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mariadbautoscalers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mariadbautoscalers.yaml @@ -85,6 +85,19 @@ spec: type: string type: object x-kubernetes-map-type: atomic + opsRequestOptions: + properties: + apply: + default: IfReady + enum: + - IfReady + - Always + type: string + readinessCriteria: + type: object + timeout: + type: string + type: object storage: properties: mariadb: diff --git a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_perconaxtradbautoscalers.yaml b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_perconaxtradbautoscalers.yaml index 365b2517c..d10cb4d18 100644 --- a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_perconaxtradbautoscalers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_perconaxtradbautoscalers.yaml @@ -85,6 +85,19 @@ spec: type: string type: object x-kubernetes-map-type: atomic + opsRequestOptions: + properties: + apply: + default: IfReady + enum: + - IfReady + - Always + type: string + readinessCriteria: + type: object + timeout: + type: string + type: object storage: properties: perconaxtradb: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml index 8744b157b..b420002f6 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_elasticsearches.yaml @@ -50,6 +50,8 @@ spec: properties: authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -4966,6 +4968,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml index 6d7931b20..817e68171 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_etcds.yaml @@ -50,6 +50,8 @@ spec: properties: authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -3450,6 +3452,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml index d158bce76..88b609fd7 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mariadbs.yaml @@ -116,6 +116,8 @@ spec: type: object authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -3722,6 +3724,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml index 583e5be02..7518587b8 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mongodbs.yaml @@ -2444,6 +2444,8 @@ spec: type: object authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -15703,6 +15705,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml index 57b4550c7..151fed80c 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mysqls.yaml @@ -182,6 +182,8 @@ spec: type: object authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -6191,6 +6193,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml index 85073467e..b208b94b8 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_perconaxtradbs.yaml @@ -116,6 +116,8 @@ spec: type: object authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -3611,12 +3613,16 @@ spec: properties: monitorUserSecret: properties: + externallyManaged: + type: boolean name: type: string type: object x-kubernetes-map-type: atomic replicationUserSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -3737,6 +3743,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml index 7edb05d3a..ff1bb007d 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_postgreses.yaml @@ -116,6 +116,8 @@ spec: type: object authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -3774,6 +3776,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml index dd11a2d63..1afa015bc 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_proxysqls.yaml @@ -50,6 +50,8 @@ spec: properties: authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -2839,6 +2841,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml index 68f1f7baf..45185a146 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redises.yaml @@ -116,6 +116,8 @@ spec: type: object authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -3744,6 +3746,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redissentinels.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redissentinels.yaml index 2fcb1216e..767f51323 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redissentinels.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_redissentinels.yaml @@ -45,6 +45,8 @@ spec: properties: authSecret: properties: + externallyManaged: + type: boolean name: type: string type: object @@ -2844,6 +2846,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/postgres.kubedb.com_subscribers.yaml b/vendor/kubedb.dev/apimachinery/crds/postgres.kubedb.com_subscribers.yaml index dfdbe89af..0cb4d0f45 100644 --- a/vendor/kubedb.dev/apimachinery/crds/postgres.kubedb.com_subscribers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/postgres.kubedb.com_subscribers.yaml @@ -18,7 +18,7 @@ spec: plural: subscribers shortNames: - sub - singular: subsriber + singular: subscriber scope: Namespaced versions: - additionalPrinterColumns: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml index 3db6163a3..dc2e1db42 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_elasticsearchinsights.yaml @@ -79,6 +79,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml index a4c31d39a..97ac51aa2 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mariadbinsights.yaml @@ -72,6 +72,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml index ad6604a59..3df2fd30b 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mongodbinsights.yaml @@ -103,6 +103,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml index 554111713..77b94f199 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_mysqlinsights.yaml @@ -72,6 +72,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml index 0c48c0e80..754aba0d6 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_postgresinsights.yaml @@ -80,6 +80,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml index 27fb158e3..4197e8772 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ui.kubedb.com_redisinsights.yaml @@ -72,6 +72,12 @@ spec: type: object status: properties: + authSecret: + properties: + lastUpdateTimestamp: + format: date-time + type: string + type: object conditions: items: properties: diff --git a/vendor/modules.txt b/vendor/modules.txt index 52290745d..14f838c8e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -765,7 +765,7 @@ kmodules.xyz/offshoot-api/api/v1 # kmodules.xyz/prober v0.25.0 ## explicit; go 1.18 kmodules.xyz/prober/api/v1 -# kubedb.dev/apimachinery v0.28.4-0.20220918140426-7263b50309d2 +# kubedb.dev/apimachinery v0.28.4-0.20220924164625-f5eabfc23811 ## explicit; go 1.18 kubedb.dev/apimachinery/apis kubedb.dev/apimachinery/apis/autoscaling @@ -939,7 +939,7 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.3.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# stash.appscode.dev/apimachinery v0.22.1-0.20220918134206-55dff33147a0 +# stash.appscode.dev/apimachinery v0.22.1-0.20220924053358-8821fa34c13f ## explicit; go 1.18 stash.appscode.dev/apimachinery/apis stash.appscode.dev/apimachinery/apis/repositories diff --git a/vendor/stash.appscode.dev/apimachinery/apis/constants.go b/vendor/stash.appscode.dev/apimachinery/apis/constants.go index 3428bb08b..1fbf3837b 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/constants.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/constants.go @@ -227,3 +227,24 @@ const ( StashVolumeSnapshotRestorerClusterRole = "stash-vs-restorer-job" StashStorageClassReaderClusterRole = "stash-sc-reader" ) + +// =================== Keys for structure logging ===================== +const ( + ObjectKey = "key" + ObjectKind = "kind" + ObjectName = "name" + ObjectNamespace = "namespace" + + KeyTargetKind = "target_kind" + KeyTargetName = "target_name" + KeyTargetNamespace = "target_namespace" + + KeyInvokerKind = "invoker_kind" + KeyInvokerName = "invoker_name" + KeyInvokerNamespace = "invoker_namespace" + + KeyRepositoryName = "repo_name" + KeyRepositoryNamespace = "repo_namespace" + + KeyReason = "reason" +) diff --git a/vendor/stash.appscode.dev/apimachinery/apis/helpers.go b/vendor/stash.appscode.dev/apimachinery/apis/helpers.go new file mode 100644 index 000000000..1ce4db773 --- /dev/null +++ b/vendor/stash.appscode.dev/apimachinery/apis/helpers.go @@ -0,0 +1,42 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apis + +import "strings" + +// ResourceShortForm takes a resource kind and returns the short form of the resource. +// xref: https://kubernetes.io/docs/reference/kubectl/overview/#resource-types +func ResourceShortForm(kind string) string { + switch kind { + case KindDeployment: + return "deploy" + case KindReplicationController: + return "rc" + case KindDaemonSet: + return "ds" + case KindStatefulSet: + return "sts" + case KindPersistentVolumeClaim: + return "pvc" + case KindPod: + return "po" + case KindAppBinding: + return "app" + default: + return strings.ToLower(kind) + } +} diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_batch_types.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_batch_types.go index f2779a26d..8c0dda796 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_batch_types.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_batch_types.go @@ -91,6 +91,11 @@ type BackupBatchSpec struct { // if backup does not complete within this time limit. By default, Stash don't set any timeout for backup. // +optional TimeOut string `json:"timeOut,omitempty"` + + // RetryConfig specify a configuration for retry a backup if it fails. + // By default, Stash does not retry any failed backup. + // +optional + RetryConfig *RetryConfig `json:"retryConfig,omitempty"` } type BackupBatchStatus struct { diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_blueprint_types.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_blueprint_types.go index 6805c10d6..0e541153f 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_blueprint_types.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_blueprint_types.go @@ -89,6 +89,11 @@ type BackupBlueprintSpec struct { // if backup does not complete within this time limit. By default, Stash don't set any timeout for backup. // +optional TimeOut string `json:"timeOut,omitempty"` + + // RetryConfig specify a configuration for retry a backup if it fails. + // By default, Stash does not retry any failed backup. + // +optional + RetryConfig *RetryConfig `json:"retryConfig,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_configuration_types.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_configuration_types.go index 49b58e63e..8dec291bf 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_configuration_types.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_configuration_types.go @@ -104,6 +104,11 @@ type BackupConfigurationSpec struct { // if backup does not complete within this time limit. By default, Stash don't set any timeout for backup. // +optional TimeOut string `json:"timeOut,omitempty"` + + // RetryConfig specify a configuration for retry a backup if it fails. + // By default, Stash does not retry any failed backup. + // +optional + RetryConfig *RetryConfig `json:"retryConfig,omitempty"` } // Hooks describes actions that Stash should take in response to backup sessions. For the PostBackup diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_session_types.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_session_types.go index 1c341fa74..d6bd9467e 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_session_types.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/backup_session_types.go @@ -50,6 +50,11 @@ type BackupSessionSpec struct { // Invoker refers to the BackupConfiguration or BackupBatch being used to invoke this backup session // +optional Invoker BackupInvokerRef `json:"invoker,omitempty"` + + // RetryLeft specifies number of retry attempts left for the session. + // If this set to non-zero, Stash will create a new BackupSession if the current one fails. + // +optional + RetryLeft int32 `json:"retryLeft,omitempty"` } // +kubebuilder:validation:Enum=Pending;Skipped;Running;Succeeded;Failed;Unknown @@ -99,7 +104,17 @@ type BackupSessionStatus struct { // SessionDeadline specifies the deadline of backup. BackupSession will be // considered Failed if backup does not complete within this deadline // +optional - SessionDeadline metav1.Time `json:"sessionDeadline,omitempty"` + SessionDeadline *metav1.Time `json:"sessionDeadline,omitempty"` + + // Retried specifies whether this session was retried or not. + // This field will exist only if the `retryConfig` has been set in the respective backup invoker. + // +optional + Retried *bool `json:"retried,omitempty"` + + // NextRetry specifies the time when Stash should retry the current failed backup. + // This field will exist only if the `retryConfig` has been set in the respective backup invoker. + // +optional + NextRetry *metav1.Time `json:"nextRetry,omitempty"` } type BackupTargetStatus struct { diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go index aa3223c36..d1addb1b6 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go @@ -439,6 +439,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "stash.appscode.dev/apimachinery/apis/stash/v1beta1.RestoreSessionStatus": schema_apimachinery_apis_stash_v1beta1_RestoreSessionStatus(ref), "stash.appscode.dev/apimachinery/apis/stash/v1beta1.RestoreTarget": schema_apimachinery_apis_stash_v1beta1_RestoreTarget(ref), "stash.appscode.dev/apimachinery/apis/stash/v1beta1.RestoreTargetSpec": schema_apimachinery_apis_stash_v1beta1_RestoreTargetSpec(ref), + "stash.appscode.dev/apimachinery/apis/stash/v1beta1.RetryConfig": schema_apimachinery_apis_stash_v1beta1_RetryConfig(ref), "stash.appscode.dev/apimachinery/apis/stash/v1beta1.Rule": schema_apimachinery_apis_stash_v1beta1_Rule(ref), "stash.appscode.dev/apimachinery/apis/stash/v1beta1.SnapshotStats": schema_apimachinery_apis_stash_v1beta1_SnapshotStats(ref), "stash.appscode.dev/apimachinery/apis/stash/v1beta1.Summary": schema_apimachinery_apis_stash_v1beta1_Summary(ref), @@ -19994,12 +19995,18 @@ func schema_apimachinery_apis_stash_v1beta1_BackupBatchSpec(ref common.Reference Format: "", }, }, + "retryConfig": { + SchemaProps: spec.SchemaProps{ + Description: "RetryConfig specify a configuration for retry a backup if it fails. By default, Stash does not retry any failed backup.", + Ref: ref("stash.appscode.dev/apimachinery/apis/stash/v1beta1.RetryConfig"), + }, + }, }, Required: []string{"retentionPolicy"}, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/offshoot-api/api/v1.RuntimeSettings", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.RetentionPolicy", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupConfigurationTemplateSpec", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupHooks"}, + "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/offshoot-api/api/v1.RuntimeSettings", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.RetentionPolicy", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupConfigurationTemplateSpec", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupHooks", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.RetryConfig"}, } } @@ -20247,12 +20254,18 @@ func schema_apimachinery_apis_stash_v1beta1_BackupBlueprintSpec(ref common.Refer Format: "", }, }, + "retryConfig": { + SchemaProps: spec.SchemaProps{ + Description: "RetryConfig specify a configuration for retry a backup if it fails. By default, Stash does not retry any failed backup.", + Ref: ref("stash.appscode.dev/apimachinery/apis/stash/v1beta1.RetryConfig"), + }, + }, }, Required: []string{"retentionPolicy"}, }, }, Dependencies: []string{ - "kmodules.xyz/objectstore-api/api/v1.Backend", "kmodules.xyz/offshoot-api/api/v1.PersistentVolumeClaim", "kmodules.xyz/offshoot-api/api/v1.RuntimeSettings", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.RetentionPolicy", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.UsagePolicy", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupHooks", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.EmptyDirSettings", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.TaskRef"}, + "kmodules.xyz/objectstore-api/api/v1.Backend", "kmodules.xyz/offshoot-api/api/v1.PersistentVolumeClaim", "kmodules.xyz/offshoot-api/api/v1.RuntimeSettings", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.RetentionPolicy", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.UsagePolicy", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupHooks", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.EmptyDirSettings", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.RetryConfig", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.TaskRef"}, } } @@ -20443,12 +20456,18 @@ func schema_apimachinery_apis_stash_v1beta1_BackupConfigurationSpec(ref common.R Format: "", }, }, + "retryConfig": { + SchemaProps: spec.SchemaProps{ + Description: "RetryConfig specify a configuration for retry a backup if it fails. By default, Stash does not retry any failed backup.", + Ref: ref("stash.appscode.dev/apimachinery/apis/stash/v1beta1.RetryConfig"), + }, + }, }, Required: []string{"retentionPolicy"}, }, }, Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/offshoot-api/api/v1.PersistentVolumeClaim", "kmodules.xyz/offshoot-api/api/v1.RuntimeSettings", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.RetentionPolicy", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupHooks", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupTarget", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.EmptyDirSettings", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.TaskRef"}, + "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/offshoot-api/api/v1.PersistentVolumeClaim", "kmodules.xyz/offshoot-api/api/v1.RuntimeSettings", "stash.appscode.dev/apimachinery/apis/stash/v1alpha1.RetentionPolicy", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupHooks", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupTarget", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.EmptyDirSettings", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.RetryConfig", "stash.appscode.dev/apimachinery/apis/stash/v1beta1.TaskRef"}, } } @@ -20717,6 +20736,13 @@ func schema_apimachinery_apis_stash_v1beta1_BackupSessionSpec(ref common.Referen Ref: ref("stash.appscode.dev/apimachinery/apis/stash/v1beta1.BackupInvokerRef"), }, }, + "retryLeft": { + SchemaProps: spec.SchemaProps{ + Description: "RetryLeft specifies number of retry attempts left for the session. If this set to non-zero, Stash will create a new BackupSession if the current one fails.", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, }, @@ -20776,7 +20802,19 @@ func schema_apimachinery_apis_stash_v1beta1_BackupSessionStatus(ref common.Refer "sessionDeadline": { SchemaProps: spec.SchemaProps{ Description: "SessionDeadline specifies the deadline of backup. BackupSession will be considered Failed if backup does not complete within this deadline", - Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "retried": { + SchemaProps: spec.SchemaProps{ + Description: "Retried specifies whether this session was retried or not. This field will exist only if the `retryConfig` has been set in the respective backup invoker.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "nextRetry": { + SchemaProps: spec.SchemaProps{ + Description: "NextRetry specifies the time when Stash should retry the current failed backup. This field will exist only if the `retryConfig` has been set in the respective backup invoker.", Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -21777,7 +21815,6 @@ func schema_apimachinery_apis_stash_v1beta1_RestoreBatchStatus(ref common.Refere "sessionDeadline": { SchemaProps: spec.SchemaProps{ Description: "SessionDeadline specifies the deadline of restore process. RestoreBatch will be considered Failed if restore does not complete within this deadline", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -22119,7 +22156,6 @@ func schema_apimachinery_apis_stash_v1beta1_RestoreSessionStatus(ref common.Refe "sessionDeadline": { SchemaProps: spec.SchemaProps{ Description: "SessionDeadline specifies the deadline of restore process. RestoreSession will be considered Failed if restore does not complete within this deadline", - Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -22276,6 +22312,32 @@ func schema_apimachinery_apis_stash_v1beta1_RestoreTargetSpec(ref common.Referen } } +func schema_apimachinery_apis_stash_v1beta1_RetryConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "maxRetry": { + SchemaProps: spec.SchemaProps{ + Description: "MaxRetry specifies the maximum number of attempts Stash should retry. Default value: 1", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "delay": { + SchemaProps: spec.SchemaProps{ + Description: "The number of seconds to wait before next retry. If you don't specify this field, Stash will retry immediately.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + func schema_apimachinery_apis_stash_v1beta1_Rule(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_batch_types.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_batch_types.go index 9c1327932..868fb1d2d 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_batch_types.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_batch_types.go @@ -90,7 +90,7 @@ type RestoreBatchStatus struct { // SessionDeadline specifies the deadline of restore process. RestoreBatch will be // considered Failed if restore does not complete within this deadline // +optional - SessionDeadline metav1.Time `json:"sessionDeadline,omitempty"` + SessionDeadline *metav1.Time `json:"sessionDeadline,omitempty"` } // +kubebuilder:validation:Enum=Pending;Succeeded;Running;Failed diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_session_types.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_session_types.go index 24f3c3f4f..dc40a78d2 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_session_types.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/restore_session_types.go @@ -166,7 +166,7 @@ type RestoreSessionStatus struct { // SessionDeadline specifies the deadline of restore process. RestoreSession will be // considered Failed if restore does not complete within this deadline // +optional - SessionDeadline metav1.Time `json:"sessionDeadline,omitempty"` + SessionDeadline *metav1.Time `json:"sessionDeadline,omitempty"` } type HostRestoreStats struct { diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/types.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/types.go index 321036a7b..06b129af9 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/types.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/types.go @@ -150,3 +150,13 @@ const ( Parallel ExecutionOrder = "Parallel" Sequential ExecutionOrder = "Sequential" ) + +type RetryConfig struct { + // MaxRetry specifies the maximum number of attempts Stash should retry. Default value: 1 + // +kubebuilder:default=1 + MaxRetry int32 `json:"maxRetry,omitempty"` + + // The number of seconds to wait before next retry. If you don't specify this field, Stash will retry immediately. + // +optional + Delay int32 `json:"delay,omitempty"` +} diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go index 2bcadfad8..248c7d717 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/zz_generated.deepcopy.go @@ -113,6 +113,11 @@ func (in *BackupBatchSpec) DeepCopyInto(out *BackupBatchSpec) { *out = new(BackupHooks) (*in).DeepCopyInto(*out) } + if in.RetryConfig != nil { + in, out := &in.RetryConfig, &out.RetryConfig + *out = new(RetryConfig) + **out = **in + } return } @@ -239,6 +244,11 @@ func (in *BackupBlueprintSpec) DeepCopyInto(out *BackupBlueprintSpec) { *out = new(int32) **out = **in } + if in.RetryConfig != nil { + in, out := &in.RetryConfig, &out.RetryConfig + *out = new(RetryConfig) + **out = **in + } return } @@ -324,6 +334,11 @@ func (in *BackupConfigurationSpec) DeepCopyInto(out *BackupConfigurationSpec) { *out = new(int32) **out = **in } + if in.RetryConfig != nil { + in, out := &in.RetryConfig, &out.RetryConfig + *out = new(RetryConfig) + **out = **in + } return } @@ -531,7 +546,19 @@ func (in *BackupSessionStatus) DeepCopyInto(out *BackupSessionStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.SessionDeadline.DeepCopyInto(&out.SessionDeadline) + if in.SessionDeadline != nil { + in, out := &in.SessionDeadline, &out.SessionDeadline + *out = (*in).DeepCopy() + } + if in.Retried != nil { + in, out := &in.Retried, &out.Retried + *out = new(bool) + **out = **in + } + if in.NextRetry != nil { + in, out := &in.NextRetry, &out.NextRetry + *out = (*in).DeepCopy() + } return } @@ -1049,7 +1076,10 @@ func (in *RestoreBatchStatus) DeepCopyInto(out *RestoreBatchStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.SessionDeadline.DeepCopyInto(&out.SessionDeadline) + if in.SessionDeadline != nil { + in, out := &in.SessionDeadline, &out.SessionDeadline + *out = (*in).DeepCopy() + } return } @@ -1229,7 +1259,10 @@ func (in *RestoreSessionStatus) DeepCopyInto(out *RestoreSessionStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.SessionDeadline.DeepCopyInto(&out.SessionDeadline) + if in.SessionDeadline != nil { + in, out := &in.SessionDeadline, &out.SessionDeadline + *out = (*in).DeepCopy() + } return } @@ -1325,6 +1358,22 @@ func (in *RestoreTargetSpec) DeepCopy() *RestoreTargetSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RetryConfig) DeepCopyInto(out *RetryConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryConfig. +func (in *RetryConfig) DeepCopy() *RetryConfig { + if in == nil { + return nil + } + out := new(RetryConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Rule) DeepCopyInto(out *Rule) { *out = *in diff --git a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupbatches.yaml b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupbatches.yaml index b1b715831..1ac3bf4ee 100644 --- a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupbatches.yaml +++ b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupbatches.yaml @@ -3792,6 +3792,22 @@ spec: - name - prune type: object + retryConfig: + description: RetryConfig specify a configuration for retry a backup + if it fails. By default, Stash does not retry any failed backup. + properties: + delay: + description: The number of seconds to wait before next retry. + If you don't specify this field, Stash will retry immediately. + format: int32 + type: integer + maxRetry: + default: 1 + description: 'MaxRetry specifies the maximum number of attempts + Stash should retry. Default value: 1' + format: int32 + type: integer + type: object runtimeSettings: description: RuntimeSettings allow to specify Resources, NodeSelector, Affinity, Toleration, ReadinessProbe etc, and used to create service diff --git a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupblueprints.yaml b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupblueprints.yaml index 1432f27b2..a9dab8baf 100644 --- a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupblueprints.yaml +++ b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupblueprints.yaml @@ -2411,6 +2411,22 @@ spec: - name - prune type: object + retryConfig: + description: RetryConfig specify a configuration for retry a backup + if it fails. By default, Stash does not retry any failed backup. + properties: + delay: + description: The number of seconds to wait before next retry. + If you don't specify this field, Stash will retry immediately. + format: int32 + type: integer + maxRetry: + default: 1 + description: 'MaxRetry specifies the maximum number of attempts + Stash should retry. Default value: 1' + format: int32 + type: integer + type: object runtimeSettings: description: RuntimeSettings allow to specify Resources, NodeSelector, Affinity, Toleration, ReadinessProbe etc. diff --git a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupconfigurations.yaml b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupconfigurations.yaml index f9cb4926a..bf019a547 100644 --- a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupconfigurations.yaml +++ b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupconfigurations.yaml @@ -819,6 +819,22 @@ spec: - name - prune type: object + retryConfig: + description: RetryConfig specify a configuration for retry a backup + if it fails. By default, Stash does not retry any failed backup. + properties: + delay: + description: The number of seconds to wait before next retry. + If you don't specify this field, Stash will retry immediately. + format: int32 + type: integer + maxRetry: + default: 1 + description: 'MaxRetry specifies the maximum number of attempts + Stash should retry. Default value: 1' + format: int32 + type: integer + type: object runtimeSettings: description: RuntimeSettings allow to specify Resources, NodeSelector, Affinity, Toleration, ReadinessProbe etc. diff --git a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupsessions.yaml b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupsessions.yaml index d42f37e4d..3f67a7913 100644 --- a/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupsessions.yaml +++ b/vendor/stash.appscode.dev/apimachinery/crds/stash.appscode.com_backupsessions.yaml @@ -69,6 +69,12 @@ spec: - kind - name type: object + retryLeft: + description: RetryLeft specifies number of retry attempts left for + the session. If this set to non-zero, Stash will create a new BackupSession + if the current one fails. + format: int32 + type: integer type: object status: properties: @@ -120,6 +126,12 @@ spec: - type type: object type: array + nextRetry: + description: NextRetry specifies the time when Stash should retry + the current failed backup. This field will exist only if the `retryConfig` + has been set in the respective backup invoker. + format: date-time + type: string phase: description: Phase indicates the overall phase of the backup process for this BackupSession. Phase will be "Succeeded" only if phase @@ -133,6 +145,11 @@ spec: - Failed - Unknown type: string + retried: + description: Retried specifies whether this session was retried or + not. This field will exist only if the `retryConfig` has been set + in the respective backup invoker. + type: boolean sessionDeadline: description: SessionDeadline specifies the deadline of backup. BackupSession will be considered Failed if backup does not complete within this