diff --git a/clickhouse/kubedb_client_builder.go b/clickhouse/kubedb_client_builder.go index 8962435d..65c42523 100644 --- a/clickhouse/kubedb_client_builder.go +++ b/clickhouse/kubedb_client_builder.go @@ -21,11 +21,11 @@ import ( "database/sql" "fmt" - olddbapi "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" - _ "github.com/ClickHouse/clickhouse-go/v2" core "k8s.io/api/core/v1" "k8s.io/klog/v2" + "kubedb.dev/apimachinery/apis/kubedb" + olddbapi "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -95,15 +95,17 @@ func (o *KubeDBClientBuilder) getURL() string { } func (o *KubeDBClientBuilder) getPort() *int { - chPort := 9000 + chPort := kubedb.ClickHouseNativeTCP return &chPort } func (o *KubeDBClientBuilder) getClickHouseRootCredentials() (string, string, error) { db := o.db var secretName string - if db.Spec.AuthSecret != nil { + if !db.Spec.DisableSecurity { secretName = db.GetAuthSecretName() + } else { + return kubedb.ClickHouseDefaultUser, "", nil } var secret core.Secret err := o.kc.Get(o.ctx, client.ObjectKey{Namespace: db.Namespace, Name: secretName}, &secret) diff --git a/go.mod b/go.mod index 6bd31ca4..6be1ffbb 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( k8s.io/klog/v2 v2.130.1 kmodules.xyz/client-go v0.30.13 kmodules.xyz/custom-resources v0.30.0 - kubedb.dev/apimachinery v0.47.1-0.20240924051141-f0421dd9f647 + kubedb.dev/apimachinery v0.47.1-0.20240925065855-706baeb42442 sigs.k8s.io/controller-runtime v0.18.4 xorm.io/xorm v1.3.6 ) diff --git a/go.sum b/go.sum index 5985a844..9d00a17d 100644 --- a/go.sum +++ b/go.sum @@ -802,8 +802,8 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9 kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI= kmodules.xyz/offshoot-api v0.30.0 h1:dq9F93pu4Q8rL9oTcCk+vGGy8vpS7RNt0GSwx7Bvhec= kmodules.xyz/offshoot-api v0.30.0/go.mod h1:o9VoA3ImZMDBp3lpLb8+kc2d/KBxioRwCpaKDfLIyDw= -kubedb.dev/apimachinery v0.47.1-0.20240924051141-f0421dd9f647 h1:yRqO/MkRwf4FxE/LktLz6fgkHn58FSxiNrR4NAMDxdQ= -kubedb.dev/apimachinery v0.47.1-0.20240924051141-f0421dd9f647/go.mod h1:iD6XKg9Blvfd9iYEO0N9GKiSz6r+yzEPZnfkYdESNG4= +kubedb.dev/apimachinery v0.47.1-0.20240925065855-706baeb42442 h1:MgXbQzSri2ibP/MJFNn9lajy+CzeW5ajsSuMS5bf6mI= +kubedb.dev/apimachinery v0.47.1-0.20240925065855-706baeb42442/go.mod h1:iD6XKg9Blvfd9iYEO0N9GKiSz6r+yzEPZnfkYdESNG4= kubeops.dev/petset v0.0.5-0.20240603165102-e2d9decb8abe h1:uWyps3VIDFwGuL0yQa0eMGaLg4ofVwpy59U14Trxnz8= kubeops.dev/petset v0.0.5-0.20240603165102-e2d9decb8abe/go.mod h1:A15vh0r979NsvL65DTIZKWsa/NoX9VapHBAEw1ZsdYI= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/clickhouse_version_types.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/clickhouse_version_types.go index 88af5f06..37bd4b23 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/clickhouse_version_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/clickhouse_version_types.go @@ -63,6 +63,9 @@ type ClickHouseVersionSpec struct { // Database Image InitContainer ClickHouseInitContainer `json:"initContainer"` + // ClickHouse Keeper Image + ClickHouseKeeper ClickHouseKeeperContainer `json:"clickHouseKeeper"` + // SecurityContext is for the additional config for the DB container // +optional SecurityContext SecurityContext `json:"securityContext"` @@ -81,6 +84,11 @@ type ClickHouseInitContainer struct { Image string `json:"image"` } +// ClickHouseKeeperContainer is the ClickHouse keeper Container image +type ClickHouseKeeperContainer struct { + Image string `json:"image"` +} + // ClickHouseVersionStatus defines the observed state of ClickHouseVersion type ClickHouseVersionStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go index 2478a3f1..0027415a 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/openapi_generated.go @@ -499,6 +499,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/catalog/v1alpha1.CassandraVersionStatus": schema_apimachinery_apis_catalog_v1alpha1_CassandraVersionStatus(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo": schema_apimachinery_apis_catalog_v1alpha1_ChartInfo(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseInitContainer": schema_apimachinery_apis_catalog_v1alpha1_ClickHouseInitContainer(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseKeeperContainer": schema_apimachinery_apis_catalog_v1alpha1_ClickHouseKeeperContainer(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseVersion": schema_apimachinery_apis_catalog_v1alpha1_ClickHouseVersion(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseVersionDatabase": schema_apimachinery_apis_catalog_v1alpha1_ClickHouseVersionDatabase(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseVersionList": schema_apimachinery_apis_catalog_v1alpha1_ClickHouseVersionList(ref), @@ -25651,6 +25652,27 @@ func schema_apimachinery_apis_catalog_v1alpha1_ClickHouseInitContainer(ref commo } } +func schema_apimachinery_apis_catalog_v1alpha1_ClickHouseKeeperContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClickHouseKeeperContainer is the ClickHouse keeper Container image", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "image": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"image"}, + }, + }, + } +} + func schema_apimachinery_apis_catalog_v1alpha1_ClickHouseVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -25796,6 +25818,13 @@ func schema_apimachinery_apis_catalog_v1alpha1_ClickHouseVersionSpec(ref common. Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseInitContainer"), }, }, + "clickHouseKeeper": { + SchemaProps: spec.SchemaProps{ + Description: "ClickHouse Keeper Image", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseKeeperContainer"), + }, + }, "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext is for the additional config for the DB container", @@ -25817,11 +25846,11 @@ func schema_apimachinery_apis_catalog_v1alpha1_ClickHouseVersionSpec(ref common. }, }, }, - Required: []string{"version", "db", "initContainer"}, + Required: []string{"version", "db", "initContainer", "clickHouseKeeper"}, }, }, Dependencies: []string{ - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"}, + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseKeeperContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ClickHouseVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"}, } } @@ -29692,6 +29721,13 @@ func schema_apimachinery_apis_catalog_v1alpha1_PgpoolVersionSpec(ref common.Refe Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.PgpoolVersionExporter"), }, }, + "updateConstraints": { + SchemaProps: spec.SchemaProps{ + Description: "update constraints", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"), + }, + }, "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext is for the additional config for pgpool DB container", @@ -29717,7 +29753,7 @@ func schema_apimachinery_apis_catalog_v1alpha1_PgpoolVersionSpec(ref common.Refe }, }, Dependencies: []string{ - "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PgpoolSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PgpoolVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PgpoolVersionPgpool"}, + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ChartInfo", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PgpoolSecurityContext", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PgpoolVersionExporter", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.PgpoolVersionPgpool", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.UpdateConstraints"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgpool_version_types.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgpool_version_types.go index 5eafc467..704afa7b 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgpool_version_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgpool_version_types.go @@ -59,6 +59,9 @@ type PgpoolVersionSpec struct { // Exporter Image Exporter PgpoolVersionExporter `json:"exporter,omitempty"` + // update constraints + UpdateConstraints UpdateConstraints `json:"updateConstraints,omitempty"` + // SecurityContext is for the additional config for pgpool DB container // +optional SecurityContext PgpoolSecurityContext `json:"securityContext"` diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go index ff7292fc..8368d286 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/zz_generated.deepcopy.go @@ -270,6 +270,22 @@ func (in *ClickHouseInitContainer) DeepCopy() *ClickHouseInitContainer { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseKeeperContainer) DeepCopyInto(out *ClickHouseKeeperContainer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseKeeperContainer. +func (in *ClickHouseKeeperContainer) DeepCopy() *ClickHouseKeeperContainer { + if in == nil { + return nil + } + out := new(ClickHouseKeeperContainer) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClickHouseVersion) DeepCopyInto(out *ClickHouseVersion) { *out = *in @@ -352,6 +368,7 @@ func (in *ClickHouseVersionSpec) DeepCopyInto(out *ClickHouseVersionSpec) { *out = *in out.DB = in.DB out.InitContainer = in.InitContainer + out.ClickHouseKeeper = in.ClickHouseKeeper in.SecurityContext.DeepCopyInto(&out.SecurityContext) if in.UI != nil { in, out := &in.UI, &out.UI @@ -2647,6 +2664,7 @@ func (in *PgpoolVersionSpec) DeepCopyInto(out *PgpoolVersionSpec) { *out = *in out.Pgpool = in.Pgpool out.Exporter = in.Exporter + in.UpdateConstraints.DeepCopyInto(&out.UpdateConstraints) in.SecurityContext.DeepCopyInto(&out.SecurityContext) if in.UI != nil { in, out := &in.UI, &out.UI diff --git a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_helpers.go b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_helpers.go index b7dbf097..51795ca6 100644 --- a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_helpers.go @@ -17,16 +17,22 @@ limitations under the License. package v1alpha1 import ( + "context" "errors" "fmt" "path/filepath" "kubedb.dev/apimachinery/apis" + catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" "kubedb.dev/apimachinery/apis/kubedb" dbapi "kubedb.dev/apimachinery/apis/kubedb/v1" "kubedb.dev/apimachinery/crds" + "gomodules.xyz/pointer" + v1 "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/klog/v2" kmapi "kmodules.xyz/client-go/api/v1" "kmodules.xyz/client-go/apiextensions" meta_util "kmodules.xyz/client-go/meta" @@ -232,3 +238,66 @@ func (ed *ElasticsearchDashboard) CertSecretExists(alias ElasticsearchDashboardC } return false } + +func (ed *ElasticsearchDashboard) SetHealthCheckerDefaults() { + if ed.Spec.HealthChecker.PeriodSeconds == nil { + ed.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(20) + } + if ed.Spec.HealthChecker.TimeoutSeconds == nil { + ed.Spec.HealthChecker.TimeoutSeconds = pointer.Int32P(10) + } + if ed.Spec.HealthChecker.FailureThreshold == nil { + ed.Spec.HealthChecker.FailureThreshold = pointer.Int32P(3) + } +} + +func (ed *ElasticsearchDashboard) SetDefaults() { + if ed.Spec.DeletionPolicy == "" { + ed.Spec.DeletionPolicy = dbapi.DeletionPolicyDelete + } + + db := dbapi.Elasticsearch{} + esVersion := catalog.ElasticsearchVersion{} + err := dbapi.DefaultClient.Get(context.TODO(), types.NamespacedName{ + Name: ed.Spec.DatabaseRef.Name, + Namespace: ed.Namespace, + }, &db) + if err != nil { + klog.Errorf("can't get the elasticsearch: %v\n", err.Error()) + return + } + + err = dbapi.DefaultClient.Get(context.TODO(), types.NamespacedName{ + Name: db.Spec.Version, + }, &esVersion) + if err != nil { + klog.Errorf("can't get the elasticsearch version: %v\n", err.Error()) + return + } + + if ed.Spec.Replicas == nil { + ed.Spec.Replicas = pointer.Int32P(1) + } + if ed.Spec.PodTemplate.Spec.SecurityContext == nil { + ed.Spec.PodTemplate.Spec.SecurityContext = &v1.PodSecurityContext{} + } + ed.Spec.PodTemplate.Spec.SecurityContext.FSGroup = esVersion.Spec.SecurityContext.RunAsUser + ed.setDefaultContainerSecurityContext(esVersion, &ed.Spec.PodTemplate) + ed.setDefaultContainerResourceLimits(&ed.Spec.PodTemplate) + + if ed.Spec.EnableSSL { + if ed.Spec.TLS == nil { + ed.Spec.TLS = &kmapi.TLSConfig{} + } + if ed.Spec.TLS.IssuerRef == nil { + ed.Spec.TLS.Certificates = kmapi.SetMissingSpecForCertificate(ed.Spec.TLS.Certificates, kmapi.CertificateSpec{ + Alias: string(ElasticsearchDashboardCACert), + SecretName: ed.DefaultCertificateSecretName(ElasticsearchDashboardCACert), + }) + } + ed.Spec.TLS.Certificates = kmapi.SetMissingSpecForCertificate(ed.Spec.TLS.Certificates, kmapi.CertificateSpec{ + Alias: string(ElasticsearchDashboardServerCert), + SecretName: ed.DefaultCertificateSecretName(ElasticsearchDashboardServerCert), + }) + } +} diff --git a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_types.go b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_types.go index fcabcf41..ee3348bd 100644 --- a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_types.go @@ -22,7 +22,7 @@ import ( core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" - ofst "kmodules.xyz/offshoot-api/api/v1" + ofst "kmodules.xyz/offshoot-api/api/v2" ) const ( @@ -64,9 +64,14 @@ type ElasticsearchDashboardSpec struct { // +optional TLS *kmapi.TLSConfig `json:"tls,omitempty"` + // HealthChecker defines attributes of the health checker + // +optional + // +kubebuilder:default={periodSeconds: 20, timeoutSeconds: 10, failureThreshold: 3} + HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"` + // TerminationPolicy controls the delete operation for Dashboard // +optional - TerminationPolicy dbapi.DeletionPolicy `json:"terminationPolicy,omitempty"` + DeletionPolicy dbapi.DeletionPolicy `json:"deletionPolicy,omitempty"` } // ElasticsearchDashboardStatus defines the observed state of ElasticsearchDashboard diff --git a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_webhook.go b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_webhook.go index 29e74529..6bb565e3 100644 --- a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/elasticsearchdashboard_webhook.go @@ -20,6 +20,8 @@ import ( "fmt" "kubedb.dev/apimachinery/apis" + catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" + "kubedb.dev/apimachinery/apis/kubedb" dbapi "kubedb.dev/apimachinery/apis/kubedb/v1" amv "kubedb.dev/apimachinery/pkg/validator" @@ -29,9 +31,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" - kmapi "kmodules.xyz/client-go/api/v1" + coreutil "kmodules.xyz/client-go/core/v1" "kmodules.xyz/client-go/policy/secomp" - ofst "kmodules.xyz/offshoot-api/api/v1" + ofst "kmodules.xyz/offshoot-api/api/v2" "sigs.k8s.io/controller-runtime/pkg/builder" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -72,17 +74,44 @@ func (ed *ElasticsearchDashboard) SetupWebhookWithManager(mgr manager.Manager) e var _ webhook.Defaulter = &ElasticsearchDashboard{} -func (ed *ElasticsearchDashboard) setDefaultContainerSecurityContext(podTemplate *ofst.PodTemplateSpec) { - if podTemplate == nil { - return +func (ed *ElasticsearchDashboard) setDefaultContainerSecurityContext(esVersion catalog.ElasticsearchVersion, podTemplate *ofst.PodTemplateSpec) { + initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, kubedb.ElasticsearchInitConfigMergerContainerName) + if initContainer == nil { + initContainer = &core.Container{ + Name: kubedb.ElasticsearchInitConfigMergerContainerName, + } + } + if initContainer.SecurityContext == nil { + initContainer.SecurityContext = &core.SecurityContext{} + } + ed.assignDefaultContainerSecurityContext(esVersion, initContainer.SecurityContext) + podTemplate.Spec.InitContainers = coreutil.UpsertContainer(podTemplate.Spec.InitContainers, *initContainer) + container := coreutil.GetContainerByName(podTemplate.Spec.Containers, kubedb.ElasticsearchContainerName) + if container == nil { + container = &core.Container{ + Name: kubedb.ElasticsearchContainerName, + } + } + if container.SecurityContext == nil { + container.SecurityContext = &core.SecurityContext{} } - if podTemplate.Spec.ContainerSecurityContext == nil { - podTemplate.Spec.ContainerSecurityContext = &core.SecurityContext{} + ed.assignDefaultContainerSecurityContext(esVersion, container.SecurityContext) + podTemplate.Spec.Containers = coreutil.UpsertContainer(podTemplate.Spec.Containers, *container) +} + +func (ed *ElasticsearchDashboard) setDefaultContainerResourceLimits(podTemplate *ofst.PodTemplateSpec) { + container := coreutil.GetContainerByName(podTemplate.Spec.Containers, kubedb.ElasticsearchContainerName) + if container != nil && (container.Resources.Requests == nil && container.Resources.Limits == nil) { + apis.SetDefaultResourceLimits(&container.Resources, kubedb.DefaultResources) + } + + initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, kubedb.ElasticsearchInitConfigMergerContainerName) + if initContainer != nil && (initContainer.Resources.Requests == nil && initContainer.Resources.Limits == nil) { + apis.SetDefaultResourceLimits(&initContainer.Resources, kubedb.DefaultInitContainerResource) } - ed.assignDefaultContainerSecurityContext(podTemplate.Spec.ContainerSecurityContext) } -func (ed *ElasticsearchDashboard) assignDefaultContainerSecurityContext(sc *core.SecurityContext) { +func (ed *ElasticsearchDashboard) assignDefaultContainerSecurityContext(esVersion catalog.ElasticsearchVersion, sc *core.SecurityContext) { if sc.AllowPrivilegeEscalation == nil { sc.AllowPrivilegeEscalation = pointer.BoolP(false) } @@ -92,10 +121,10 @@ func (ed *ElasticsearchDashboard) assignDefaultContainerSecurityContext(sc *core } } if sc.RunAsNonRoot == nil { - sc.RunAsNonRoot = pointer.BoolP(true) + sc.RunAsNonRoot = pointer.BoolP(esVersion.Spec.SecurityContext.RunAsAnyNonRoot) } if sc.RunAsUser == nil { - sc.RunAsUser = pointer.Int64P(1000) + sc.RunAsUser = esVersion.Spec.SecurityContext.RunAsUser } if sc.SeccompProfile == nil { sc.SeccompProfile = secomp.DefaultSeccompProfile() @@ -104,36 +133,7 @@ func (ed *ElasticsearchDashboard) assignDefaultContainerSecurityContext(sc *core // Default implements webhook.Defaulter so a webhook will be registered for the type func (ed *ElasticsearchDashboard) Default() { - if ed.Spec.Replicas == nil { - ed.Spec.Replicas = pointer.Int32P(1) - edLog.Info(".Spec.Replicas have been set to default") - } - - apis.SetDefaultResourceLimits(&ed.Spec.PodTemplate.Spec.Resources, DashboardsDefaultResources) - edLog.Info(".PodTemplate.Spec.Resources have been set to default") - - if len(ed.Spec.TerminationPolicy) == 0 { - ed.Spec.TerminationPolicy = dbapi.DeletionPolicyWipeOut - edLog.Info(".Spec.DeletionPolicy have been set to DeletionPolicyWipeOut") - } - - ed.setDefaultContainerSecurityContext(&ed.Spec.PodTemplate) - - if ed.Spec.EnableSSL { - if ed.Spec.TLS == nil { - ed.Spec.TLS = &kmapi.TLSConfig{} - } - if ed.Spec.TLS.IssuerRef == nil { - ed.Spec.TLS.Certificates = kmapi.SetMissingSpecForCertificate(ed.Spec.TLS.Certificates, kmapi.CertificateSpec{ - Alias: string(ElasticsearchDashboardCACert), - SecretName: ed.DefaultCertificateSecretName(ElasticsearchDashboardCACert), - }) - } - ed.Spec.TLS.Certificates = kmapi.SetMissingSpecForCertificate(ed.Spec.TLS.Certificates, kmapi.CertificateSpec{ - Alias: string(ElasticsearchDashboardServerCert), - SecretName: ed.DefaultCertificateSecretName(ElasticsearchDashboardServerCert), - }) - } + ed.SetDefaults() } // +kubebuilder:webhook:path=/validate-elasticsearch-kubedb-com-v1alpha1-elasticsearchelasticsearch,mutating=false,failurePolicy=fail,sideEffects=None,groups=elasticsearch.kubedb.com,resources=elasticsearchelasticsearchs,verbs=create;update;delete,versions=v1alpha1,name=velasticsearchelasticsearch.kb.io,admissionReviewVersions={v1,v1beta1} @@ -162,7 +162,7 @@ func (ed *ElasticsearchDashboard) ValidateDelete() (admission.Warnings, error) { var allErr field.ErrorList - if ed.Spec.TerminationPolicy == dbapi.DeletionPolicyDoNotTerminate { + if ed.Spec.DeletionPolicy == dbapi.DeletionPolicyDoNotTerminate { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("terminationpolicy"), ed.Name, fmt.Sprintf("ElasticsearchDashboard %s/%s can't be deleted. Change .spec.terminationpolicy", ed.Namespace, ed.Name))) } @@ -195,9 +195,16 @@ func (ed *ElasticsearchDashboard) Validate() error { // env variables needs to be validated // so that variables provided in config secret // and credential env may not be overwritten - if err := amv.ValidateEnvVar(ed.Spec.PodTemplate.Spec.Env, forbiddenEnvVars, ResourceKindElasticsearchDashboard); err != nil { - allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podtemplate").Child("spec").Child("env"), ed.Name, - "Invalid spec.podtemplate.spec.env , avoid using the forbidden env variables")) + container := coreutil.GetContainerByName(ed.Spec.PodTemplate.Spec.Containers, kubedb.ElasticsearchContainerName) + if err := amv.ValidateEnvVar(container.Env, forbiddenEnvVars, ResourceKindElasticsearchDashboard); err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podtemplate").Child("spec").Child("containers").Child("env"), ed.Name, + "Invalid spec.podtemplate.spec.containers[i].env , avoid using the forbidden env variables")) + } + + initContainer := coreutil.GetContainerByName(ed.Spec.PodTemplate.Spec.InitContainers, kubedb.ElasticsearchInitConfigMergerContainerName) + if err := amv.ValidateEnvVar(initContainer.Env, forbiddenEnvVars, ResourceKindElasticsearchDashboard); err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podtemplate").Child("spec").Child("initContainers").Child("env"), ed.Name, + "Invalid spec.podtemplate.spec.initContainers[i].env , avoid using the forbidden env variables")) } if len(allErr) == 0 { diff --git a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go index 46d3bf01..4b7ee892 100644 --- a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/openapi_generated.go @@ -25227,7 +25227,7 @@ func schema_apimachinery_apis_elasticsearch_v1alpha1_ElasticsearchDashboardSpec( SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose Dashboard", Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), + Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), }, }, "serviceTemplates": { @@ -25250,7 +25250,14 @@ func schema_apimachinery_apis_elasticsearch_v1alpha1_ElasticsearchDashboardSpec( Ref: ref("kmodules.xyz/client-go/api/v1.TLSConfig"), }, }, - "terminationPolicy": { + "healthChecker": { + SchemaProps: spec.SchemaProps{ + Description: "HealthChecker defines attributes of the health checker", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.HealthCheckSpec"), + }, + }, + "deletionPolicy": { SchemaProps: spec.SchemaProps{ Description: "TerminationPolicy controls the delete operation for Dashboard", Type: []string{"string"}, @@ -25261,7 +25268,7 @@ func schema_apimachinery_apis_elasticsearch_v1alpha1_ElasticsearchDashboardSpec( }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.NamedServiceTemplateSpec"}, + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1.NamedServiceTemplateSpec"}, } } diff --git a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go index ec85afd2..ecb95165 100644 --- a/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubedb.dev/apimachinery/apis/elasticsearch/v1alpha1/zz_generated.deepcopy.go @@ -126,6 +126,7 @@ func (in *ElasticsearchDashboardSpec) DeepCopyInto(out *ElasticsearchDashboardSp *out = new(apiv1.TLSConfig) (*in).DeepCopyInto(*out) } + in.HealthChecker.DeepCopyInto(&out.HealthChecker) return } diff --git a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/connect_cluster_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/connect_cluster_helpers.go index 6fb3a39d..f54789c7 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/connect_cluster_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kafka/v1alpha1/connect_cluster_helpers.go @@ -209,6 +209,13 @@ func (k *ConnectCluster) CertificateName(alias ConnectClusterCertificateAlias) s return meta_util.NameWithSuffix(k.Name, fmt.Sprintf("%s-connect-cert", string(alias))) } +func (k *ConnectCluster) GetAuthSecretName() string { + if k.Spec.AuthSecret != nil && k.Spec.AuthSecret.Name != "" { + return k.Spec.AuthSecret.Name + } + return k.DefaultUserCredSecretName("admin") +} + // GetCertSecretName returns the secret name for a certificate alias if any, // otherwise returns default certificate secret name for the given alias. func (k *ConnectCluster) GetCertSecretName(alias ConnectClusterCertificateAlias) string { diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go index ed4c7cc0..1d3540e9 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go @@ -373,18 +373,19 @@ const ( SinglestoreTLSConfigPreferred = "preferred" // =========================== MSSQLServer Constants ============================ - MSSQLSAUser = "sa" + MSSQLSAUser = "sa" + MSSQLConfigKey = "mssql.conf" AGPrimaryReplicaReadyCondition = "AGPrimaryReplicaReady" - MSSQLDatabasePodPrimary = "primary" - MSSQLDatabasePodSecondary = "secondary" - MSSQLSecondaryServiceAlias = "secondary" - MSSQLSecondaryServicePortName = "secondary" + MSSQLDatabasePodPrimary = "primary" + MSSQLDatabasePodSecondary = "secondary" + MSSQLSecondaryServiceAlias = "secondary" // port related MSSQLDatabasePortName = "db" MSSQLPrimaryServicePortName = "primary" + MSSQLSecondaryServicePortName = "secondary" MSSQLDatabasePort = 1433 MSSQLDatabaseMirroringEndpointPort = 5022 MSSQLCoordinatorPort = 2381 @@ -404,6 +405,8 @@ const ( // volume related MSSQLVolumeNameData = "data" MSSQLVolumeMountPathData = "/var/opt/mssql" + MSSQLVolumeNameConfig = "config" + MSSQLVolumeMountPathConfig = "/var/opt/mssql/mssql.conf" MSSQLVolumeNameInitScript = "init-scripts" MSSQLVolumeMountPathInitScript = "/scripts" MSSQLVolumeNameEndpointCert = "endpoint-cert" @@ -576,6 +579,10 @@ const ( PgBouncerConfigMountPath = "/etc/config" PgBouncerSecretMountPath = "/var/run/pgbouncer/secret" PgBouncerServingCertMountPath = "/var/run/pgbouncer/tls/serving" + PgBouncerConfigSectionDatabases = "databases" + PgBouncerConfigSectionPeers = "peers" + PgBouncerConfigSectionPgbouncer = "pgbouncer" + PgBouncerConfigSectionUsers = "users" // =========================== Pgpool Constants ============================ EnvPostgresUsername = "POSTGRES_USERNAME" @@ -783,8 +790,6 @@ const ( KafkaClientID = "client.id" KafkaDataDirName = "log.dirs" KafkaMetadataDirName = "metadata.log.dir" - KafkaKeystorePasswordKey = "keystore_password" - KafkaTruststorePasswordKey = "truststore_password" KafkaServerKeystoreKey = "server.keystore.jks" KafkaServerTruststoreKey = "server.truststore.jks" KafkaSecurityProtocol = "security.protocol" @@ -798,16 +803,18 @@ const ( KafkaPartitionMetricsWindowNum = "num.partition.metrics.windows" KafkaSampleStoreTopicReplicationFactor = "sample.store.topic.replication.factor" - KafkaEndpointVerifyAlgo = "ssl.endpoint.identification.algorithm" - KafkaKeystoreLocation = "ssl.keystore.location" - KafkaTruststoreLocation = "ssl.truststore.location" - KafkaKeystorePassword = "ssl.keystore.password" - KafkaTruststorePassword = "ssl.truststore.password" - KafkaKeyPassword = "ssl.key.password" - KafkaTruststoreType = "ssl.truststore.type" - KafkaKeystoreType = "ssl.keystore.type" - KafkaTruststoreTypeJKS = "JKS" - KafkaKeystoreDefaultPass = "changeit" + KafkaEndpointVerifyAlgo = "ssl.endpoint.identification.algorithm" + KafkaKeystoreLocation = "ssl.keystore.location" + KafkaTruststoreLocation = "ssl.truststore.location" + KafkaKeystorePassword = "ssl.keystore.password" + KafkaTruststorePassword = "ssl.truststore.password" + KafkaKeyPassword = "ssl.key.password" + KafkaTruststoreType = "ssl.truststore.type" + KafkaKeystoreType = "ssl.keystore.type" + KafkaSSLClientAuthKey = "ssl.client.auth" + KafkaSSLClientAuthRequired = "required" + KafkaSSLClientAuthRequested = "requested" + KafkaTruststoreTypeJKS = "JKS" KafkaMetricReporters = "metric.reporters" KafkaAutoCreateTopicEnable = "auto.create.topics.enable" @@ -818,9 +825,14 @@ const ( KafkaSASLInterBrokerProtocol = "sasl.mechanism.inter.broker.protocol" KafkaSASLPLAINConfigKey = "listener.name.SASL_PLAINTEXT.plain.sasl.jaas.config" KafkaSASLSSLConfigKey = "listener.name.SASL_SSL.plain.sasl.jaas.config" + KafkaAuthorizerClassName = "authorizer.class.name" + KafkaSuperUsers = "super.users" + KafkaStandardAuthorizerClass = "org.apache.kafka.metadata.authorizer.StandardAuthorizer" KafkaSASLJAASConfig = "sasl.jaas.config" KafkaServiceName = "serviceName" KafkaSASLPlainMechanism = "PLAIN" + KafkaSASLScramSHA256Mechanism = "SCRAM-SHA-256" + KafkaSASLScramSHA512Mechanism = "SCRAM-SHA-512" KafkaCCMetricSamplerClass = "metric.sampler.class" KafkaCCCapacityConfig = "capacity.config.file" @@ -847,8 +859,9 @@ const ( KafkaVolumeTempConfig = "temp-config" KafkaVolumeCustomConfig = "custom-config" - EnvKafkaUser = "KAFKA_USER" - EnvKafkaPassword = "KAFKA_PASSWORD" + EnvKafkaUser = "KAFKA_USER" + EnvKafkaPassword = "KAFKA_PASSWORD" + EnvKafkaClusterID = "KAFKA_CLUSTER_ID" KafkaListenerPLAINTEXTProtocol = "PLAINTEXT" KafkaListenerSASLProtocol = "SASL_PLAINTEXT" @@ -1313,36 +1326,73 @@ const ( ClickHouseNativeTCP = 9000 ClickHouseNativeTLS = 9440 ClickhousePromethues = 9363 + ClickHouseRaftPort = 9234 + + ComponentCoOrdinator = "co-ordinator" + + ClickHousePromethusEndpoint = "/metrics" + ClickHouseDataDir = "/var/lib/clickhouse" + ClickHouseKeeperDataDir = "/var/lib/clickhouse_keeper" + ClickHouseConfigDir = "/etc/clickhouse-server/config.d" + ClickHouseKeeperConfigDir = "/etc/clickhouse-keeper" + ClickHouseCommonConfigDir = "/etc/clickhouse-server/conf.d" + ClickHouseTempConfigDir = "/ch-tmp" + ClickHouseInternalKeeperTempConfigDir = "/keeper" + ClickHouseTempDir = "/ch-tmp" + ClickHouseKeeperTempDir = "/ch-tmp" + ClickHouseKeeperConfigPath = "/etc/clickhouse-keeper" + ClickHouseUserConfigDir = "/etc/clickhouse-server/user.d" + ClickHouseLogPath = "/var/log/clickhouse-server/clickhouse-server.log" + ClickHouseErrorLogPath = "/var/log/clickhouse-server/clickhouse-server.err.log" + + // keeper + ClickHouseKeeperDataPath = "/var/lib/clickhouse_keeper" + ClickHouseKeeperLogPath = "/var/lib/clickhouse_keeper/coordination/logs" + ClickHouseKeeperSnapshotPath = "/var/lib/clickhouse_keeper/coordination/snapshots" + + ClickHouseInternalKeeperDataPath = "/var/lib/clickhouse/coordination/log" + ClickHouseInternalKeeperSnapshotPath = "/var/lib/clickhouse/coordination/snapshots" + ClickHOuseKeeeprConfigFileVolumeDir = "/tmp/clickhouse-keeper" + + ClickHouseVolumeData = "data" + ClickHouseDefaultUser = "default" + + ClickHouseConfigVolumeName = "clickhouse-config" + ClickHouseKeeperConfigVolumeName = "clickhouse-keeper-config" + ClickHouseInternalKeeperConfigVolumeName = "clickhouse-internal-keeper-config" - ClickHouseVolumeData = "data" - ClickHouseDataDir = "/var/lib/clickhouse" - ClickHouseConfigVolName = "clickhouse-config" - ClickHouseConfigDir = "/etc/clickhouse-server/config.d" ClickHouseDefaultStorageSize = "2Gi" ClickHouseClusterConfigVolName = "cluster-config" - ClickHouseClusterConfigDir = "/etc/clickhouse-server/conf.d" - ClickHouseTempClusterConfigVolName = "temp-cluster-config" + ClickHouseClusterTempConfigVolName = "temp-cluster-config" ClickHouseContainerName = "clickhouse" ClickHouseInitContainerName = "clickhouse-init" ClickHouseClusterConfigFile = "cluster-config.yaml" - ClickHouseTempConfigDir = "/ch-tmp/config" - ClickHouseTempDir = "/ch-tmp" - ClickHouseUserConfigDir = "/etc/clickhouse-server/user.d" ClickHouseMacrosFileName = "macros.yaml" ClickHouseStandalone = "standalone" ClickHouseCluster = "cluster" - ClickHouseHealthCheckerDatabase = "kubedb_system_db" - ClickHouseHealthCheckerTable = "kubedb_system_table" - - ClickHouseServerConfigFile = "server-config.yaml" - ClickHouseKeeperFileConfig = "keeper-config.yaml" + ClickHouseHealthCheckerDatabase = "kubedb_system" + ClickHouseHealthCheckerTable = "kubedb_write_check" + + ClickHouseServerConfigFile = "server-config.yaml" + ClickHouseKeeperFileConfig = "keeper_config.yaml" + ClickHouseVolumeCustomConfig = "custom-config" + + // keeper + ClickHouseKeeperContainerName = "clickhouse-keeper" + ClickHouseKeeeprConfigFileName = "keeper_config.xml" + ClickHOuseKeeeprConfigFileVolumeName = "keeper-config" + ClickHouseKeeperInitContainerName = "clickhouse-keeper-init" + ClickHouseKeeperConfig = "etc-clickhouse-keeper" + ClickHouseInternalServerListFile = "server_list.yaml" + ClickHouseKeeperServerIdNo = "serverid" + ClickHouseKeeperServerID = "KEEPERID" ) // =========================== Cassandra Constants ============================ @@ -1439,6 +1489,16 @@ var ( core.ResourceMemory: resource.MustParse("1024Mi"), }, } + // ref: https://clickhouse.com/docs/en/guides/sizing-and-hardware-recommendations#what-should-cpu-utilization-be + ClickHouseDefaultResources = core.ResourceRequirements{ + Requests: core.ResourceList{ + core.ResourceCPU: resource.MustParse("1"), + core.ResourceMemory: resource.MustParse("4Gi"), + }, + Limits: core.ResourceList{ + core.ResourceMemory: resource.MustParse("4Gi"), + }, + } // CoordinatorDefaultResources must be used for raft backed coordinators to avoid unintended leader switches CoordinatorDefaultResources = core.ResourceRequirements{ Requests: core.ResourceList{ @@ -1484,6 +1544,17 @@ var ( }, } + // DefaultResourcesMemoryIntensiveMSSQLServer must be used for Microsoft SQL Server + DefaultResourcesMemoryIntensiveMSSQLServer = core.ResourceRequirements{ + Requests: core.ResourceList{ + core.ResourceCPU: resource.MustParse(".500"), + core.ResourceMemory: resource.MustParse("1.5Gi"), + }, + Limits: core.ResourceList{ + core.ResourceMemory: resource.MustParse("4Gi"), + }, + } + // DefaultResourcesCoreAndMemoryIntensive must be used for Solr DefaultResourcesCoreAndMemoryIntensiveSolr = core.ResourceRequirements{ Requests: core.ResourceList{ diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_helpers.go index 682a854a..77249b4d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_helpers.go @@ -27,6 +27,7 @@ import ( "kubedb.dev/apimachinery/apis/kubedb" "kubedb.dev/apimachinery/crds" + "github.com/google/uuid" promapi "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "gomodules.xyz/pointer" core "k8s.io/api/core/v1" @@ -42,6 +43,7 @@ import ( appcat "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1" mona "kmodules.xyz/monitoring-agent-api/api/v1" ofst "kmodules.xyz/offshoot-api/api/v2" + ofst_util "kmodules.xyz/offshoot-api/util" pslister "kubeops.dev/petset/client/listers/apps/v1" ) @@ -225,6 +227,13 @@ func (k *Kafka) ConfigSecretName(role KafkaNodeRoleType) string { return meta_util.NameWithSuffix(k.OffshootName(), "config") } +func (k *Kafka) GetAuthSecretName() string { + if k.Spec.AuthSecret != nil && k.Spec.AuthSecret.Name != "" { + return k.Spec.AuthSecret.Name + } + return k.DefaultUserCredSecretName("admin") +} + func (k *Kafka) GetPersistentSecrets() []string { var secrets []string if k.Spec.AuthSecret != nil { @@ -378,6 +387,7 @@ func (k *Kafka) SetDefaults() { apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResources) } } + k.SetDefaultEnvs() if k.Spec.EnableSSL { k.SetTLSDefaults() @@ -432,6 +442,31 @@ func (k *Kafka) assignDefaultContainerSecurityContext(kfVersion *catalog.KafkaVe } } +func (k *Kafka) SetDefaultEnvs() { + clusterID := k.GenerateClusterID() + if k.Spec.Topology != nil { + if k.Spec.Topology.Controller != nil { + k.setClusterIDEnv(&k.Spec.Topology.Controller.PodTemplate, clusterID) + } + if k.Spec.Topology.Broker != nil { + k.setClusterIDEnv(&k.Spec.Topology.Broker.PodTemplate, clusterID) + } + } else { + k.setClusterIDEnv(&k.Spec.PodTemplate, clusterID) + } +} + +func (k *Kafka) setClusterIDEnv(podTemplate *ofst.PodTemplateSpec, clusterID string) { + container := ofst_util.EnsureContainerExists(podTemplate, kubedb.KafkaContainerName) + env := coreutil.GetEnvByName(container.Env, kubedb.EnvKafkaClusterID) + if env == nil { + container.Env = coreutil.UpsertEnvVars(container.Env, core.EnvVar{ + Name: kubedb.EnvKafkaClusterID, + Value: clusterID, + }) + } +} + func (k *Kafka) SetTLSDefaults() { if k.Spec.TLS == nil || k.Spec.TLS.IssuerRef == nil { return @@ -489,3 +524,26 @@ func (k *Kafka) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, er } return checkReplicas(lister.PetSets(k.Namespace), labels.SelectorFromSet(k.OffshootLabels()), expectedItems) } + +// GenerateClusterID Kafka uses Leach-Salz UUIDs for cluster ID. It requires 16 bytes of base64 encoded RFC 4122 version 1 UUID. +// Here, the generated uuid is 32 bytes hexadecimal string and have 5 hyphen separated parts: 8-4-4-4-12 +// part 3 contains version number, part 4 is a randomly generated clock sequence and +// part 5 is node field that contains MAC address of the host machine +// These 3 parts will be used as cluster ID +// ref: https://kafka.apache.org/31/javadoc/org/apache/kafka/common/Uuid.html +// ref: https://go-recipes.dev/how-to-generate-uuids-with-go-be3988e771a6 +func (k *Kafka) GenerateClusterID() string { + clusterUUID, _ := uuid.NewUUID() + slicedUUID := strings.Split(clusterUUID.String(), "-") + trimmedUUID := slicedUUID[2:] + generatedUUID := strings.Join(trimmedUUID, "-") + return generatedUUID[:len(generatedUUID)-1] + "w" +} + +func (k *Kafka) KafkaSaslListenerProtocolConfigKey(protocol string, mechanism string) string { + return fmt.Sprintf("listener.name.%s.%s.sasl.jaas.config", strings.ToLower(protocol), strings.ToLower(mechanism)) +} + +func (k *Kafka) KafkaEnabledSASLMechanismsKey(protocol string) string { + return fmt.Sprintf("listener.name.%s.sasl.enabled.mechanisms", strings.ToLower(protocol)) +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_webhooks.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_webhooks.go index 6a8937ee..5581ece6 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_webhooks.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_webhooks.go @@ -25,11 +25,13 @@ import ( errors2 "github.com/pkg/errors" "gomodules.xyz/pointer" + core "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" + core_util "kmodules.xyz/client-go/core/v1" ofstv2 "kmodules.xyz/offshoot-api/api/v2" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -142,8 +144,16 @@ func (k *Kafka) ValidateCreateOrUpdate() error { "number of replicas can not be 0 or less")) } + // validate that broker and controller have same cluster id + err := k.validateClusterID(k.Spec.Topology) + if err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("topology"), + k.Name, + err.Error())) + } + // validate that multiple nodes don't have same suffixes - err := k.validateNodeSuffix(k.Spec.Topology) + err = k.validateNodeSuffix(k.Spec.Topology) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("topology"), k.Name, @@ -218,6 +228,25 @@ func (k *Kafka) validateVersion(db *Kafka) error { return nil } +func (k *Kafka) validateClusterID(topology *KafkaClusterTopology) error { + brokerContainer := core_util.GetContainerByName(topology.Broker.PodTemplate.Spec.Containers, kubedb.KafkaContainerName) + controllerContainer := core_util.GetContainerByName(topology.Controller.PodTemplate.Spec.Containers, kubedb.KafkaContainerName) + var brokerClusterID, controllerClusterID *core.EnvVar + if brokerContainer != nil { + brokerClusterID = core_util.GetEnvByName(brokerContainer.Env, kubedb.EnvKafkaClusterID) + } + if controllerContainer != nil { + controllerClusterID = core_util.GetEnvByName(controllerContainer.Env, kubedb.EnvKafkaClusterID) + } + if brokerClusterID == nil && controllerClusterID == nil { + return nil + } + if brokerClusterID != nil && controllerClusterID != nil && brokerClusterID.Value == controllerClusterID.Value { + return nil + } + return errors.New("broker and controller env: KAFKA_CLUSTER_ID must have same cluster id") +} + func (k *Kafka) validateNodeSuffix(topology *KafkaClusterTopology) error { tMap := topology.ToMap() names := make(map[string]bool) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go index 56cf63f7..a46c0907 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/openapi_generated.go @@ -29056,7 +29056,7 @@ func schema_apimachinery_apis_kubedb_v1_PgBouncerSpec(ref common.ReferenceCallba }, }, }, - Required: []string{"version"}, + Required: []string{"version", "database"}, }, }, Dependencies: []string{ diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_helpers.go index b64f8d08..63512dfb 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_helpers.go @@ -17,7 +17,9 @@ limitations under the License. package v1 import ( + "context" "fmt" + "strconv" "kubedb.dev/apimachinery/apis" catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" @@ -29,6 +31,7 @@ import ( core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/types" kmapi "kmodules.xyz/client-go/api/v1" "kmodules.xyz/client-go/apiextensions" core_util "kmodules.xyz/client-go/core/v1" @@ -127,8 +130,19 @@ func (p PgBouncer) GetBackendSecretName() string { return meta_util.NameWithSuffix(p.OffshootName(), "backend") } -func (p PgBouncer) ConfigSecretName() string { - return meta_util.NameWithSuffix(p.ServiceName(), "config") +func (p PgBouncer) IsPgBouncerFinalConfigSecretExist() bool { + secret, err := p.GetPgBouncerFinalConfigSecret() + return (secret != nil && err == nil) +} + +func (p PgBouncer) GetPgBouncerFinalConfigSecret() (*core.Secret, error) { + var secret core.Secret + err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: p.PgBouncerFinalConfigSecretName(), Namespace: p.GetNamespace()}, &secret) + return &secret, err +} + +func (p PgBouncer) PgBouncerFinalConfigSecretName() string { + return meta_util.NameWithSuffix(p.ServiceName(), "final-config") } type pgbouncerApp struct { @@ -200,8 +214,6 @@ func (p *PgBouncer) SetDefaults(pgBouncerVersion *catalog.PgBouncerVersion, uses p.Spec.DeletionPolicy = DeletionPolicyDelete } - p.setConnectionPoolConfigDefaults() - if p.Spec.TLS != nil { if p.Spec.SSLMode == "" { p.Spec.SSLMode = PgBouncerSSLModeVerifyFull @@ -273,7 +285,7 @@ func (p *PgBouncer) GetPersistentSecrets() []string { var secrets []string secrets = append(secrets, p.GetAuthSecretName()) secrets = append(secrets, p.GetBackendSecretName()) - secrets = append(secrets, p.ConfigSecretName()) + secrets = append(secrets, p.PgBouncerFinalConfigSecretName()) return secrets } @@ -308,48 +320,6 @@ func (p *PgBouncer) SetHealthCheckerDefaults() { } } -func (p *PgBouncer) setConnectionPoolConfigDefaults() { - if p.Spec.ConnectionPool == nil { - p.Spec.ConnectionPool = &ConnectionPoolConfig{} - } - if p.Spec.ConnectionPool.Port == nil { - p.Spec.ConnectionPool.Port = pointer.Int32P(5432) - } - if p.Spec.ConnectionPool.PoolMode == "" { - p.Spec.ConnectionPool.PoolMode = kubedb.PgBouncerDefaultPoolMode - } - if p.Spec.ConnectionPool.MaxClientConnections == nil { - p.Spec.ConnectionPool.MaxClientConnections = pointer.Int64P(100) - } - if p.Spec.ConnectionPool.DefaultPoolSize == nil { - p.Spec.ConnectionPool.DefaultPoolSize = pointer.Int64P(20) - } - if p.Spec.ConnectionPool.MinPoolSize == nil { - p.Spec.ConnectionPool.MinPoolSize = pointer.Int64P(0) - } - if p.Spec.ConnectionPool.ReservePoolSize == nil { - p.Spec.ConnectionPool.ReservePoolSize = pointer.Int64P(0) - } - if p.Spec.ConnectionPool.ReservePoolTimeoutSeconds == nil { - p.Spec.ConnectionPool.ReservePoolTimeoutSeconds = pointer.Int64P(5) - } - if p.Spec.ConnectionPool.MaxDBConnections == nil { - p.Spec.ConnectionPool.MaxDBConnections = pointer.Int64P(0) - } - if p.Spec.ConnectionPool.MaxUserConnections == nil { - p.Spec.ConnectionPool.MaxUserConnections = pointer.Int64P(0) - } - if p.Spec.ConnectionPool.StatsPeriodSeconds == nil { - p.Spec.ConnectionPool.StatsPeriodSeconds = pointer.Int64P(60) - } - if p.Spec.ConnectionPool.AuthType == "" { - p.Spec.ConnectionPool.AuthType = PgBouncerClientAuthModeMD5 - } - if p.Spec.ConnectionPool.IgnoreStartupParameters == "" { - p.Spec.ConnectionPool.IgnoreStartupParameters = kubedb.PgBouncerDefaultIgnoreStartupParameters - } -} - func (p *PgBouncer) SetSecurityContext(pgBouncerVersion *catalog.PgBouncerVersion) { container := core_util.GetContainerByName(p.Spec.PodTemplate.Spec.Containers, kubedb.PgBouncerContainerName) if container == nil { @@ -405,3 +375,32 @@ func (p *PgBouncer) SetSecurityContext(pgBouncerVersion *catalog.PgBouncerVersio core_util.UpsertContainer(p.Spec.PodTemplate.Spec.Containers, *container) } } + +func PgBouncerConfigSections() *[]string { + sections := []string{ + kubedb.PgBouncerConfigSectionDatabases, kubedb.PgBouncerConfigSectionPeers, + kubedb.PgBouncerConfigSectionPgbouncer, kubedb.PgBouncerConfigSectionUsers, + } + return §ions +} + +func PgBouncerDefaultConfig() string { + defaultConfig := "[pgbouncer]\n" + + "\n" + + "listen_port = " + strconv.Itoa(kubedb.PgBouncerDatabasePort) + "\n" + + "pool_mode = " + kubedb.PgBouncerDefaultPoolMode + "\n" + + "max_client_conn = 100\n" + + "default_pool_size = 20\n" + + "min_pool_size = 1\n" + + "reserve_pool_size = 1\n" + + "reserve_pool_timeout = 5\n" + + "max_db_connections = 1\n" + + "max_user_connections = 2\n" + + "stats_period = 60\n" + + "auth_type = " + string(PgBouncerClientAuthModeMD5) + "\n" + + "ignore_startup_parameters = " + "extra_float_digits, " + kubedb.PgBouncerDefaultIgnoreStartupParameters + "\n" + + "logfile = /tmp/pgbouncer.log\n" + + "pidfile = /tmp/pgbouncer.pid\n" + + "listen_addr = *" + return defaultConfig +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go index 30dbe2bf..60d29ed8 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/pgbouncer_types.go @@ -73,7 +73,7 @@ type PgBouncerSpec struct { PodTemplate ofstv2.PodTemplateSpec `json:"podTemplate,omitempty"` // Database to proxy by connection pooling. - Database Database `json:"database,omitempty"` + Database Database `json:"database"` // ConnectionPoolConfig defines Connection pool configuration. // +optional @@ -136,54 +136,42 @@ type Database struct { type ConnectionPoolConfig struct { // Port is the port number on which PgBouncer listens to clients. Default: 5432. - // +kubebuilder:default=5432 // +optional Port *int32 `json:"port,omitempty"` // PoolMode is the pooling mechanism type. Default: session. - // +kubebuilder:default="session" // +optional PoolMode string `json:"poolMode,omitempty"` // MaxClientConnections is the maximum number of allowed client connections. Default: 100. - // +kubebuilder:default=100 // +optional MaxClientConnections *int64 `json:"maxClientConnections,omitempty"` // DefaultPoolSize specifies how many server connections to allow per user/database pair. Default: 20. - // +kubebuilder:default=20 // +optional DefaultPoolSize *int64 `json:"defaultPoolSize,omitempty"` // MinPoolSize is used to add more server connections to pool if below this number. Default: 0 (disabled). - // +kubebuilder:default=0 // +optional MinPoolSize *int64 `json:"minPoolSize,omitempty"` // ReservePoolSize specifies how many additional connections to allow to a pool. 0 disables. Default: 0 (disabled). - // +kubebuilder:default=0 // +optional ReservePoolSize *int64 `json:"reservePoolSize,omitempty"` // ReservePoolTimeoutSeconds is the number of seconds in which if a client has not been serviced, // pgbouncer enables use of additional connections from reserve pool. 0 disables. Default: 5.0. - // +kubebuilder:default=5 // +optional ReservePoolTimeoutSeconds *int64 `json:"reservePoolTimeoutSeconds,omitempty"` // MaxDBConnections is the maximum number of connections allowed per-database. Default: 0 (unlimited). - // +kubebuilder:default=0 // +optional MaxDBConnections *int64 `json:"maxDBConnections,omitempty"` // MaxUserConnections is the maximum number of users allowed per-database. Default: 0 (unlimited). - // +kubebuilder:default=0 // +optional MaxUserConnections *int64 `json:"maxUserConnections,omitempty"` // StatsPeriodSeconds sets how often the averages shown in various SHOW commands are updated // and how often aggregated statistics are written to the log. Default: 60 - // +kubebuilder:default=60 // +optional StatsPeriodSeconds *int64 `json:"statsPeriodSeconds,omitempty"` // AuthType specifies how to authenticate users. Default: md5 (md5+plain text). - // +kubebuilder:default=md5 // +optional AuthType PgBouncerClientAuthMode `json:"authType,omitempty"` // IgnoreStartupParameters specifies comma-separated startup parameters that // pgbouncer knows are handled by admin and it can ignore them. Default: empty - // +kubebuilder:default="empty" // +optional IgnoreStartupParameters string `json:"ignoreStartupParameters,omitempty"` // AdminUsers specifies an array of users who can act as PgBouncer administrators. diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go index 5359eb16..2c0520e1 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1/postgres_helpers.go @@ -291,10 +291,10 @@ func (p *Postgres) SetDefaultReplicationMode(postgresVersion *catalog.PostgresVe } } if p.Spec.Replication.WALLimitPolicy == WALKeepSegment && p.Spec.Replication.WalKeepSegment == nil { - p.Spec.Replication.WalKeepSegment = pointer.Int32P(64) + p.Spec.Replication.WalKeepSegment = pointer.Int32P(160) } if p.Spec.Replication.WALLimitPolicy == WALKeepSize && p.Spec.Replication.WalKeepSizeInMegaBytes == nil { - p.Spec.Replication.WalKeepSizeInMegaBytes = pointer.Int32P(1024) + p.Spec.Replication.WalKeepSizeInMegaBytes = pointer.Int32P(2560) } if p.Spec.Replication.WALLimitPolicy == ReplicationSlot && p.Spec.Replication.MaxSlotWALKeepSizeInMegaBytes == nil { p.Spec.Replication.MaxSlotWALKeepSizeInMegaBytes = pointer.Int32P(-1) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go index e82cf96f..aa0a6951 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_helpers.go @@ -27,6 +27,7 @@ import ( "kubedb.dev/apimachinery/apis/kubedb" "kubedb.dev/apimachinery/crds" + promapi "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "gomodules.xyz/pointer" core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -38,6 +39,7 @@ import ( meta_util "kmodules.xyz/client-go/meta" "kmodules.xyz/client-go/policy/secomp" appcat "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1" + mona "kmodules.xyz/monitoring-agent-api/api/v1" ofst "kmodules.xyz/offshoot-api/api/v2" pslister "kubeops.dev/petset/client/listers/apps/v1" ) @@ -46,7 +48,7 @@ type ClickhouseApp struct { *ClickHouse } -func (r *ClickHouse) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { +func (c *ClickHouse) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralClickHouse)) } @@ -54,11 +56,11 @@ func (c *ClickHouse) AppBindingMeta() appcat.AppBindingMeta { return &ClickhouseApp{c} } -func (r ClickhouseApp) Name() string { - return r.ClickHouse.Name +func (c ClickhouseApp) Name() string { + return c.ClickHouse.Name } -func (r ClickhouseApp) Type() appcat.AppType { +func (c ClickhouseApp) Type() appcat.AppType { return appcat.AppType(fmt.Sprintf("%s/%s", kubedb.GroupName, ResourceSingularClickHouse)) } @@ -75,6 +77,14 @@ func (c *ClickHouse) OffshootName() string { return c.Name } +func (c *ClickHouse) OffshootInternalKeeperSecretName() string { + return meta_util.NameWithSuffix(c.Name, "internal-keeper") +} + +func (c *ClickHouse) OffshootKeeperName() string { + return meta_util.NameWithSuffix(c.Name, "keeper") +} + func (c *ClickHouse) OffshootClusterName(value string) string { return meta_util.NameWithSuffix(c.OffshootName(), value) } @@ -89,6 +99,15 @@ func (c *ClickHouse) OffshootLabels() map[string]string { return c.offshootLabels(c.OffshootSelectors(), nil) } +func (c *ClickHouse) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string { + svcTemplate := GetServiceTemplate(c.Spec.ServiceTemplates, alias) + return c.offshootLabels(meta_util.OverwriteKeys(c.OffshootSelectors(), extraLabels...), svcTemplate.Labels) +} + +func (c *ClickHouse) OffshootKeeperLabels() map[string]string { + return c.offshootKeeperLabels(c.OffshootKeeperSelectors(), nil) +} + func (c *ClickHouse) OffshootClusterLabels(petSetName string) map[string]string { return c.offshootLabels(c.OffshootClusterSelectors(petSetName), nil) } @@ -98,6 +117,12 @@ func (c *ClickHouse) offshootLabels(selector, override map[string]string) map[st return meta_util.FilterKeys(kubedb.GroupName, selector, meta_util.OverwriteKeys(nil, c.Labels, override)) } +func (c *ClickHouse) offshootKeeperLabels(selector, override map[string]string) map[string]string { + selector[meta_util.ComponentLabelKey] = kubedb.ComponentCoOrdinator + return meta_util.OverwriteKeys(selector, override) + // return meta_util.FilterKeys(kubedb.GroupName, selector, meta_util.OverwriteKeys(nil, c.Labels, override)) +} + func (c *ClickHouse) OffshootSelectors(extraSelectors ...map[string]string) map[string]string { selector := map[string]string{ meta_util.NameLabelKey: c.ResourceFQN(), @@ -107,6 +132,15 @@ func (c *ClickHouse) OffshootSelectors(extraSelectors ...map[string]string) map[ return meta_util.OverwriteKeys(selector, extraSelectors...) } +func (c *ClickHouse) OffshootKeeperSelectors(extraSelectors ...map[string]string) map[string]string { + selector := map[string]string{ + meta_util.NameLabelKey: c.ResourceFQN(), + meta_util.InstanceLabelKey: c.Name, + meta_util.ManagedByLabelKey: kubedb.GroupName, + } + return meta_util.OverwriteKeys(selector, extraSelectors...) +} + func (c *ClickHouse) OffshootClusterSelectors(petSetName string, extraSelectors ...map[string]string) map[string]string { selector := map[string]string{ meta_util.NameLabelKey: c.ResourceFQN(), @@ -129,14 +163,26 @@ func (c *ClickHouse) ServiceName() string { return c.OffshootName() } +func (c *ClickHouse) KeeperServiceName() string { + return meta_util.NameWithSuffix(c.OffshootName(), "keeper") +} + func (c *ClickHouse) PrimaryServiceDNS() string { return fmt.Sprintf("%s.%s.svc", c.ServiceName(), c.Namespace) } +func (c *ClickHouse) KeeperPrimaryServiceDNS() string { + return fmt.Sprintf("%s.%s.svc", c.KeeperServiceName(), c.Namespace) +} + func (c *ClickHouse) GoverningServiceName() string { return meta_util.NameWithSuffix(c.ServiceName(), "pods") } +func (c *ClickHouse) KeeperGoverningServiceName() string { + return meta_util.NameWithSuffix(c.KeeperServiceName(), "pods") +} + func (c *ClickHouse) ClusterGoverningServiceName(name string) string { return meta_util.NameWithSuffix(name, "pods") } @@ -156,12 +202,20 @@ func (r *ClickHouse) ConfigSecretName() string { return meta_util.NameWithSuffix(r.OffshootName(), "config") } +func (r *ClickHouse) KeeperConfigSecretName() string { + return meta_util.NameWithSuffix(r.OffshootKeeperName(), "config") +} + func (c *ClickHouse) DefaultUserCredSecretName(username string) string { return meta_util.NameWithSuffix(c.Name, strings.ReplaceAll(fmt.Sprintf("%s-cred", username), "_", "-")) } +func (c *ClickHouse) GetInternalAuthTokenName() string { + return meta_util.NameWithSuffix(c.OffshootName(), "internal-auth-token") +} + func (c *ClickHouse) PVCName(alias string) string { - return meta_util.NameWithSuffix(c.Name, alias) + return alias } func (c *ClickHouse) PetSetName() string { @@ -172,6 +226,10 @@ func (c *ClickHouse) PodLabels(extraLabels ...map[string]string) map[string]stri return c.offshootLabels(meta_util.OverwriteKeys(c.OffshootSelectors(), extraLabels...), c.Spec.PodTemplate.Labels) } +func (c *ClickHouse) KeeperPodLabels(extraLabels ...map[string]string) map[string]string { + return c.offshootLabels(meta_util.OverwriteKeys(c.OffshootKeeperSelectors(), extraLabels...), c.Spec.ClusterTopology.ClickHouseKeeper.Spec.PodTemplate.Labels) +} + func (c *ClickHouse) ClusterPodLabels(petSetName string, labels map[string]string, extraLabels ...map[string]string) map[string]string { return c.offshootLabels(meta_util.OverwriteKeys(c.OffshootClusterSelectors(petSetName), extraLabels...), labels) } @@ -201,6 +259,46 @@ func (c *ClickHouse) ResourceSingular() string { return ResourceSingularClickHouse } +type ClickHouseStatsService struct { + *ClickHouse +} + +func (cs ClickHouseStatsService) TLSConfig() *promapi.TLSConfig { + return nil +} + +func (cs ClickHouseStatsService) GetNamespace() string { + return cs.ClickHouse.GetNamespace() +} + +func (cs ClickHouseStatsService) ServiceName() string { + return cs.OffshootName() + "-stats" +} + +func (cs ClickHouseStatsService) ServiceMonitorName() string { + return cs.ServiceName() +} + +func (cs ClickHouseStatsService) ServiceMonitorAdditionalLabels() map[string]string { + return cs.OffshootLabels() +} + +func (cs ClickHouseStatsService) Path() string { + return kubedb.DefaultStatsPath +} + +func (cs ClickHouseStatsService) Scheme() string { + return "" +} + +func (c *ClickHouse) StatsService() mona.StatsAccessor { + return &ClickHouseStatsService{c} +} + +func (c *ClickHouse) StatsServiceLabels() map[string]string { + return c.ServiceLabels(StatsServiceAlias, map[string]string{kubedb.LabelRole: kubedb.RoleStats}) +} + func (c *ClickHouse) SetDefaults() { var chVersion catalog.ClickHouseVersion err := DefaultClient.Get(context.TODO(), types.NamespacedName{ @@ -242,12 +340,31 @@ func (c *ClickHouse) SetDefaults() { dbContainer := coreutil.GetContainerByName(cluster.PodTemplate.Spec.Containers, kubedb.ClickHouseContainerName) if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { - apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResources) + apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.ClickHouseDefaultResources) } c.setDefaultContainerSecurityContext(&chVersion, cluster.PodTemplate) clusters[index] = cluster } c.Spec.ClusterTopology.Cluster = clusters + + if c.Spec.ClusterTopology.ClickHouseKeeper != nil && !c.Spec.ClusterTopology.ClickHouseKeeper.ExternallyManaged && c.Spec.ClusterTopology.ClickHouseKeeper.Spec != nil { + if c.Spec.ClusterTopology.ClickHouseKeeper.Spec.Replicas == nil { + c.Spec.ClusterTopology.ClickHouseKeeper.Spec.Replicas = pointer.Int32P(1) + } + + if c.Spec.ClusterTopology.ClickHouseKeeper.Spec.StorageType == "" { + c.Spec.ClusterTopology.ClickHouseKeeper.Spec.StorageType = StorageTypeDurable + } + + if c.Spec.ClusterTopology.ClickHouseKeeper.Spec.PodTemplate == nil { + c.Spec.ClusterTopology.ClickHouseKeeper.Spec.PodTemplate = &ofst.PodTemplateSpec{} + } + c.setKeeperDefaultContainerSecurityContext(&chVersion, c.Spec.ClusterTopology.ClickHouseKeeper.Spec.PodTemplate) + dbContainer := coreutil.GetContainerByName(c.Spec.ClusterTopology.ClickHouseKeeper.Spec.PodTemplate.Spec.Containers, kubedb.ClickHouseKeeperContainerName) + if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { + apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResources) + } + } } else { if c.Spec.Replicas == nil { c.Spec.Replicas = pointer.Int32P(1) @@ -265,10 +382,10 @@ func (c *ClickHouse) SetDefaults() { c.setDefaultContainerSecurityContext(&chVersion, c.Spec.PodTemplate) dbContainer := coreutil.GetContainerByName(c.Spec.PodTemplate.Spec.Containers, kubedb.ClickHouseContainerName) if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { - apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResources) + apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.ClickHouseDefaultResources) } - c.SetHealthCheckerDefaults() } + c.SetHealthCheckerDefaults() } func (c *ClickHouse) setDefaultContainerSecurityContext(chVersion *catalog.ClickHouseVersion, podTemplate *ofst.PodTemplateSpec) { @@ -307,6 +424,42 @@ func (c *ClickHouse) setDefaultContainerSecurityContext(chVersion *catalog.Click c.assignDefaultContainerSecurityContext(chVersion, initContainer.SecurityContext) } +func (c *ClickHouse) setKeeperDefaultContainerSecurityContext(chVersion *catalog.ClickHouseVersion, podTemplate *ofst.PodTemplateSpec) { + if podTemplate == nil { + return + } + if podTemplate.Spec.SecurityContext == nil { + podTemplate.Spec.SecurityContext = &core.PodSecurityContext{} + } + if podTemplate.Spec.SecurityContext.FSGroup == nil { + podTemplate.Spec.SecurityContext.FSGroup = chVersion.Spec.SecurityContext.RunAsUser + } + + container := coreutil.GetContainerByName(podTemplate.Spec.Containers, kubedb.ClickHouseKeeperContainerName) + if container == nil { + container = &core.Container{ + Name: kubedb.ClickHouseKeeperContainerName, + } + podTemplate.Spec.Containers = coreutil.UpsertContainer(podTemplate.Spec.Containers, *container) + } + if container.SecurityContext == nil { + container.SecurityContext = &core.SecurityContext{} + } + c.assignDefaultContainerSecurityContext(chVersion, container.SecurityContext) + + initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, kubedb.ClickHouseInitContainerName) + if initContainer == nil { + initContainer = &core.Container{ + Name: kubedb.ClickHouseInitContainerName, + } + podTemplate.Spec.InitContainers = coreutil.UpsertContainer(podTemplate.Spec.InitContainers, *initContainer) + } + if initContainer.SecurityContext == nil { + initContainer.SecurityContext = &core.SecurityContext{} + } + c.assignDefaultContainerSecurityContext(chVersion, initContainer.SecurityContext) +} + func (c *ClickHouse) assignDefaultContainerSecurityContext(chVersion *catalog.ClickHouseVersion, rc *core.SecurityContext) { if rc.AllowPrivilegeEscalation == nil { rc.AllowPrivilegeEscalation = pointer.BoolP(false) @@ -327,6 +480,10 @@ func (c *ClickHouse) assignDefaultContainerSecurityContext(chVersion *catalog.Cl } } +func (c *ClickHouse) OffshootClickHouseKeeperHostPort() (string, int32) { + return c.KeeperPrimaryServiceDNS(), kubedb.ClickHouseKeeperPort +} + func (c *ClickHouse) ReplicasAreReady(lister pslister.PetSetLister) (bool, string, error) { // Desire number of petSets expectedItems := 0 @@ -334,6 +491,11 @@ func (c *ClickHouse) ReplicasAreReady(lister pslister.PetSetLister) (bool, strin for _, cluster := range c.Spec.ClusterTopology.Cluster { expectedItems += int(*cluster.Shards) } + if !c.Spec.ClusterTopology.ClickHouseKeeper.ExternallyManaged { + if c.Spec.ClusterTopology.ClickHouseKeeper.Spec.Replicas != nil { + expectedItems += 1 + } + } } else { expectedItems += 1 } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_types.go index ca60ca04..cd91574b 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_types.go @@ -20,6 +20,7 @@ import ( core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" + mona "kmodules.xyz/monitoring-agent-api/api/v1" ofst "kmodules.xyz/offshoot-api/api/v2" ) @@ -77,6 +78,11 @@ type ClickHouseSpec struct { // +optional AuthSecret *SecretReference `json:"authSecret,omitempty"` + // ConfigSecret is an optional field to provide custom configuration file for database (i.e config.properties). + // If specified, this file will be used as configuration file otherwise default configuration file will be used. + // +optional + ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"` + // PodTemplate is an optional configuration for pods used to expose database // +optional PodTemplate *ofst.PodTemplateSpec `json:"podTemplate,omitempty"` @@ -85,6 +91,14 @@ type ClickHouseSpec struct { // +optional ServiceTemplates []NamedServiceTemplateSpec `json:"serviceTemplates,omitempty"` + // Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted. + // +optional + Halted bool `json:"halted,omitempty"` + + // Monitor is used monitor database instance + // +optional + Monitor *mona.AgentSpec `json:"monitor,omitempty"` + // DeletionPolicy controls the delete operation for database // +optional DeletionPolicy TerminationPolicy `json:"deletionPolicy,omitempty"` @@ -100,7 +114,7 @@ type ClusterTopology struct { Cluster []ClusterSpec `json:"cluster,omitempty"` // ClickHouse Keeper server name - ClickHouseKeeper *ClickHouseKeeperConfig `json:"clickHouseKeeper,omitempty"` + ClickHouseKeeper *ClickHouseKeeper `json:"clickHouseKeeper,omitempty"` } type ClusterSpec struct { @@ -125,8 +139,28 @@ type ClusterSpec struct { StorageType StorageType `json:"storageType,omitempty"` } -type ClickHouseKeeperConfig struct { - Node ClickHouseKeeperNode `json:"node,omitempty"` +type ClickHouseKeeper struct { + ExternallyManaged bool `json:"externallyManaged,omitempty"` + + Node *ClickHouseKeeperNode `json:"node,omitempty"` + + Spec *ClickHouseKeeperSpec `json:"spec,omitempty"` +} + +type ClickHouseKeeperSpec struct { + // Number of replica for each shard to deploy for a cluster. + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // PodTemplate is an optional configuration for pods used to expose database + // +optional + PodTemplate *ofst.PodTemplateSpec `json:"podTemplate,omitempty"` + + // Storage to specify how storage shall be used. + Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` + + // StorageType can be durable (default) or ephemeral + StorageType StorageType `json:"storageType,omitempty"` } // ClickHouseKeeperNode defines item of nodes section of .spec.clusterTopology. @@ -134,7 +168,7 @@ type ClickHouseKeeperNode struct { Host string `json:"host,omitempty"` // +optional - Port int32 `json:"port,omitempty"` + Port *int32 `json:"port,omitempty"` } // ClickHouseStatus defines the observed state of ClickHouse diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_webhook.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_webhook.go index a0d56016..7dece77d 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/clickhouse_webhook.go @@ -42,154 +42,206 @@ var clickhouselog = logf.Log.WithName("clickhouse-resource") var _ webhook.Defaulter = &ClickHouse{} // Default implements webhook.Defaulter so a webhook will be registered for the type -func (r *ClickHouse) Default() { - if r == nil { +func (c *ClickHouse) Default() { + if c == nil { return } - clickhouselog.Info("default", "name", r.Name) - r.SetDefaults() + clickhouselog.Info("default", "name", c.Name) + c.SetDefaults() } var _ webhook.Validator = &ClickHouse{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type -func (r *ClickHouse) ValidateCreate() (admission.Warnings, error) { - clickhouselog.Info("validate create", "name", r.Name) - return nil, r.ValidateCreateOrUpdate() +func (c *ClickHouse) ValidateCreate() (admission.Warnings, error) { + clickhouselog.Info("validate create", "name", c.Name) + return nil, c.ValidateCreateOrUpdate() } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type -func (r *ClickHouse) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { - clickhouselog.Info("validate update", "name", r.Name) - return nil, r.ValidateCreateOrUpdate() +func (c *ClickHouse) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + clickhouselog.Info("validate update", "name", c.Name) + return nil, c.ValidateCreateOrUpdate() } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type -func (r *ClickHouse) ValidateDelete() (admission.Warnings, error) { - clickhouselog.Info("validate delete", "name", r.Name) +func (c *ClickHouse) ValidateDelete() (admission.Warnings, error) { + clickhouselog.Info("validate delete", "name", c.Name) var allErr field.ErrorList - if r.Spec.DeletionPolicy == TerminationPolicyDoNotTerminate { + if c.Spec.DeletionPolicy == TerminationPolicyDoNotTerminate { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("teminationPolicy"), - r.Name, + c.Name, "Can not delete as terminationPolicy is set to \"DoNotTerminate\"")) - return nil, apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, r.Name, allErr) + return nil, apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, c.Name, allErr) } return nil, nil } -func (r *ClickHouse) ValidateCreateOrUpdate() error { +func (c *ClickHouse) ValidateCreateOrUpdate() error { var allErr field.ErrorList - if r.Spec.Version == "" { + if c.Spec.Version == "" { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("version"), - r.Name, + c.Name, "spec.version' is missing")) - return apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, r.Name, allErr) + return apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, c.Name, allErr) } else { - err := r.ValidateVersion(r) + err := c.ValidateVersion(c) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("version"), - r.Spec.Version, + c.Spec.Version, err.Error())) - return apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, r.Name, allErr) + return apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, c.Name, allErr) + } + } + + if c.Spec.DisableSecurity { + if c.Spec.AuthSecret != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("authSecret"), + c.Name, + "authSecret should be nil when security is disabled")) + return apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, c.Name, allErr) } } - if r.Spec.ClusterTopology != nil { + if c.Spec.ClusterTopology != nil { clusterName := map[string]bool{} - clusters := r.Spec.ClusterTopology.Cluster + clusters := c.Spec.ClusterTopology.Cluster + if c.Spec.ClusterTopology.ClickHouseKeeper != nil { + if !c.Spec.ClusterTopology.ClickHouseKeeper.ExternallyManaged { + if c.Spec.ClusterTopology.ClickHouseKeeper.Spec == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec"), + c.Name, + "spec can't be nil when externally managed is false")) + } else { + if *c.Spec.ClusterTopology.ClickHouseKeeper.Spec.Replicas < 1 { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec").Child("replica"), + c.Name, + "number of replica can not be 0 or less")) + } + allErr = c.validateClickHouseKeeperStorageType(c.Spec.ClusterTopology.ClickHouseKeeper.Spec.StorageType, c.Spec.ClusterTopology.ClickHouseKeeper.Spec.Storage, allErr) + } + if c.Spec.ClusterTopology.ClickHouseKeeper.Node != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node"), + c.Name, + "ClickHouse Keeper node should be empty when externally managed is false")) + } + } else { + if c.Spec.ClusterTopology.ClickHouseKeeper.Node == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node"), + c.Name, + "ClickHouse Keeper node can't be empty when externally managed is true")) + } else { + if c.Spec.ClusterTopology.ClickHouseKeeper.Node.Host == "" { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node").Child("host"), + c.Name, + "ClickHouse Keeper host can't be empty")) + } + if c.Spec.ClusterTopology.ClickHouseKeeper.Node.Port == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node").Child("port"), + c.Name, + "ClickHouse Keeper port can't be empty")) + } + } + if c.Spec.ClusterTopology.ClickHouseKeeper.Spec != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec"), + c.Name, + "ClickHouse Keeper spec should be empty when externally managed is true")) + } + } + } for _, cluster := range clusters { if cluster.Shards != nil && *cluster.Shards <= 0 { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("shards"), - r.Name, + c.Name, "number of shards can not be 0 or less")) } if cluster.Replicas != nil && *cluster.Replicas <= 0 { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("replicas"), - r.Name, + c.Name, "number of replicas can't be 0 or less")) } if clusterName[cluster.Name] { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child(cluster.Name), - r.Name, - "cluster name is duplicated, use different cluster name")) + c.Name, + "cluster name is already exists, use different cluster name")) } clusterName[cluster.Name] = true - allErr = r.validateClusterStorageType(cluster, allErr) + allErr = c.validateClusterStorageType(cluster, allErr) - err := r.validateVolumes(cluster.PodTemplate) + err := c.validateVolumes(cluster.PodTemplate) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("podTemplate").Child("spec").Child("volumes"), - r.Name, + c.Name, err.Error())) } - err = r.validateVolumesMountPaths(cluster.PodTemplate) + err = c.validateVolumesMountPaths(cluster.PodTemplate) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("podTemplate").Child("spec").Child("volumeMounts"), - r.Name, + c.Name, err.Error())) } } - if r.Spec.PodTemplate != nil { + if c.Spec.PodTemplate != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate"), - r.Name, + c.Name, "PodTemplate should be nil in clusterTopology")) } - if r.Spec.Replicas != nil { + if c.Spec.Replicas != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replica"), - r.Name, + c.Name, "replica should be nil in clusterTopology")) } - if r.Spec.StorageType != "" { + if c.Spec.StorageType != "" { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("storageType"), - r.Name, + c.Name, "StorageType should be empty in clusterTopology")) } - if r.Spec.Storage != nil { + if c.Spec.Storage != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("storage"), - r.Name, + c.Name, "storage should be nil in clusterTopology")) } } else { // number of replicas can not be 0 or less - if r.Spec.Replicas != nil && *r.Spec.Replicas <= 0 { + if c.Spec.Replicas != nil && *c.Spec.Replicas <= 0 { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"), - r.Name, + c.Name, "number of replicas can't be 0 or less")) } // number of replicas can not be greater than 1 - if r.Spec.Replicas != nil && *r.Spec.Replicas > 1 { + if c.Spec.Replicas != nil && *c.Spec.Replicas > 1 { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"), - r.Name, + c.Name, "number of replicas can't be greater than 1 in standalone mode")) } - err := r.validateVolumes(r.Spec.PodTemplate) + err := c.validateVolumes(c.Spec.PodTemplate) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumes"), - r.Name, + c.Name, err.Error())) } - err = r.validateVolumesMountPaths(r.Spec.PodTemplate) + err = c.validateVolumesMountPaths(c.Spec.PodTemplate) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumeMounts"), - r.Name, + c.Name, err.Error())) } - allErr = r.validateStandaloneStorageType(r.Spec.StorageType, r.Spec.Storage, allErr) + allErr = c.validateStandaloneStorageType(c.Spec.StorageType, c.Spec.Storage, allErr) } if len(allErr) == 0 { return nil } - return apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, r.Name, allErr) + return apierrors.NewInvalid(schema.GroupKind{Group: "ClickHouse.kubedb.com", Kind: "ClickHouse"}, c.Name, allErr) } func (c *ClickHouse) validateStandaloneStorageType(storageType StorageType, storage *core.PersistentVolumeClaimSpec, allErr field.ErrorList) field.ErrorList { @@ -234,7 +286,28 @@ func (c *ClickHouse) validateClusterStorageType(cluster ClusterSpec, allErr fiel return allErr } -func (r *ClickHouse) ValidateVersion(db *ClickHouse) error { +func (c *ClickHouse) validateClickHouseKeeperStorageType(storageType StorageType, storage *core.PersistentVolumeClaimSpec, allErr field.ErrorList) field.ErrorList { + if storageType == "" { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec").Child("storageType"), + c.Name, + "StorageType can not be empty")) + } else { + if storageType != StorageTypeDurable && c.Spec.StorageType != StorageTypeEphemeral { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec").Child("storageType"), + c.Name, + "StorageType should be either durable or ephemeral")) + } + } + if storage == nil && c.Spec.StorageType == StorageTypeDurable { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec").Child("storage"), + c.Name, + "Storage can't be empty when StorageType is durable")) + } + + return allErr +} + +func (c *ClickHouse) ValidateVersion(db *ClickHouse) error { chVersion := catalog.ClickHouseVersion{} err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: db.Spec.Version}, &chVersion) if err != nil { @@ -248,7 +321,7 @@ var clickhouseReservedVolumes = []string{ kubedb.ClickHouseVolumeData, } -func (r *ClickHouse) validateVolumes(podTemplate *ofst.PodTemplateSpec) error { +func (c *ClickHouse) validateVolumes(podTemplate *ofst.PodTemplateSpec) error { if podTemplate.Spec.Volumes == nil { return nil } @@ -269,7 +342,7 @@ var clickhouseReservedVolumeMountPaths = []string{ kubedb.ClickHouseDataDir, } -func (r *ClickHouse) validateVolumesMountPaths(podTemplate *ofst.PodTemplateSpec) error { +func (c *ClickHouse) validateVolumesMountPaths(podTemplate *ofst.PodTemplateSpec) error { if podTemplate == nil { return nil } diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_types.go index 62860264..ef34f62e 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/druid_types.go @@ -70,6 +70,10 @@ type DruidSpec struct { // +optional AuthSecret *core.LocalObjectReference `json:"authSecret,omitempty"` + // Init is used to initialize database + // +optional + Init *InitSpec `json:"init,omitempty"` + // ConfigSecret is an optional field to provide custom configuration file for database (i.e. config.properties). // If specified, this file will be used as configuration file otherwise default configuration file will be used. // +optional diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go index 482185db..d8875b6c 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_helpers.go @@ -474,7 +474,7 @@ func (m *MSSQLServer) assignDefaultContainerSecurityContext(mssqlVersion *catalo func (m *MSSQLServer) setDefaultContainerResourceLimits(podTemplate *ofst.PodTemplateSpec) { dbContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, kubedb.MSSQLContainerName) if dbContainer != nil && (dbContainer.Resources.Requests == nil && dbContainer.Resources.Limits == nil) { - apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResourcesMemoryIntensive) + apis.SetDefaultResourceLimits(&dbContainer.Resources, kubedb.DefaultResourcesMemoryIntensiveMSSQLServer) } initContainer := coreutil.GetContainerByName(podTemplate.Spec.InitContainers, kubedb.MSSQLInitContainerName) diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go index afa369e3..2331a1f3 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_types.go @@ -90,6 +90,11 @@ type MSSQLServerSpec struct { // +optional AuthSecret *SecretReference `json:"authSecret,omitempty"` + // ConfigSecret is an optional field to provide custom configuration file for database (i.e mssql.conf). + // If specified, this file will be used as configuration file otherwise default configuration file will be used. + // +optional + ConfigSecret *core.LocalObjectReference `json:"configSecret,omitempty"` + // InternalAuth is used to authenticate endpoint // +optional // +nullable diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_webhook.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_webhook.go index 27bd5d97..4cd24ea3 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_webhook.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/mssqlserver_webhook.go @@ -192,6 +192,7 @@ func (m *MSSQLServer) ValidateCreateOrUpdate() field.ErrorList { // reserved volume and volumes mounts for mssql var mssqlReservedVolumes = []string{ kubedb.MSSQLVolumeNameData, + kubedb.MSSQLVolumeNameConfig, kubedb.MSSQLVolumeNameInitScript, kubedb.MSSQLVolumeNameEndpointCert, kubedb.MSSQLVolumeNameCerts, @@ -202,6 +203,7 @@ var mssqlReservedVolumes = []string{ var mssqlReservedVolumesMountPaths = []string{ kubedb.MSSQLVolumeMountPathData, + kubedb.MSSQLVolumeMountPathConfig, kubedb.MSSQLVolumeMountPathInitScript, kubedb.MSSQLVolumeMountPathEndpointCert, kubedb.MSSQLVolumeMountPathCerts, 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 d429042a..d8dcaceb 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go @@ -499,10 +499,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CassandraSpec": schema_apimachinery_apis_kubedb_v1alpha2_CassandraSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CassandraStatus": schema_apimachinery_apis_kubedb_v1alpha2_CassandraStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouse": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouse(ref), - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperConfig": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeperConfig(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeper": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeper(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperNode": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeperNode(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperSpec": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeperSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseList": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseSpec": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseSpec(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseStatsService": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseStatsService(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseStatus": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseStatus(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickhouseApp": schema_apimachinery_apis_kubedb_v1alpha2_ClickhouseApp(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClusterSpec": schema_apimachinery_apis_kubedb_v1alpha2_ClusterSpec(ref), @@ -25787,23 +25789,33 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouse(ref common.ReferenceCal } } -func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeperConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeper(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ + "externallyManaged": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, "node": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperNode"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperNode"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperSpec"), }, }, }, }, }, Dependencies: []string{ - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperNode"}, + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperNode", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperSpec"}, } } @@ -25832,6 +25844,46 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeperNode(ref common.Re } } +func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseKeeperSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of replica for each shard to deploy for a cluster.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "podTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "PodTemplate is an optional configuration for pods used to expose database", + Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "Storage to specify how storage shall be used.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + "storageType": { + SchemaProps: spec.SchemaProps{ + Description: "StorageType can be durable (default) or ephemeral", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -25935,6 +25987,12 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseSpec(ref common.Referenc Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, + "configSecret": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e config.properties). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, "podTemplate": { SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose database", @@ -25955,6 +26013,19 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseSpec(ref common.Referenc }, }, }, + "halted": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "monitor": { + SchemaProps: spec.SchemaProps{ + Description: "Monitor is used monitor database instance", + Ref: ref("kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec"), + }, + }, "deletionPolicy": { SchemaProps: spec.SchemaProps{ Description: "DeletionPolicy controls the delete operation for database", @@ -25974,7 +26045,27 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseSpec(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseStatsService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ClickHouse": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouse"), + }, + }, + }, + Required: []string{"ClickHouse"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouse"}, } } @@ -26118,14 +26209,14 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ClusterTopology(ref common.Referen "clickHouseKeeper": { SchemaProps: spec.SchemaProps{ Description: "ClickHouse Keeper server name", - Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperConfig"), + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeper"), }, }, }, }, }, Dependencies: []string{ - "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeperConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClusterSpec"}, + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClickHouseKeeper", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ClusterSpec"}, } } @@ -26629,6 +26720,12 @@ func schema_apimachinery_apis_kubedb_v1alpha2_DruidSpec(ref common.ReferenceCall Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), }, }, + "init": { + SchemaProps: spec.SchemaProps{ + Description: "Init is used to initialize database", + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec"), + }, + }, "configSecret": { SchemaProps: spec.SchemaProps{ Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e. config.properties). If specified, this file will be used as configuration file otherwise default configuration file will be used.", @@ -26699,7 +26796,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_DruidSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DeepStorageSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DruidClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MetadataStorage", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ZookeeperRef"}, + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DeepStorageSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.DruidClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MetadataStorage", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ZookeeperRef"}, } } @@ -28956,6 +29053,12 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLServerSpec(ref common.Referen Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"), }, }, + "configSecret": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigSecret is an optional field to provide custom configuration file for database (i.e mssql.conf). If specified, this file will be used as configuration file otherwise default configuration file will be used.", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, "internalAuth": { SchemaProps: spec.SchemaProps{ Description: "InternalAuth is used to authenticate endpoint", @@ -29045,7 +29148,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_MSSQLServerSpec(ref common.Referen }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InternalAuthentication", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerLeaderElectionConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SQLServerTLSConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Archiver", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.CoordinatorSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InitSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.InternalAuthentication", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerLeaderElectionConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.MSSQLServerTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SQLServerTLSConfig", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } 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 ec9f6e8e..bd3772fd 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 @@ -359,18 +359,27 @@ func (in *ClickHouse) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClickHouseKeeperConfig) DeepCopyInto(out *ClickHouseKeeperConfig) { +func (in *ClickHouseKeeper) DeepCopyInto(out *ClickHouseKeeper) { *out = *in - out.Node = in.Node + if in.Node != nil { + in, out := &in.Node, &out.Node + *out = new(ClickHouseKeeperNode) + (*in).DeepCopyInto(*out) + } + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(ClickHouseKeeperSpec) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseKeeperConfig. -func (in *ClickHouseKeeperConfig) DeepCopy() *ClickHouseKeeperConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseKeeper. +func (in *ClickHouseKeeper) DeepCopy() *ClickHouseKeeper { if in == nil { return nil } - out := new(ClickHouseKeeperConfig) + out := new(ClickHouseKeeper) in.DeepCopyInto(out) return out } @@ -378,6 +387,11 @@ func (in *ClickHouseKeeperConfig) DeepCopy() *ClickHouseKeeperConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClickHouseKeeperNode) DeepCopyInto(out *ClickHouseKeeperNode) { *out = *in + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(int32) + **out = **in + } return } @@ -391,6 +405,37 @@ func (in *ClickHouseKeeperNode) DeepCopy() *ClickHouseKeeperNode { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseKeeperSpec) DeepCopyInto(out *ClickHouseKeeperSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.PodTemplate != nil { + in, out := &in.PodTemplate, &out.PodTemplate + *out = new(v2.PodTemplateSpec) + (*in).DeepCopyInto(*out) + } + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(corev1.PersistentVolumeClaimSpec) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseKeeperSpec. +func (in *ClickHouseKeeperSpec) DeepCopy() *ClickHouseKeeperSpec { + if in == nil { + return nil + } + out := new(ClickHouseKeeperSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClickHouseList) DeepCopyInto(out *ClickHouseList) { *out = *in @@ -447,6 +492,11 @@ func (in *ClickHouseSpec) DeepCopyInto(out *ClickHouseSpec) { *out = new(SecretReference) **out = **in } + if in.ConfigSecret != nil { + in, out := &in.ConfigSecret, &out.ConfigSecret + *out = new(corev1.LocalObjectReference) + **out = **in + } if in.PodTemplate != nil { in, out := &in.PodTemplate, &out.PodTemplate *out = new(v2.PodTemplateSpec) @@ -459,6 +509,11 @@ func (in *ClickHouseSpec) DeepCopyInto(out *ClickHouseSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Monitor != nil { + in, out := &in.Monitor, &out.Monitor + *out = new(monitoringagentapiapiv1.AgentSpec) + (*in).DeepCopyInto(*out) + } in.HealthChecker.DeepCopyInto(&out.HealthChecker) return } @@ -473,6 +528,27 @@ func (in *ClickHouseSpec) DeepCopy() *ClickHouseSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClickHouseStatsService) DeepCopyInto(out *ClickHouseStatsService) { + *out = *in + if in.ClickHouse != nil { + in, out := &in.ClickHouse, &out.ClickHouse + *out = new(ClickHouse) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClickHouseStatsService. +func (in *ClickHouseStatsService) DeepCopy() *ClickHouseStatsService { + if in == nil { + return nil + } + out := new(ClickHouseStatsService) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClickHouseStatus) DeepCopyInto(out *ClickHouseStatus) { *out = *in @@ -565,8 +641,8 @@ func (in *ClusterTopology) DeepCopyInto(out *ClusterTopology) { } if in.ClickHouseKeeper != nil { in, out := &in.ClickHouseKeeper, &out.ClickHouseKeeper - *out = new(ClickHouseKeeperConfig) - **out = **in + *out = new(ClickHouseKeeper) + (*in).DeepCopyInto(*out) } return } @@ -923,6 +999,11 @@ func (in *DruidSpec) DeepCopyInto(out *DruidSpec) { *out = new(corev1.LocalObjectReference) **out = **in } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = new(InitSpec) + (*in).DeepCopyInto(*out) + } if in.ConfigSecret != nil { in, out := &in.ConfigSecret, &out.ConfigSecret *out = new(corev1.LocalObjectReference) @@ -2307,6 +2388,11 @@ func (in *MSSQLServerSpec) DeepCopyInto(out *MSSQLServerSpec) { *out = new(SecretReference) **out = **in } + if in.ConfigSecret != nil { + in, out := &in.ConfigSecret, &out.ConfigSecret + *out = new(corev1.LocalObjectReference) + **out = **in + } if in.InternalAuth != nil { in, out := &in.InternalAuth, &out.InternalAuth *out = new(InternalAuthentication) diff --git a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mssqlserverautoscalers.yaml b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mssqlserverautoscalers.yaml index 839b853b..3d90d677 100644 --- a/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mssqlserverautoscalers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/autoscaling.kubedb.com_mssqlserverautoscalers.yaml @@ -107,6 +107,8 @@ spec: - IfReady - Always type: string + readinessCriteria: + type: object timeout: type: string type: object diff --git a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_clickhouseversions.yaml b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_clickhouseversions.yaml index 4de232c6..6d2f7459 100644 --- a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_clickhouseversions.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_clickhouseversions.yaml @@ -45,6 +45,13 @@ spec: type: object spec: properties: + clickHouseKeeper: + properties: + image: + type: string + required: + - image + type: object db: properties: image: @@ -83,6 +90,7 @@ spec: version: type: string required: + - clickHouseKeeper - db - initContainer - version diff --git a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_pgpoolversions.yaml b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_pgpoolversions.yaml index 116fbdc1..25afe8a8 100644 --- a/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_pgpoolversions.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/catalog.kubedb.com_pgpoolversions.yaml @@ -84,6 +84,17 @@ spec: - name type: object type: array + updateConstraints: + properties: + allowlist: + items: + type: string + type: array + denylist: + items: + type: string + type: array + type: object version: type: string required: diff --git a/vendor/kubedb.dev/apimachinery/crds/elasticsearch.kubedb.com_elasticsearchdashboards.yaml b/vendor/kubedb.dev/apimachinery/crds/elasticsearch.kubedb.com_elasticsearchdashboards.yaml index 76fc5366..dc385ff6 100644 --- a/vendor/kubedb.dev/apimachinery/crds/elasticsearch.kubedb.com_elasticsearchdashboards.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/elasticsearch.kubedb.com_elasticsearchdashboards.yaml @@ -66,8 +66,36 @@ spec: type: string type: object x-kubernetes-map-type: atomic + deletionPolicy: + enum: + - Halt + - Delete + - WipeOut + - DoNotTerminate + type: string enableSSL: type: boolean + healthChecker: + default: + failureThreshold: 3 + periodSeconds: 20 + timeoutSeconds: 10 + properties: + disableWriteCheck: + type: boolean + failureThreshold: + default: 1 + format: int32 + type: integer + periodSeconds: + default: 10 + format: int32 + type: integer + timeoutSeconds: + default: 10 + format: int32 + type: integer + type: object podTemplate: properties: controller: @@ -94,620 +122,1412 @@ spec: type: object spec: properties: - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + activeDeadlineSeconds: + format: int64 + type: integer + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: properties: - preference: + exec: properties: - matchExpressions: + command: items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object + type: string type: array x-kubernetes-list-type: atomic - matchFields: + type: object + httpGet: + properties: + host: + type: string + httpHeaders: items: properties: - key: + name: type: string - operator: + value: type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic required: - - key - - operator + - name + - value type: object type: array x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port type: object - x-kubernetes-map-type: atomic - weight: - format: int32 - type: integer - required: - - preference - - weight type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: + preStop: + properties: + exec: properties: - matchExpressions: + command: items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object + type: string type: array x-kubernetes-list-type: atomic - matchFields: + type: object + httpGet: + properties: + host: + type: string + httpHeaders: items: properties: - key: + name: type: string - operator: + value: type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic required: - - key - - operator + - name + - value type: object type: array x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: + sleep: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - topologyKey + - port type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - items: + type: object + livenessProbe: + properties: + exec: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: + command: items: type: string type: array x-kubernetes-list-type: atomic - mismatchLabelKeys: + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: items: - type: string + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object type: array x-kubernetes-list-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: items: type: string type: array x-kubernetes-list-type: atomic - topologyKey: + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: type: string required: - - topologyKey + - port type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + httpGet: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - items: + host: + type: string + httpHeaders: + items: + properties: + name: type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - items: + value: type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: items: type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - type: string - required: - - topologyKey - type: object - weight: + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: format: int32 type: integer + service: + type: string required: - - podAffinityTerm - - weight + - port type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - items: + httpGet: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: + host: + type: string + httpHeaders: items: - type: string + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object type: array x-kubernetes-list-type: atomic - mismatchLabelKeys: + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: items: type: string type: array - x-kubernetes-list-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: + x-kubernetes-list-type: atomic + drop: items: type: string type: array x-kubernetes-list-type: atomic - topologyKey: - type: string - required: - - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - args: - items: - type: string - type: array - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - appArmorProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - capabilities: - properties: - add: - items: - type: string - type: array - x-kubernetes-list-type: atomic - drop: - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - items: - properties: - name: - type: string - value: + privileged: + type: boolean + procMount: type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - key: + level: type: string - name: - default: "" + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: type: string - optional: - type: boolean required: - - key + - type type: object - x-kubernetes-map-type: atomic - fieldRef: + windowsOptions: properties: - apiVersion: + gmsaCredentialSpec: type: string - fieldPath: + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: type: string required: - - fieldPath + - port type: object - x-kubernetes-map-type: atomic - resourceFieldRef: + httpGet: properties: - containerName: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: type: string - divisor: + port: anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - resource: + scheme: type: string required: - - resource + - port type: object - x-kubernetes-map-type: atomic - secretKeyRef: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - key: - type: string - name: - default: "" + host: type: string - optional: - type: boolean + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - key + - port type: object - x-kubernetes-map-type: atomic + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string required: - name type: object type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array hostIPC: type: boolean hostNetwork: type: boolean hostPID: type: boolean + hostUsers: + type: boolean imagePullSecrets: items: properties: @@ -1392,337 +2212,55 @@ spec: - name type: object type: array - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object + nodeName: + type: string nodeSelector: additionalProperties: type: string type: object x-kubernetes-map-type: atomic + os: + properties: + name: + type: string + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object podPlacementPolicy: + default: + name: default properties: name: default: "" type: string type: object x-kubernetes-map-type: atomic + preemptionPolicy: + type: string priority: format: int32 type: integer priorityClassName: type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string runtimeClassName: type: string schedulerName: @@ -1804,6 +2342,8 @@ spec: type: object serviceAccountName: type: string + setHostnameAsFQDN: + type: boolean shareProcessNamespace: type: boolean terminationGracePeriodSeconds: @@ -1825,86 +2365,6 @@ spec: type: string type: object type: array - topologySpreadConstraints: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - format: int32 - type: integer - minDomains: - format: int32 - type: integer - nodeAffinityPolicy: - type: string - nodeTaintsPolicy: - type: string - topologyKey: - type: string - whenUnsatisfiable: - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - - whenUnsatisfiable - x-kubernetes-list-type: map - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - recursiveReadOnly: - type: string - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array volumes: items: properties: @@ -2773,13 +3233,6 @@ spec: - alias type: object type: array - terminationPolicy: - enum: - - Halt - - Delete - - WipeOut - - DoNotTerminate - type: string tls: properties: certificates: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_clickhouses.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_clickhouses.yaml index 307d4fca..d18a05e7 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_clickhouses.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_clickhouses.yaml @@ -59,6 +59,8 @@ spec: properties: clickHouseKeeper: properties: + externallyManaged: + type: boolean node: properties: host: @@ -67,6 +69,3169 @@ spec: format: int32 type: integer type: object + spec: + properties: + podTemplate: + properties: + controller: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + activeDeadlineSeconds: + format: int64 + type: integer + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostUsers: + type: boolean + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + os: + properties: + name: + type: string + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + podPlacementPolicy: + default: + name: default + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + preemptionPolicy: + type: string + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + securityContext: + properties: + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + type: string + setHostnameAsFQDN: + type: boolean + shareProcessNamespace: + type: boolean + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + generateName: + type: string + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + ownerReferences: + items: + properties: + apiVersion: + type: string + blockOwnerDeletion: + type: boolean + controller: + type: boolean + kind: + type: string + name: + type: string + uid: + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + x-kubernetes-map-type: atomic + type: array + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + type: object + replicas: + format: int32 + type: integer + storage: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + storageType: + enum: + - Durable + - Ephemeral + type: string + type: object type: object cluster: items: @@ -3239,6 +6404,13 @@ spec: type: object type: array type: object + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic deletionPolicy: enum: - Halt @@ -3248,6 +6420,8 @@ spec: type: string disableSecurity: type: boolean + halted: + type: boolean healthChecker: default: failureThreshold: 3 @@ -3269,6 +6443,207 @@ spec: format: int32 type: integer type: object + monitor: + properties: + agent: + enum: + - prometheus.io/operator + - prometheus.io + - prometheus.io/builtin + type: string + prometheus: + properties: + exporter: + properties: + args: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + port: + default: 56790 + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + type: object + serviceMonitor: + properties: + interval: + type: string + labels: + additionalProperties: + type: string + type: object + type: object + type: object + type: object podTemplate: properties: controller: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml index 6473f6d1..e665f732 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_druids.yaml @@ -111,6 +111,1012 @@ spec: format: int32 type: integer type: object + init: + properties: + archiver: + properties: + encryptionSecret: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + fullDBRepository: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + manifestRepository: + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + recoveryTimestamp: + format: date-time + type: string + required: + - recoveryTimestamp + type: object + initialized: + type: boolean + script: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + type: string + kind: + type: string + readOnly: + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + git: + properties: + args: + items: + type: string + type: array + authSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + required: + - args + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + scriptPath: + type: string + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + type: object + waitForInitialRestore: + type: boolean + type: object metadataStorage: properties: createTables: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml index 00f9c4b7..01b8a920 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_mssqlservers.yaml @@ -68,6 +68,13 @@ spec: type: string type: object x-kubernetes-map-type: atomic + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic coordinator: properties: resources: diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml index 4d74cf13..a88d7fac 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_pgbouncers.yaml @@ -72,52 +72,40 @@ spec: connectionPool: properties: authType: - default: md5 enum: - md5 - scram-sha-256 - cert type: string defaultPoolSize: - default: 20 format: int64 type: integer ignoreStartupParameters: - default: empty type: string maxClientConnections: - default: 100 format: int64 type: integer maxDBConnections: - default: 0 format: int64 type: integer maxUserConnections: - default: 0 format: int64 type: integer minPoolSize: - default: 0 format: int64 type: integer poolMode: - default: session type: string port: - default: 5432 format: int32 type: integer reservePoolSize: - default: 0 format: int64 type: integer reservePoolTimeoutSeconds: - default: 5 format: int64 type: integer statsPeriodSeconds: - default: 60 format: int64 type: integer type: object @@ -3626,6 +3614,7 @@ spec: version: type: string required: + - database - version type: object status: diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_mssqlserveropsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_mssqlserveropsrequests.yaml index f7557c26..ab6b4929 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_mssqlserveropsrequests.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_mssqlserveropsrequests.yaml @@ -48,6 +48,22 @@ spec: - IfReady - Always type: string + configuration: + properties: + applyConfig: + additionalProperties: + type: string + type: object + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + removeCustomConfig: + type: boolean + type: object databaseRef: properties: name: @@ -55,14 +71,269 @@ spec: type: string type: object x-kubernetes-map-type: atomic + horizontalScaling: + properties: + replicas: + format: int32 + type: integer + type: object restart: type: object timeout: type: string + tls: + properties: + certificates: + items: + properties: + alias: + type: string + dnsNames: + items: + type: string + type: array + duration: + type: string + emailAddresses: + items: + type: string + type: array + ipAddresses: + items: + type: string + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + privateKey: + properties: + encoding: + enum: + - PKCS1 + - PKCS8 + type: string + type: object + renewBefore: + type: string + secretName: + type: string + subject: + properties: + countries: + items: + type: string + type: array + localities: + items: + type: string + type: array + organizationalUnits: + items: + type: string + type: array + organizations: + items: + type: string + type: array + postalCodes: + items: + type: string + type: array + provinces: + items: + type: string + type: array + serialNumber: + type: string + streetAddresses: + items: + type: string + type: array + type: object + uris: + items: + type: string + type: array + required: + - alias + type: object + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + remove: + type: boolean + rotateCertificates: + type: boolean + type: object type: enum: + - UpdateVersion + - HorizontalScaling + - VerticalScaling + - VolumeExpansion - Restart + - Reconfigure + - ReconfigureTLS type: string + updateVersion: + properties: + targetVersion: + type: string + type: object + verticalScaling: + properties: + coordinator: + properties: + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + exporter: + properties: + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + mssqlserver: + properties: + nodeSelectionPolicy: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + topology: + properties: + key: + type: string + value: + type: string + required: + - key + - value + type: object + type: object + type: object + volumeExpansion: + properties: + mode: + enum: + - Offline + - Online + type: string + mssqlserver: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - mode + type: object required: - databaseRef - type diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml index ff8aff8c..bca99d06 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml @@ -49,6 +49,25 @@ spec: - Always type: string configuration: + properties: + pgbouncer: + properties: + applyConfig: + additionalProperties: + type: string + type: object + configSecret: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + removeCustomConfig: + type: boolean + type: object + required: + - pgbouncer type: object horizontalScaling: properties: @@ -177,6 +196,7 @@ spec: - HorizontalScaling - VerticalScaling - UpdateVersion + - Reconfigure type: string updateVersion: properties: diff --git a/vendor/modules.txt b/vendor/modules.txt index 696242a9..843614e6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1561,7 +1561,7 @@ kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v1/conversion kmodules.xyz/offshoot-api/api/v2 kmodules.xyz/offshoot-api/util -# kubedb.dev/apimachinery v0.47.1-0.20240924051141-f0421dd9f647 +# kubedb.dev/apimachinery v0.47.1-0.20240925065855-706baeb42442 ## explicit; go 1.22.1 kubedb.dev/apimachinery/apis kubedb.dev/apimachinery/apis/catalog