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/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..8660228d 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"}, } } 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..6cbe431d 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 diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go index ed4c7cc0..e8720b77 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go @@ -1313,36 +1313,71 @@ const ( ClickHouseNativeTCP = 9000 ClickHouseNativeTLS = 9440 ClickhousePromethues = 9363 + ClickHouseRaftPort = 9234 + + 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" + + ComponentCoOrdinator = "co-ordinator" + 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 +1474,15 @@ var ( core.ResourceMemory: resource.MustParse("1024Mi"), }, } + ClickHouseDefaultResources = core.ResourceRequirements{ + Requests: core.ResourceList{ + core.ResourceCPU: resource.MustParse("1"), + core.ResourceMemory: resource.MustParse("3Gi"), + }, + Limits: core.ResourceList{ + core.ResourceMemory: resource.MustParse("6Gi"), + }, + } // CoordinatorDefaultResources must be used for raft backed coordinators to avoid unintended leader switches CoordinatorDefaultResources = core.ResourceRequirements{ Requests: core.ResourceList{ 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..21cf30e0 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,197 @@ 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 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 +277,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 +312,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 +333,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/openapi_generated.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go index d429042a..5517ae5e 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/openapi_generated.go @@ -499,8 +499,9 @@ 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.ClickHouseStatus": schema_apimachinery_apis_kubedb_v1alpha2_ClickHouseStatus(ref), @@ -25787,23 +25788,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 +25843,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 +25986,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 +26012,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 +26044,7 @@ 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"}, } } @@ -26118,14 +26188,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"}, } } 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..e068995a 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 } @@ -565,8 +620,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 } 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/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: