From 2c9d3953d41909fae19e026fa4f02a194bb67004 Mon Sep 17 00:00:00 2001 From: SK Ali Arman Date: Tue, 24 Sep 2024 16:59:14 +0600 Subject: [PATCH] Add ClickHouse Keeper Api (#1278) * Add ClickHouse Keeper Api Signed-off-by: SK Ali Arman * rebase Signed-off-by: SK Ali Arman * update petset replica count for internally managed ch-keeper Signed-off-by: SK Ali Arman * validate clickhouse keeper Signed-off-by: SK Ali Arman * refactor Signed-off-by: SK Ali Arman * refactor Signed-off-by: SK Ali Arman * update webhook for keeper Signed-off-by: SK Ali Arman * update constrants Signed-off-by: SK Ali Arman * add clickhouse default resource Signed-off-by: SK Ali Arman * merge with master Signed-off-by: SK Ali Arman * Change configPath and keeper path Signed-off-by: SK Ali Arman * resolve comments Signed-off-by: SK Ali Arman --------- Signed-off-by: SK Ali Arman --- .../v1alpha1/clickhouse_version_types.go | 8 + apis/catalog/v1alpha1/openapi_generated.go | 33 +- .../catalog/v1alpha1/zz_generated.deepcopy.go | 17 + apis/kubedb/constants.go | 55 +- apis/kubedb/v1alpha2/clickhouse_helpers.go | 121 +- apis/kubedb/v1alpha2/clickhouse_types.go | 28 +- apis/kubedb/v1alpha2/clickhouse_webhook.go | 66 +- apis/kubedb/v1alpha2/openapi_generated.go | 65 +- apis/kubedb/v1alpha2/zz_generated.deepcopy.go | 59 +- ...catalog.kubedb.com_clickhouseversions.yaml | 8 + crds/kubedb.com_clickhouses.yaml | 3165 +++++++++++++++++ 11 files changed, 3588 insertions(+), 37 deletions(-) diff --git a/apis/catalog/v1alpha1/clickhouse_version_types.go b/apis/catalog/v1alpha1/clickhouse_version_types.go index 88af5f06f3..37bd4b2399 100644 --- a/apis/catalog/v1alpha1/clickhouse_version_types.go +++ b/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/apis/catalog/v1alpha1/openapi_generated.go b/apis/catalog/v1alpha1/openapi_generated.go index af8d1e4fcf..0027415acb 100644 --- a/apis/catalog/v1alpha1/openapi_generated.go +++ b/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/apis/catalog/v1alpha1/zz_generated.deepcopy.go b/apis/catalog/v1alpha1/zz_generated.deepcopy.go index 5dae8719ba..8368d286ac 100644 --- a/apis/catalog/v1alpha1/zz_generated.deepcopy.go +++ b/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/apis/kubedb/constants.go b/apis/kubedb/constants.go index 5ac77e6cce..c9d40fe37d 100644 --- a/apis/kubedb/constants.go +++ b/apis/kubedb/constants.go @@ -1326,24 +1326,34 @@ const ( ClickHouseNativeTCP = 9000 ClickHouseNativeTLS = 9440 ClickhousePromethues = 9363 + ClickHouseRaftPort = 9234 - ClickHouseVolumeData = "data" - ClickHouseDataDir = "/var/lib/clickhouse" - ClickHouseConfigVolName = "clickhouse-config" - ClickHouseConfigDir = "/etc/clickhouse-server/config.d" - ClickHouseDefaultStorageSize = "2Gi" + ComponentCoOrdinator = "co-ordinator" + + ClickHouseVolumeData = "data" + ClickHouseDataDir = "/var/lib/clickhouse" + ClickHouseKeeperDataDir = "/var/lib/clickhouse_keeper" + ClickHouseConfigVolumeName = "clickhouse-config" + ClickHouseKeeperConfigVolumeName = "clickhouse-keeper-config" + ClickHouseInternalKeeperConfigVolumeName = "clickhouse-internal-keeper-config" + ClickHouseConfigDir = "/etc/clickhouse-server/config.d" + ClickHouseKeeperConfigDir = "/etc/clickhouse-keeper" + ClickHouseDefaultStorageSize = "2Gi" ClickHouseClusterConfigVolName = "cluster-config" ClickHouseClusterConfigDir = "/etc/clickhouse-server/conf.d" - ClickHouseTempClusterConfigVolName = "temp-cluster-config" + ClickHouseClusterTempConfigVolName = "temp-cluster-config" + + ClickHouseContainerName = "clickhouse" - ClickHouseContainerName = "clickhouse" ClickHouseInitContainerName = "clickhouse-init" - ClickHouseClusterConfigFile = "cluster-config.yaml" - ClickHouseTempConfigDir = "/ch-tmp/config" - ClickHouseTempDir = "/ch-tmp" + ClickHouseClusterConfigFile = "cluster-config.yaml" + ClickHouseTempConfigDir = "/ch-tmp" + ClickHouseInternalKeeperTempConfigDir = "/keeper" + ClickHouseTempDir = "/ch-tmp" + ClickHouseKeeperTempDir = "/ch-tmp" ClickHouseUserConfigDir = "/etc/clickhouse-server/user.d" ClickHouseMacrosFileName = "macros.yaml" @@ -1351,11 +1361,20 @@ const ( ClickHouseStandalone = "standalone" ClickHouseCluster = "cluster" - ClickHouseHealthCheckerDatabase = "kubedb_system_db" - ClickHouseHealthCheckerTable = "kubedb_system_table" + ClickHouseHealthCheckerDatabase = "kubedb_system" + ClickHouseHealthCheckerTable = "kubedb_write_check" ClickHouseServerConfigFile = "server-config.yaml" - ClickHouseKeeperFileConfig = "keeper-config.yaml" + ClickHouseKeeperFileConfig = "keeper_config.yaml" + + // keeper + ClickHouseKeeperContainerName = "clickhouse-keeper" + ClickHouseKeeeprConfigFileName = "keeper_config.xml" + ClickHOuseKeeeprConfigFileVolumeName = "keeper-config" + ClickHouseKeeperInitContainerName = "clickhouse-keeper-init" + + ClickHouseKeeperConfig = "etc-clickhouse-keeper" + ClickHouseKeeperConfigPath = "/etc/clickhouse-keeper" ) // =========================== Cassandra Constants ============================ @@ -1452,6 +1471,16 @@ var ( core.ResourceMemory: resource.MustParse("1024Mi"), }, } + // ref: https://clickhouse.com/docs/en/guides/sizing-and-hardware-recommendations#what-should-cpu-utilization-be + ClickHouseDefaultResources = core.ResourceRequirements{ + Requests: core.ResourceList{ + core.ResourceCPU: resource.MustParse("1"), + core.ResourceMemory: resource.MustParse("4Gi"), + }, + Limits: core.ResourceList{ + core.ResourceMemory: resource.MustParse("4Gi"), + }, + } // CoordinatorDefaultResources must be used for raft backed coordinators to avoid unintended leader switches CoordinatorDefaultResources = core.ResourceRequirements{ Requests: core.ResourceList{ diff --git a/apis/kubedb/v1alpha2/clickhouse_helpers.go b/apis/kubedb/v1alpha2/clickhouse_helpers.go index e82cf96fa7..7230ac98d5 100644 --- a/apis/kubedb/v1alpha2/clickhouse_helpers.go +++ b/apis/kubedb/v1alpha2/clickhouse_helpers.go @@ -75,6 +75,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 +97,10 @@ func (c *ClickHouse) OffshootLabels() map[string]string { return c.offshootLabels(c.OffshootSelectors(), nil) } +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 +110,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 +125,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 +156,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,10 +195,18 @@ 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) } @@ -172,6 +219,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) } @@ -242,12 +293,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 +335,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 +377,42 @@ func (c *ClickHouse) setDefaultContainerSecurityContext(chVersion *catalog.Click c.assignDefaultContainerSecurityContext(chVersion, initContainer.SecurityContext) } +func (r *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{} + } + r.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{} + } + r.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 +433,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 +444,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/apis/kubedb/v1alpha2/clickhouse_types.go b/apis/kubedb/v1alpha2/clickhouse_types.go index ca60ca04b4..ca46190791 100644 --- a/apis/kubedb/v1alpha2/clickhouse_types.go +++ b/apis/kubedb/v1alpha2/clickhouse_types.go @@ -100,7 +100,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 +125,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 +154,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/apis/kubedb/v1alpha2/clickhouse_webhook.go b/apis/kubedb/v1alpha2/clickhouse_webhook.go index a0d5601690..1580f91817 100644 --- a/apis/kubedb/v1alpha2/clickhouse_webhook.go +++ b/apis/kubedb/v1alpha2/clickhouse_webhook.go @@ -99,6 +99,49 @@ func (r *ClickHouse) ValidateCreateOrUpdate() error { if r.Spec.ClusterTopology != nil { clusterName := map[string]bool{} clusters := r.Spec.ClusterTopology.Cluster + if r.Spec.ClusterTopology.ClickHouseKeeper != nil { + if !r.Spec.ClusterTopology.ClickHouseKeeper.ExternallyManaged { + if r.Spec.ClusterTopology.ClickHouseKeeper.Spec == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec"), + r.Name, + "spec can't be nil when externally managed is false")) + } else { + if *r.Spec.ClusterTopology.ClickHouseKeeper.Spec.Replicas < 1 { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec").Child("replica"), + r.Name, + "number of replica can not be 0 or less")) + } + allErr = r.validateClickHouseKeeperStorageType(r.Spec.ClusterTopology.ClickHouseKeeper.Spec.StorageType, r.Spec.ClusterTopology.ClickHouseKeeper.Spec.Storage, allErr) + } + if r.Spec.ClusterTopology.ClickHouseKeeper.Node != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node"), + r.Name, + "ClickHouse Keeper node should be empty when externally managed is false")) + } + } else { + if r.Spec.ClusterTopology.ClickHouseKeeper.Node == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node"), + r.Name, + "ClickHouse Keeper node can't be empty when externally managed is true")) + } else { + if r.Spec.ClusterTopology.ClickHouseKeeper.Node.Host == "" { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node").Child("host"), + r.Name, + "ClickHouse Keeper host can't be empty")) + } + if r.Spec.ClusterTopology.ClickHouseKeeper.Node.Port == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("node").Child("port"), + r.Name, + "ClickHouse Keeper port can't be empty")) + } + } + if r.Spec.ClusterTopology.ClickHouseKeeper.Spec != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("clusterTopology").Child("clickHouseKeeper").Child("spec"), + r.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"), @@ -113,7 +156,7 @@ func (r *ClickHouse) ValidateCreateOrUpdate() error { 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")) + "cluster name is already exists, use different cluster name")) } clusterName[cluster.Name] = true @@ -234,6 +277,27 @@ func (c *ClickHouse) validateClusterStorageType(cluster ClusterSpec, allErr fiel return allErr } +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 (r *ClickHouse) ValidateVersion(db *ClickHouse) error { chVersion := catalog.ClickHouseVersion{} err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: db.Spec.Version}, &chVersion) diff --git a/apis/kubedb/v1alpha2/openapi_generated.go b/apis/kubedb/v1alpha2/openapi_generated.go index dc3eec4eb9..81d3302ede 100644 --- a/apis/kubedb/v1alpha2/openapi_generated.go +++ b/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{ @@ -26118,14 +26169,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/apis/kubedb/v1alpha2/zz_generated.deepcopy.go b/apis/kubedb/v1alpha2/zz_generated.deepcopy.go index 0fe74c110f..c46447fde5 100644 --- a/apis/kubedb/v1alpha2/zz_generated.deepcopy.go +++ b/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 @@ -565,8 +610,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/crds/catalog.kubedb.com_clickhouseversions.yaml b/crds/catalog.kubedb.com_clickhouseversions.yaml index 4de232c6a9..6d2f7459c9 100644 --- a/crds/catalog.kubedb.com_clickhouseversions.yaml +++ b/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/crds/kubedb.com_clickhouses.yaml b/crds/kubedb.com_clickhouses.yaml index 307d4fca04..732577ec03 100644 --- a/crds/kubedb.com_clickhouses.yaml +++ b/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: