diff --git a/apis/catalog/v1alpha1/openapi_generated.go b/apis/catalog/v1alpha1/openapi_generated.go index 611d189a16..13a113e89b 100644 --- a/apis/catalog/v1alpha1/openapi_generated.go +++ b/apis/catalog/v1alpha1/openapi_generated.go @@ -566,6 +566,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ProxySQLVersionPodSecurityPolicy": schema_apimachinery_apis_catalog_v1alpha1_ProxySQLVersionPodSecurityPolicy(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ProxySQLVersionProxysql": schema_apimachinery_apis_catalog_v1alpha1_ProxySQLVersionProxysql(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.ProxySQLVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_ProxySQLVersionSpec(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQInitContainer": schema_apimachinery_apis_catalog_v1alpha1_RabbitMQInitContainer(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersion": schema_apimachinery_apis_catalog_v1alpha1_RabbitMQVersion(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersionDatabase": schema_apimachinery_apis_catalog_v1alpha1_RabbitMQVersionDatabase(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersionList": schema_apimachinery_apis_catalog_v1alpha1_RabbitMQVersionList(ref), + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersionSpec": schema_apimachinery_apis_catalog_v1alpha1_RabbitMQVersionSpec(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersion": schema_apimachinery_apis_catalog_v1alpha1_RedisVersion(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionCoordinator": schema_apimachinery_apis_catalog_v1alpha1_RedisVersionCoordinator(ref), "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RedisVersionDatabase": schema_apimachinery_apis_catalog_v1alpha1_RedisVersionDatabase(ref), @@ -26735,6 +26740,189 @@ func schema_apimachinery_apis_catalog_v1alpha1_ProxySQLVersionSpec(ref common.Re } } +func schema_apimachinery_apis_catalog_v1alpha1_RabbitMQInitContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RabbitMQInitContainer is the RabbitMQ init 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_RabbitMQVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersionSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersionSpec"}, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_RabbitMQVersionDatabase(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RabbitMQVersionDatabase is the RabbitMQ Database 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_RabbitMQVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RabbitMQVersionList is a list of RabbitmqVersions", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of RedisVersion CRD objects", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersion"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersion"}, + } +} + +func schema_apimachinery_apis_catalog_v1alpha1_RabbitMQVersionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RabbitMQVersionSpec is the spec for RabbitMQ version", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "db": { + SchemaProps: spec.SchemaProps{ + Description: "Database Image", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersionDatabase"), + }, + }, + "initContainer": { + SchemaProps: spec.SchemaProps{ + Description: "Database Image", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQInitContainer"), + }, + }, + "deprecated": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext is for the additional config for the DB container", + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"), + }, + }, + }, + Required: []string{"version", "db", "initContainer"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQInitContainer", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.RabbitMQVersionDatabase", "kubedb.dev/apimachinery/apis/catalog/v1alpha1.SecurityContext"}, + } +} + func schema_apimachinery_apis_catalog_v1alpha1_RedisVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/apis/catalog/v1alpha1/rabbitmq_version_helpers.go b/apis/catalog/v1alpha1/rabbitmq_version_helpers.go new file mode 100644 index 0000000000..ca06161ee2 --- /dev/null +++ b/apis/catalog/v1alpha1/rabbitmq_version_helpers.go @@ -0,0 +1,63 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "fmt" + + "kubedb.dev/apimachinery/apis" + "kubedb.dev/apimachinery/apis/catalog" + "kubedb.dev/apimachinery/crds" + + "kmodules.xyz/client-go/apiextensions" +) + +func (_ RabbitMQVersion) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { + return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralRabbitMQVersion)) +} + +var _ apis.ResourceInfo = &RabbitMQVersion{} + +func (r RabbitMQVersion) ResourceFQN() string { + return fmt.Sprintf("%s.%s", ResourcePluralRabbitMQVersion, catalog.GroupName) +} + +func (r RabbitMQVersion) ResourceShortCode() string { + return ResourceCodeRabbitMQVersion +} + +func (r RabbitMQVersion) ResourceKind() string { + return ResourceKindRabbitMQVersion +} + +func (r RabbitMQVersion) ResourceSingular() string { + return ResourceSingularRabbitMQVersion +} + +func (r RabbitMQVersion) ResourcePlural() string { + return ResourcePluralRabbitMQVersion +} + +func (r RabbitMQVersion) ValidateSpecs() error { + if r.Spec.Version == "" || + r.Spec.DB.Image == "" { + return fmt.Errorf(`atleast one of the following specs is not set for RabbitMQVersion "%v": + spec.version, + spec.db.image`, r.Name) + } + return nil +} diff --git a/apis/catalog/v1alpha1/rabbitmqversion_types.go b/apis/catalog/v1alpha1/rabbitmqversion_types.go new file mode 100644 index 0000000000..e4b9bae6ee --- /dev/null +++ b/apis/catalog/v1alpha1/rabbitmqversion_types.go @@ -0,0 +1,84 @@ +/* +Copyright 2023. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + ResourceCodeRabbitMQVersion = "rmversion" + ResourceKindRabbitMQVersion = "RabbitMQVersion" + ResourceSingularRabbitMQVersion = "rabbitmqversion" + ResourcePluralRabbitMQVersion = "rabbitmqversions" +) + +// RabbitMQVersion defines a RabbitMQ database version. + +// +genclient +// +genclient:nonNamespaced +// +genclient:skipVerbs=updateStatus +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=rabbitmqversions,singular=rabbitmqversion,scope=Cluster,shortName=rmversion,categories={datastore,kubedb,appscode} +// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +// +kubebuilder:printcolumn:name="DB_IMAGE",type="string",JSONPath=".spec.db.image" +// +kubebuilder:printcolumn:name="Deprecated",type="boolean",JSONPath=".spec.deprecated" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +type RabbitMQVersion struct { + metav1.TypeMeta `json:",inline,omitempty"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec RabbitMQVersionSpec `json:"spec,omitempty"` +} + +// RabbitMQVersionSpec is the spec for RabbitMQ version +type RabbitMQVersionSpec struct { + // Version + Version string `json:"version"` + // Database Image + DB RabbitMQVersionDatabase `json:"db"` + // Database Image + InitContainer RabbitMQInitContainer `json:"initContainer"` + // Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded. + // +optional + Deprecated bool `json:"deprecated,omitempty"` + // SecurityContext is for the additional config for the DB container + // +optional + SecurityContext SecurityContext `json:"securityContext"` +} + +// RabbitMQVersionDatabase is the RabbitMQ Database image +type RabbitMQVersionDatabase struct { + Image string `json:"image"` +} + +// RabbitMQInitContainer is the RabbitMQ init Container image +type RabbitMQInitContainer struct { + Image string `json:"image"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RabbitMQVersionList is a list of RabbitmqVersions +type RabbitMQVersionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + // Items is a list of RedisVersion CRD objects + Items []RabbitMQVersion `json:"items,omitempty"` +} diff --git a/apis/catalog/v1alpha1/register.go b/apis/catalog/v1alpha1/register.go index 7799b6483f..0820e14a2b 100644 --- a/apis/catalog/v1alpha1/register.go +++ b/apis/catalog/v1alpha1/register.go @@ -80,16 +80,16 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PostgresVersionList{}, &ProxySQLVersion{}, &ProxySQLVersionList{}, + &RabbitMQVersion{}, + &RabbitMQVersionList{}, &RedisVersion{}, &RedisVersionList{}, &SinglestoreVersion{}, &SinglestoreVersionList{}, - &ZooKeeperVersion{}, - &ZooKeeperVersionList{}, - &KafkaConnectorVersion{}, - &KafkaConnectorVersionList{}, &SolrVersion{}, &SolrVersionList{}, + &ZooKeeperVersion{}, + &ZooKeeperVersionList{}, ) scheme.AddKnownTypes(SchemeGroupVersion, diff --git a/apis/catalog/v1alpha1/singlestore_version_helpers.go b/apis/catalog/v1alpha1/singlestore_version_helpers.go index adacdcbbc7..23fdc8cdc5 100644 --- a/apis/catalog/v1alpha1/singlestore_version_helpers.go +++ b/apis/catalog/v1alpha1/singlestore_version_helpers.go @@ -59,8 +59,8 @@ func (s SinglestoreVersion) ValidateSpecs() error { s.Spec.Standalone.Image == "" { return fmt.Errorf(`atleast one of the following specs is not set for singlestoreVersion "%v": spec.version, -spec.db.image, -spec.exporter.image.`, s.Name) +spec.coordinator.image, +spec.standalone.image.`, s.Name) } return nil } diff --git a/apis/catalog/v1alpha1/zz_generated.deepcopy.go b/apis/catalog/v1alpha1/zz_generated.deepcopy.go index fa9ec4f5e8..91a24f1a94 100644 --- a/apis/catalog/v1alpha1/zz_generated.deepcopy.go +++ b/apis/catalog/v1alpha1/zz_generated.deepcopy.go @@ -2362,6 +2362,117 @@ func (in *ProxySQLVersionSpec) DeepCopy() *ProxySQLVersionSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQInitContainer) DeepCopyInto(out *RabbitMQInitContainer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQInitContainer. +func (in *RabbitMQInitContainer) DeepCopy() *RabbitMQInitContainer { + if in == nil { + return nil + } + out := new(RabbitMQInitContainer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQVersion) DeepCopyInto(out *RabbitMQVersion) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQVersion. +func (in *RabbitMQVersion) DeepCopy() *RabbitMQVersion { + if in == nil { + return nil + } + out := new(RabbitMQVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RabbitMQVersion) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQVersionDatabase) DeepCopyInto(out *RabbitMQVersionDatabase) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQVersionDatabase. +func (in *RabbitMQVersionDatabase) DeepCopy() *RabbitMQVersionDatabase { + if in == nil { + return nil + } + out := new(RabbitMQVersionDatabase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQVersionList) DeepCopyInto(out *RabbitMQVersionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RabbitMQVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQVersionList. +func (in *RabbitMQVersionList) DeepCopy() *RabbitMQVersionList { + if in == nil { + return nil + } + out := new(RabbitMQVersionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RabbitMQVersionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQVersionSpec) DeepCopyInto(out *RabbitMQVersionSpec) { + *out = *in + out.DB = in.DB + out.InitContainer = in.InitContainer + in.SecurityContext.DeepCopyInto(&out.SecurityContext) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQVersionSpec. +func (in *RabbitMQVersionSpec) DeepCopy() *RabbitMQVersionSpec { + if in == nil { + return nil + } + out := new(RabbitMQVersionSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisVersion) DeepCopyInto(out *RedisVersion) { *out = *in diff --git a/apis/kafka/v1alpha1/connect_cluster_helpers.go b/apis/kafka/v1alpha1/connect_cluster_helpers.go index 71159224e7..72db16090f 100644 --- a/apis/kafka/v1alpha1/connect_cluster_helpers.go +++ b/apis/kafka/v1alpha1/connect_cluster_helpers.go @@ -22,6 +22,7 @@ import ( "path/filepath" "strings" + "kubedb.dev/apimachinery/apis" catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" "kubedb.dev/apimachinery/apis/kafka" api "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" @@ -246,6 +247,11 @@ func (k *ConnectCluster) SetDefaults() { k.setDefaultContainerSecurityContext(&kfVersion, &k.Spec.PodTemplate) k.setDefaultInitContainerSecurityContext(&k.Spec.PodTemplate) + dbContainer := coreutil.GetContainerByName(k.Spec.PodTemplate.Spec.Containers, ConnectClusterContainerName) + if dbContainer != nil { + apis.SetDefaultResourceLimits(&dbContainer.Resources, api.DefaultResources) + } + k.Spec.Monitor.SetDefaults() if k.Spec.Monitor != nil && k.Spec.Monitor.Prometheus != nil && k.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsUser == nil { k.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsUser = kfVersion.Spec.SecurityContext.RunAsUser diff --git a/apis/kafka/v1alpha1/connect_cluster_webhook.go b/apis/kafka/v1alpha1/connect_cluster_webhook.go index 8b6caf0755..95f88422f2 100644 --- a/apis/kafka/v1alpha1/connect_cluster_webhook.go +++ b/apis/kafka/v1alpha1/connect_cluster_webhook.go @@ -173,23 +173,13 @@ func validateEnvVars(connect *ConnectCluster) error { return nil } -var availableVersions = []string{ - "3.3.0", - "3.3.2", - "3.4.0", - "3.4.1", - "3.5.1", - "3.6.0", -} - func validateVersion(connect *ConnectCluster) error { - version := connect.Spec.Version - for _, v := range availableVersions { - if v == version { - return nil - } + kccVersion := &catalog.KafkaVersion{} + err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: connect.Spec.Version}, kccVersion) + if err != nil { + return errors.New("version not supported") } - return errors.New("version not supported") + return nil } var reservedVolumes = []string{ diff --git a/apis/kafka/v1alpha1/connector_helpers.go b/apis/kafka/v1alpha1/connector_helpers.go index b161952579..f8fb6d4f72 100644 --- a/apis/kafka/v1alpha1/connector_helpers.go +++ b/apis/kafka/v1alpha1/connector_helpers.go @@ -17,11 +17,48 @@ limitations under the License. package v1alpha1 import ( + "fmt" + + "kubedb.dev/apimachinery/apis/kafka" "kubedb.dev/apimachinery/crds" + meta "k8s.io/apimachinery/pkg/apis/meta/v1" "kmodules.xyz/client-go/apiextensions" ) func (_ *Connector) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralConnector)) } + +func (k *Connector) AsOwner() *meta.OwnerReference { + return meta.NewControllerRef(k, SchemeGroupVersion.WithKind(ResourceKindConnector)) +} + +func (k *Connector) ResourceShortCode() string { + return ResourceCodeConnector +} + +func (k *Connector) ResourceKind() string { + return ResourceKindConnector +} + +func (k *Connector) ResourceSingular() string { + return ResourceSingularConnector +} + +func (k *Connector) ResourcePlural() string { + return ResourcePluralConnector +} + +func (k *Connector) ResourceFQN() string { + return fmt.Sprintf("%s.%s", k.ResourcePlural(), kafka.GroupName) +} + +// Owner returns owner reference to resources +func (k *Connector) Owner() *meta.OwnerReference { + return meta.NewControllerRef(k, SchemeGroupVersion.WithKind(k.ResourceKind())) +} + +func (k *Connector) OffshootName() string { + return k.Name +} diff --git a/apis/kubedb/v1alpha2/constants.go b/apis/kubedb/v1alpha2/constants.go index 13c9b3c021..e3cd86c603 100644 --- a/apis/kubedb/v1alpha2/constants.go +++ b/apis/kubedb/v1alpha2/constants.go @@ -1000,6 +1000,24 @@ const ( DruidDeepStorageHDFS DruidDeepStorageType = "hdfs" ) +const ( + RabbitMQAMQPPort = 5672 + RabbitMQPeerDiscoveryPort = 4369 + RabbitMQManagementUIPort = 15672 + RabbitMQInterNodePort = 25672 + + RabbitMQVolumeData = "data" + RabbitMQVolumeConfig = "rabbitmqconfig" + RabbitMQVolumeTempConfig = "temp-config" + RabbitMQVolumeCustomConfig = "custom-config" + + RabbitMQDataDir = "/var/lib/rabbitmq/mnesia" + RabbitMQPluginsDir = "/etc/rabbitmq/" + RabbitMQCertDir = "/var/private/ssl" + RabbitMQConfigDir = "/config/" + RabbitMQTempConfigDir = "/tmp/config/" +) + // Resource kind related constants const ( ResourceKindStatefulSet = "StatefulSet" diff --git a/apis/kubedb/v1alpha2/druid_helpers.go b/apis/kubedb/v1alpha2/druid_helpers.go index 4dd48f7147..994b0beb4d 100644 --- a/apis/kubedb/v1alpha2/druid_helpers.go +++ b/apis/kubedb/v1alpha2/druid_helpers.go @@ -25,12 +25,14 @@ import ( "kubedb.dev/apimachinery/apis" catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" "kubedb.dev/apimachinery/apis/kubedb" + "kubedb.dev/apimachinery/crds" "gomodules.xyz/pointer" v1 "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" + "kmodules.xyz/client-go/apiextensions" coreutil "kmodules.xyz/client-go/core/v1" meta_util "kmodules.xyz/client-go/meta" "kmodules.xyz/client-go/policy/secomp" @@ -38,6 +40,10 @@ import ( ofst "kmodules.xyz/offshoot-api/api/v2" ) +func (d *Druid) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { + return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralDruid)) +} + func (d *Druid) Owner() *meta.OwnerReference { return meta.NewControllerRef(d, SchemeGroupVersion.WithKind(d.ResourceKind())) } diff --git a/apis/kubedb/v1alpha2/kafka_helpers.go b/apis/kubedb/v1alpha2/kafka_helpers.go index cc366c01f9..17c9c4e078 100644 --- a/apis/kubedb/v1alpha2/kafka_helpers.go +++ b/apis/kubedb/v1alpha2/kafka_helpers.go @@ -35,11 +35,12 @@ import ( "k8s.io/klog/v2" kmapi "kmodules.xyz/client-go/api/v1" "kmodules.xyz/client-go/apiextensions" + coreutil "kmodules.xyz/client-go/core/v1" 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/v1" + ofst "kmodules.xyz/offshoot-api/api/v2" ) func (k *Kafka) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { @@ -293,6 +294,23 @@ func (k *Kafka) SetDefaults() { k.Spec.StorageType = StorageTypeDurable } + var kfVersion catalog.KafkaVersion + err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: k.Spec.Version}, &kfVersion) + if err != nil { + klog.Errorf("can't get the kafka version object %s for %s \n", err.Error(), k.Spec.Version) + return + } + + k.setDefaultContainerSecurityContext(&kfVersion, &k.Spec.PodTemplate) + if k.Spec.CruiseControl != nil { + k.setDefaultContainerSecurityContext(&kfVersion, &k.Spec.CruiseControl.PodTemplate) + } + + k.Spec.Monitor.SetDefaults() + if k.Spec.Monitor != nil && k.Spec.Monitor.Prometheus != nil && k.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsUser == nil { + k.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsUser = kfVersion.Spec.SecurityContext.RunAsUser + } + if k.Spec.Topology != nil { if k.Spec.Topology.Controller != nil { if k.Spec.Topology.Controller.Suffix == "" { @@ -314,29 +332,15 @@ func (k *Kafka) SetDefaults() { apis.SetDefaultResourceLimits(&k.Spec.Topology.Broker.Resources, DefaultResources) } } else { - apis.SetDefaultResourceLimits(&k.Spec.PodTemplate.Spec.Resources, DefaultResources) + dbContainer := coreutil.GetContainerByName(k.Spec.PodTemplate.Spec.Containers, KafkaContainerName) + if dbContainer != nil { + apis.SetDefaultResourceLimits(&dbContainer.Resources, DefaultResources) + } if k.Spec.Replicas == nil { k.Spec.Replicas = pointer.Int32P(1) } } - var kfVersion catalog.KafkaVersion - err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: k.Spec.Version}, &kfVersion) - if err != nil { - klog.Errorf("can't get the kafka version object %s for %s \n", err.Error(), k.Spec.Version) - return - } - - k.setDefaultContainerSecurityContext(&kfVersion, &k.Spec.PodTemplate) - if k.Spec.CruiseControl != nil { - k.setDefaultContainerSecurityContext(&kfVersion, &k.Spec.CruiseControl.PodTemplate) - } - - k.Spec.Monitor.SetDefaults() - if k.Spec.Monitor != nil && k.Spec.Monitor.Prometheus != nil && k.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsUser == nil { - k.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsUser = kfVersion.Spec.SecurityContext.RunAsUser - } - if k.Spec.EnableSSL { k.SetTLSDefaults() } @@ -347,16 +351,24 @@ func (k *Kafka) setDefaultContainerSecurityContext(kfVersion *catalog.KafkaVersi if podTemplate == nil { return } - if podTemplate.Spec.ContainerSecurityContext == nil { - podTemplate.Spec.ContainerSecurityContext = &core.SecurityContext{} - } + if podTemplate.Spec.SecurityContext == nil { podTemplate.Spec.SecurityContext = &core.PodSecurityContext{} } if podTemplate.Spec.SecurityContext.FSGroup == nil { podTemplate.Spec.SecurityContext.FSGroup = kfVersion.Spec.SecurityContext.RunAsUser } - k.assignDefaultContainerSecurityContext(kfVersion, podTemplate.Spec.ContainerSecurityContext) + dbContainer := coreutil.GetContainerByName(podTemplate.Spec.Containers, KafkaContainerName) + if dbContainer == nil { + dbContainer = &core.Container{ + Name: KafkaContainerName, + } + podTemplate.Spec.Containers = append(podTemplate.Spec.Containers, *dbContainer) + } + if dbContainer.SecurityContext == nil { + dbContainer.SecurityContext = &core.SecurityContext{} + } + k.assignDefaultContainerSecurityContext(kfVersion, dbContainer.SecurityContext) } func (k *Kafka) assignDefaultContainerSecurityContext(kfVersion *catalog.KafkaVersion, sc *core.SecurityContext) { diff --git a/apis/kubedb/v1alpha2/kafka_types.go b/apis/kubedb/v1alpha2/kafka_types.go index f23f2e5815..23b8708cb3 100644 --- a/apis/kubedb/v1alpha2/kafka_types.go +++ b/apis/kubedb/v1alpha2/kafka_types.go @@ -21,7 +21,7 @@ import ( 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/v1" + ofst "kmodules.xyz/offshoot-api/api/v2" ) const ( diff --git a/apis/kubedb/v1alpha2/kafka_webhook.go b/apis/kubedb/v1alpha2/kafka_webhook.go index 4c77b57430..7159624e08 100644 --- a/apis/kubedb/v1alpha2/kafka_webhook.go +++ b/apis/kubedb/v1alpha2/kafka_webhook.go @@ -17,14 +17,19 @@ limitations under the License. package v1alpha2 import ( + "context" "errors" + catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" + errors2 "github.com/pkg/errors" "gomodules.xyz/pointer" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" + ofst "kmodules.xyz/offshoot-api/api/v2" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -122,7 +127,7 @@ func (k *Kafka) ValidateCreateOrUpdate() error { k.Name, "doesn't support spec.storage when spec.topology is set")) } - if k.Spec.PodTemplate.Spec.Resources.Size() != 0 { + if k.Spec.PodTemplate.Spec.Containers[0].Resources.Size() != 0 { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("resources"), k.Name, "doesn't support spec.podTemplate.spec.resources when spec.topology is set")) @@ -141,7 +146,7 @@ func (k *Kafka) ValidateCreateOrUpdate() error { } // validate that multiple nodes don't have same suffixes - err := validateNodeSuffix(k.Spec.Topology) + err := k.validateNodeSuffix(k.Spec.Topology) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("topology"), k.Name, @@ -149,7 +154,7 @@ func (k *Kafka) ValidateCreateOrUpdate() error { } // validate that node replicas are not 0 or negative - err = validateNodeReplicas(k.Spec.Topology) + err = k.validateNodeReplicas(k.Spec.Topology) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("topology"), k.Name, @@ -164,21 +169,21 @@ func (k *Kafka) ValidateCreateOrUpdate() error { } } - err := validateVersion(k) + err := k.validateVersion(k) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("version"), k.Name, err.Error())) } - err = validateVolumes(k) + err = k.validateVolumes(k) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumes"), k.Name, err.Error())) } - err = validateVolumesMountPaths(k) + err = k.validateVolumesMountPaths(&k.Spec.PodTemplate) if err != nil { allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumeMounts"), k.Name, @@ -203,26 +208,16 @@ func (k *Kafka) ValidateCreateOrUpdate() error { return apierrors.NewInvalid(schema.GroupKind{Group: "kafka.kubedb.com", Kind: "Kafka"}, k.Name, allErr) } -var availableVersions = []string{ - "3.3.0", - "3.3.2", - "3.4.0", - "3.4.1", - "3.5.1", - "3.6.0", -} - -func validateVersion(db *Kafka) error { - version := db.Spec.Version - for _, v := range availableVersions { - if v == version { - return nil - } +func (k *Kafka) validateVersion(db *Kafka) error { + kfVersion := &catalog.KafkaVersion{} + err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: db.Spec.Version}, kfVersion) + if err != nil { + return errors.New("version not supported") } - return errors.New("version not supported") + return nil } -func validateNodeSuffix(topology *KafkaClusterTopology) error { +func (k *Kafka) validateNodeSuffix(topology *KafkaClusterTopology) error { tMap := topology.ToMap() names := make(map[string]bool) for _, value := range tMap { @@ -234,7 +229,7 @@ func validateNodeSuffix(topology *KafkaClusterTopology) error { return nil } -func validateNodeReplicas(topology *KafkaClusterTopology) error { +func (k *Kafka) validateNodeReplicas(topology *KafkaClusterTopology) error { tMap := topology.ToMap() for key, node := range tMap { if pointer.Int32(node.Replicas) <= 0 { @@ -244,18 +239,18 @@ func validateNodeReplicas(topology *KafkaClusterTopology) error { return nil } -var reservedVolumes = []string{ +var kafkaReservedVolumes = []string{ KafkaVolumeData, KafkaVolumeConfig, KafkaVolumeTempConfig, } -func validateVolumes(db *Kafka) error { +func (k *Kafka) validateVolumes(db *Kafka) error { if db.Spec.PodTemplate.Spec.Volumes == nil { return nil } - rsv := make([]string, len(reservedVolumes)) - copy(rsv, reservedVolumes) + rsv := make([]string, len(kafkaReservedVolumes)) + copy(rsv, kafkaReservedVolumes) if db.Spec.TLS != nil && db.Spec.TLS.Certificates != nil { for _, c := range db.Spec.TLS.Certificates { rsv = append(rsv, db.CertSecretVolumeName(KafkaCertificateAlias(c.Alias))) @@ -272,7 +267,7 @@ func validateVolumes(db *Kafka) error { return nil } -var reservedVolumeMountPaths = []string{ +var kafkaReservedVolumeMountPaths = []string{ KafkaConfigDir, KafkaTempConfigDir, KafkaDataDir, @@ -280,18 +275,41 @@ var reservedVolumeMountPaths = []string{ KafkaCertDir, } -func validateVolumesMountPaths(db *Kafka) error { - if db.Spec.PodTemplate.Spec.VolumeMounts == nil { +func (k *Kafka) validateVolumesMountPaths(podTemplate *ofst.PodTemplateSpec) error { + if podTemplate == nil { + return nil + } + if podTemplate.Spec.Containers == nil { return nil } - rPaths := reservedVolumeMountPaths - volumeMountPaths := db.Spec.PodTemplate.Spec.VolumeMounts - for _, rvm := range rPaths { - for _, ugv := range volumeMountPaths { - if ugv.Name == rvm { - return errors.New("Cannot use a reserve volume name: " + rvm) + + for _, rvmp := range kafkaReservedVolumeMountPaths { + containerList := podTemplate.Spec.Containers + for i := range containerList { + mountPathList := containerList[i].VolumeMounts + for j := range mountPathList { + if mountPathList[j].MountPath == rvmp { + return errors.New("Can't use a reserve volume mount path name: " + rvmp) + } } } } + + if podTemplate.Spec.InitContainers == nil { + return nil + } + + for _, rvmp := range kafkaReservedVolumeMountPaths { + containerList := podTemplate.Spec.InitContainers + for i := range containerList { + mountPathList := containerList[i].VolumeMounts + for j := range mountPathList { + if mountPathList[j].MountPath == rvmp { + return errors.New("Can't use a reserve volume mount path name: " + rvmp) + } + } + } + } + return nil } diff --git a/apis/kubedb/v1alpha2/openapi_generated.go b/apis/kubedb/v1alpha2/openapi_generated.go index dd3c77b874..8382723c3b 100644 --- a/apis/kubedb/v1alpha2/openapi_generated.go +++ b/apis/kubedb/v1alpha2/openapi_generated.go @@ -552,6 +552,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLList": schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLList(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLSpec": schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLSpec(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.ProxySQLStatus": schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLStatus(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQ(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQList": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQList(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQSpec": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQSpec(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQStatus": schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQStatus(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitmqApp": schema_apimachinery_apis_kubedb_v1alpha2_RabbitmqApp(ref), + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitmqStatsService": schema_apimachinery_apis_kubedb_v1alpha2_RabbitmqStatsService(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RecoveryTarget": schema_apimachinery_apis_kubedb_v1alpha2_RecoveryTarget(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.Redis": schema_apimachinery_apis_kubedb_v1alpha2_Redis(ref), "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RedisClusterSpec": schema_apimachinery_apis_kubedb_v1alpha2_RedisClusterSpec(ref), @@ -24819,7 +24825,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_KafkaCruiseControl(ref common.Refe SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose database", Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), + Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), }, }, "brokerCapacity": { @@ -24832,7 +24838,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_KafkaCruiseControl(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceRequirements", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaBrokerCapacity", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + "k8s.io/api/core/v1.ResourceRequirements", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaBrokerCapacity", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -25044,7 +25050,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_KafkaSpec(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "PodTemplate is an optional configuration for pods used to expose database", Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec"), + Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), }, }, "serviceTemplates": { @@ -25092,7 +25098,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_KafkaSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v1.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaCruiseControl", "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/client-go/api/v1.TLSConfig", "kmodules.xyz/monitoring-agent-api/api/v1.AgentSpec", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaClusterTopology", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.KafkaCruiseControl", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, } } @@ -28510,6 +28516,301 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ProxySQLStatus(ref common.Referenc } } +func schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQ(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQStatus"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RabbitMQSpec defines the desired state of RabbitMQ", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version of RabbitMQ to be deployed.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Number of instances to deploy for a RabbitMQ database.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "storageType": { + SchemaProps: spec.SchemaProps{ + Description: "StorageType can be durable (default) or ephemeral", + Type: []string{"string"}, + Format: "", + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "Storage to specify how storage shall be used.", + Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + }, + }, + "enableSSL": { + SchemaProps: spec.SchemaProps{ + Description: "To enable ssl for http layer", + Type: []string{"boolean"}, + Format: "", + }, + }, + "disableSecurity": { + SchemaProps: spec.SchemaProps{ + Description: "disable security. It disables authentication security of user. If unset, default is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "authSecret": { + SchemaProps: spec.SchemaProps{ + Description: "Database authentication secret", + 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"), + }, + }, + "tls": { + SchemaProps: spec.SchemaProps{ + Description: "TLS contains tls configurations", + Ref: ref("kmodules.xyz/client-go/api/v1.TLSConfig"), + }, + }, + "podTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "PodTemplate is an optional configuration for pods used to expose database", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec"), + }, + }, + "serviceTemplates": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceTemplates is an optional configuration for services used to expose database", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec"), + }, + }, + }, + }, + }, + "halted": { + SchemaProps: spec.SchemaProps{ + Description: "Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "terminationPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "TerminationPolicy controls the delete operation for database", + Type: []string{"string"}, + Format: "", + }, + }, + "healthChecker": { + SchemaProps: spec.SchemaProps{ + Description: "HealthChecker defines attributes of the health checker", + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.HealthCheckSpec"), + }, + }, + }, + Required: []string{"version"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "kmodules.xyz/client-go/api/v1.HealthCheckSpec", "kmodules.xyz/client-go/api/v1.TLSConfig", "kmodules.xyz/offshoot-api/api/v2.PodTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.NamedServiceTemplateSpec", "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.SecretReference"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_RabbitMQStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RabbitMQStatus defines the observed state of RabbitMQ", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run \"make\" to regenerate code after modifying this file Specifies the current phase of the database", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed for this resource. It corresponds to the resource's generation, which is updated on mutation by the API Server.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions applied to the database, such as approval or denial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.Condition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.Condition"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_RabbitmqApp(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "RabbitMQ": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"), + }, + }, + }, + Required: []string{"RabbitMQ"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"}, + } +} + +func schema_apimachinery_apis_kubedb_v1alpha2_RabbitmqStatsService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "RabbitMQ": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"), + }, + }, + }, + Required: []string{"RabbitMQ"}, + }, + }, + Dependencies: []string{ + "kubedb.dev/apimachinery/apis/kubedb/v1alpha2.RabbitMQ"}, + } +} + func schema_apimachinery_apis_kubedb_v1alpha2_RecoveryTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/apis/kubedb/v1alpha2/rabbitmq_helpers.go b/apis/kubedb/v1alpha2/rabbitmq_helpers.go new file mode 100644 index 0000000000..c5056414ce --- /dev/null +++ b/apis/kubedb/v1alpha2/rabbitmq_helpers.go @@ -0,0 +1,278 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha2 + +import ( + "fmt" + "path/filepath" + "strings" + + "kubedb.dev/apimachinery/apis/kubedb" + "kubedb.dev/apimachinery/crds" + + promapi "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + "gomodules.xyz/pointer" + meta "k8s.io/apimachinery/pkg/apis/meta/v1" + kmapi "kmodules.xyz/client-go/api/v1" + "kmodules.xyz/client-go/apiextensions" + meta_util "kmodules.xyz/client-go/meta" + appcat "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1" + mona "kmodules.xyz/monitoring-agent-api/api/v1" +) + +func (r *RabbitMQ) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { + return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourcePluralRabbitmq)) +} + +type RabbitmqApp struct { + *RabbitMQ +} + +func (r RabbitmqApp) Name() string { + return r.RabbitMQ.Name +} + +func (r RabbitmqApp) Type() appcat.AppType { + return appcat.AppType(fmt.Sprintf("%s/%s", kubedb.GroupName, ResourceSingularRabbitmq)) +} + +func (r *RabbitMQ) AppBindingMeta() appcat.AppBindingMeta { + return &RabbitmqApp{r} +} + +func (r *RabbitMQ) GetConnectionScheme() string { + scheme := "http" + if r.Spec.EnableSSL { + scheme = "https" + } + return scheme +} + +func (r *RabbitMQ) ResourceShortCode() string { + return ResourceCodeRabbitmq +} + +func (r *RabbitMQ) ResourceKind() string { + return ResourceKindRabbitmq +} + +func (r *RabbitMQ) ResourceSingular() string { + return ResourceSingularRabbitmq +} + +func (r *RabbitMQ) ResourcePlural() string { + return ResourcePluralRabbitmq +} + +func (r *RabbitMQ) AsOwner() *meta.OwnerReference { + return meta.NewControllerRef(r, SchemeGroupVersion.WithKind(ResourceKindRabbitmq)) +} + +func (r *RabbitMQ) ResourceFQN() string { + return fmt.Sprintf("%s.%s", r.ResourcePlural(), kubedb.GroupName) +} + +// Owner returns owner reference to resources +func (r *RabbitMQ) Owner() *meta.OwnerReference { + return meta.NewControllerRef(r, SchemeGroupVersion.WithKind(r.ResourceKind())) +} + +func (r *RabbitMQ) OffshootName() string { + return r.Name +} + +func (r *RabbitMQ) ServiceName() string { + return r.OffshootName() +} + +func (r *RabbitMQ) GoverningServiceName() string { + return meta_util.NameWithSuffix(r.ServiceName(), "pods") +} + +func (r *RabbitMQ) StandbyServiceName() string { + return meta_util.NameWithPrefix(r.ServiceName(), KafkaStandbyServiceSuffix) +} + +func (r *RabbitMQ) offshootLabels(selector, override map[string]string) map[string]string { + selector[meta_util.ComponentLabelKey] = ComponentDatabase + return meta_util.FilterKeys(kubedb.GroupName, selector, meta_util.OverwriteKeys(nil, r.Labels, override)) +} + +func (r *RabbitMQ) OffshootSelectors(extraSelectors ...map[string]string) map[string]string { + selector := map[string]string{ + meta_util.NameLabelKey: r.ResourceFQN(), + meta_util.InstanceLabelKey: r.Name, + meta_util.ManagedByLabelKey: kubedb.GroupName, + } + return meta_util.OverwriteKeys(selector, extraSelectors...) +} + +func (r *RabbitMQ) OffshootLabels() map[string]string { + return r.offshootLabels(r.OffshootSelectors(), nil) +} + +func (r *RabbitMQ) ServiceLabels(alias ServiceAlias, extraLabels ...map[string]string) map[string]string { + svcTemplate := GetServiceTemplate(r.Spec.ServiceTemplates, alias) + return r.offshootLabels(meta_util.OverwriteKeys(r.OffshootSelectors(), extraLabels...), svcTemplate.Labels) +} + +type RabbitmqStatsService struct { + *RabbitMQ +} + +func (ks RabbitmqStatsService) TLSConfig() *promapi.TLSConfig { + return nil +} + +func (ks RabbitmqStatsService) GetNamespace() string { + return ks.RabbitMQ.GetNamespace() +} + +func (ks RabbitmqStatsService) ServiceName() string { + return ks.OffshootName() + "-stats" +} + +func (ks RabbitmqStatsService) ServiceMonitorName() string { + return ks.ServiceName() +} + +func (ks RabbitmqStatsService) ServiceMonitorAdditionalLabels() map[string]string { + return ks.OffshootLabels() +} + +func (ks RabbitmqStatsService) Path() string { + return DefaultStatsPath +} + +func (ks RabbitmqStatsService) Scheme() string { + return "" +} + +func (r *RabbitMQ) StatsService() mona.StatsAccessor { + return &RabbitmqStatsService{r} +} + +func (r *RabbitMQ) StatsServiceLabels() map[string]string { + return r.ServiceLabels(StatsServiceAlias, map[string]string{LabelRole: RoleStats}) +} + +func (r *RabbitMQ) PodControllerLabels(extraLabels ...map[string]string) map[string]string { + return r.offshootLabels(meta_util.OverwriteKeys(r.OffshootSelectors(), extraLabels...), r.Spec.PodTemplate.Controller.Labels) +} + +func (r *RabbitMQ) PodLabels(extraLabels ...map[string]string) map[string]string { + return r.offshootLabels(meta_util.OverwriteKeys(r.OffshootSelectors(), extraLabels...), r.Spec.PodTemplate.Labels) +} + +func (r *RabbitMQ) StatefulSetName() string { + return r.OffshootName() +} + +func (r *RabbitMQ) ServiceAccountName() string { + return r.OffshootName() +} + +func (r *RabbitMQ) DefaultPodRoleName() string { + return meta_util.NameWithSuffix(r.OffshootName(), "role") +} + +func (r *RabbitMQ) DefaultPodRoleBindingName() string { + return meta_util.NameWithSuffix(r.OffshootName(), "rolebinding") +} + +func (r *RabbitMQ) ConfigSecretName() string { + return meta_util.NameWithSuffix(r.OffshootName(), "config") +} + +func (r *RabbitMQ) DefaultUserCredSecretName(username string) string { + return meta_util.NameWithSuffix(r.Name, strings.ReplaceAll(fmt.Sprintf("%s-cred", username), "_", "-")) +} + +func (r *RabbitMQ) DefaultErlangCookieSecretName() string { + return meta_util.NameWithSuffix(r.OffshootName(), "erlang-cookie") +} + +// CertificateName returns the default certificate name and/or certificate secret name for a certificate alias +func (r *RabbitMQ) CertificateName(alias RabbitMQCertificateAlias) string { + return meta_util.NameWithSuffix(r.Name, fmt.Sprintf("%s-cert", string(alias))) +} + +// ClientCertificateCN returns the CN for a client certificate +func (r *RabbitMQ) ClientCertificateCN(alias RabbitMQCertificateAlias) string { + return fmt.Sprintf("%s-%s", r.Name, string(alias)) +} + +// GetCertSecretName returns the secret name for a certificate alias if any, +// otherwise returns default certificate secret name for the given alias. +func (r *RabbitMQ) GetCertSecretName(alias RabbitMQCertificateAlias) string { + if r.Spec.TLS != nil { + name, ok := kmapi.GetCertificateSecretName(r.Spec.TLS.Certificates, string(alias)) + if ok { + return name + } + } + return r.CertificateName(alias) +} + +// returns the CertSecretVolumeName +// Values will be like: client-certs, server-certs etc. +func (r *RabbitMQ) CertSecretVolumeName(alias RabbitMQCertificateAlias) string { + return string(alias) + "-certs" +} + +// returns CertSecretVolumeMountPath +// if configDir is "/opt/kafka/config", +// mountPath will be, "/opt/kafka/config/". +func (r *RabbitMQ) CertSecretVolumeMountPath(configDir string, cert string) string { + return filepath.Join(configDir, cert) +} + +func (r *RabbitMQ) PVCName(alias string) string { + return meta_util.NameWithSuffix(r.Name, alias) +} + +func (r *RabbitMQ) SetHealthCheckerDefaults() { + if r.Spec.HealthChecker.PeriodSeconds == nil { + r.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(10) + } + if r.Spec.HealthChecker.TimeoutSeconds == nil { + r.Spec.HealthChecker.TimeoutSeconds = pointer.Int32P(10) + } + if r.Spec.HealthChecker.FailureThreshold == nil { + r.Spec.HealthChecker.FailureThreshold = pointer.Int32P(3) + } +} + +func (r *RabbitMQ) SetDefaults() { + if r.Spec.TerminationPolicy == "" { + r.Spec.TerminationPolicy = TerminationPolicyDelete + } + + if r.Spec.StorageType == "" { + r.Spec.StorageType = StorageTypeDurable + } + + r.SetHealthCheckerDefaults() +} + +func (r *RabbitMQ) SetTLSDefaults() { + if r.Spec.TLS == nil || r.Spec.TLS.IssuerRef == nil { + return + } + r.Spec.TLS.Certificates = kmapi.SetMissingSecretNameForCertificate(r.Spec.TLS.Certificates, string(RabbitmqServerCert), r.CertificateName(RabbitmqServerCert)) + r.Spec.TLS.Certificates = kmapi.SetMissingSecretNameForCertificate(r.Spec.TLS.Certificates, string(RabbitmqClientCert), r.CertificateName(RabbitmqClientCert)) +} diff --git a/apis/kubedb/v1alpha2/rabbitmq_types.go b/apis/kubedb/v1alpha2/rabbitmq_types.go new file mode 100644 index 0000000000..e781c11e60 --- /dev/null +++ b/apis/kubedb/v1alpha2/rabbitmq_types.go @@ -0,0 +1,160 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha2 + +import ( + core "k8s.io/api/core/v1" + meta "k8s.io/apimachinery/pkg/apis/meta/v1" + kmapi "kmodules.xyz/client-go/api/v1" + ofst "kmodules.xyz/offshoot-api/api/v2" +) + +const ( + ResourceCodeRabbitmq = "rm" + ResourceKindRabbitmq = "RabbitMQ" + ResourceSingularRabbitmq = "rabbitmq" + ResourcePluralRabbitmq = "rabbitmqs" +) + +// RabbitMQ is the Schema for the RabbitMQ API + +// +genclient +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=rm,scope=Namespaced +// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".apiVersion" +// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +type RabbitMQ struct { + meta.TypeMeta `json:",inline"` + meta.ObjectMeta `json:"metadata,omitempty"` + + Spec RabbitMQSpec `json:"spec,omitempty"` + Status RabbitMQStatus `json:"status,omitempty"` +} + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// RabbitMQSpec defines the desired state of RabbitMQ +type RabbitMQSpec struct { + // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster + // Important: Run "make" to regenerate code after modifying this file + + // Version of RabbitMQ to be deployed. + Version string `json:"version"` + + // Number of instances to deploy for a RabbitMQ database. + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // StorageType can be durable (default) or ephemeral + StorageType StorageType `json:"storageType,omitempty"` + + // Storage to specify how storage shall be used. + Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` + + // To enable ssl for http layer + EnableSSL bool `json:"enableSSL,omitempty"` + + // disable security. It disables authentication security of user. + // If unset, default is false + // +optional + DisableSecurity bool `json:"disableSecurity,omitempty"` + + // Database authentication secret + // +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"` + + // TLS contains tls configurations + // +optional + TLS *kmapi.TLSConfig `json:"tls,omitempty"` + + // PodTemplate is an optional configuration for pods used to expose database + // +optional + PodTemplate ofst.PodTemplateSpec `json:"podTemplate,omitempty"` + + // ServiceTemplates is an optional configuration for services used to expose database + // +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"` + + // TerminationPolicy controls the delete operation for database + // +optional + TerminationPolicy TerminationPolicy `json:"terminationPolicy,omitempty"` + + // HealthChecker defines attributes of the health checker + // +optional + // +kubebuilder:default={periodSeconds: 20, timeoutSeconds: 10, failureThreshold: 3} + HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"` +} + +// RabbitMQStatus defines the observed state of RabbitMQ +type RabbitMQStatus struct { + // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster + // Important: Run "make" to regenerate code after modifying this file + // Specifies the current phase of the database + // +optional + Phase RabbitMQPhase `json:"phase,omitempty"` + // observedGeneration is the most recent generation observed for this resource. It corresponds to the + // resource's generation, which is updated on mutation by the API Server. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // Conditions applied to the database, such as approval or denial. + // +optional + Conditions []kmapi.Condition `json:"conditions,omitempty"` +} + +// +kubebuilder:validation:Enum=Provisioning;Ready;NotReady;Critical +type RabbitMQPhase string + +const ( + RabbitmqProvisioning RabbitMQPhase = "Provisioning" + RabbitmqReady RabbitMQPhase = "Ready" + RabbitmqNotReady RabbitMQPhase = "NotReady" + RabbitmqCritical RabbitMQPhase = "Critical" +) + +// +kubebuilder:validation:Enum=ca;client;server +type RabbitMQCertificateAlias string + +const ( + RabbitmqCACert RabbitMQCertificateAlias = "ca" + RabbitmqClientCert RabbitMQCertificateAlias = "client" + RabbitmqServerCert RabbitMQCertificateAlias = "server" +) + +// RabbitMQList contains a list of RabbitMQ + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type RabbitMQList struct { + meta.TypeMeta `json:",inline"` + meta.ListMeta `json:"metadata,omitempty"` + Items []RabbitMQ `json:"items"` +} diff --git a/apis/kubedb/v1alpha2/rabbitmq_webhook.go b/apis/kubedb/v1alpha2/rabbitmq_webhook.go new file mode 100644 index 0000000000..61a1842a40 --- /dev/null +++ b/apis/kubedb/v1alpha2/rabbitmq_webhook.go @@ -0,0 +1,228 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha2 + +import ( + "context" + "errors" + + catalog "kubedb.dev/apimachinery/apis/catalog/v1alpha1" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/validation/field" + ofst "kmodules.xyz/offshoot-api/api/v2" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// log is for logging in this package. +var rabbitmqlog = logf.Log.WithName("rabbitmq-resource") + +//+kubebuilder:webhook:path=/mutate-rabbitmq-kubedb-com-v1alpha1-rabbitmq,mutating=true,failurePolicy=fail,sideEffects=None,groups=kubedb.com,resources=rabbitmqs,verbs=create;update,versions=v1alpha1,name=mrabbitmq.kb.io,admissionReviewVersions={v1,v1beta1} + +var _ webhook.Defaulter = &RabbitMQ{} + +// Default implements webhook.Defaulter so a webhook will be registered for the type +func (r *RabbitMQ) Default() { + if r == nil { + return + } + rabbitmqlog.Info("default", "name", r.Name) + r.SetDefaults() +} + +//+kubebuilder:webhook:path=/validate-rabbitmq-kubedb-com-v1alpha1-rabbitmq,mutating=false,failurePolicy=fail,sideEffects=None,groups=kubedb.com,resources=rabbitmqs,verbs=create;update,versions=v1alpha1,name=vrabbitmq.kb.io,admissionReviewVersions={v1,v1beta1} + +var _ webhook.Validator = &RabbitMQ{} + +// ValidateCreate implements webhook.Validator so a webhook will be registered for the type +func (r *RabbitMQ) ValidateCreate() (admission.Warnings, error) { + rabbitmqlog.Info("validate create", "name", r.Name) + return nil, r.ValidateCreateOrUpdate() +} + +// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type +func (r *RabbitMQ) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + rabbitmqlog.Info("validate update", "name", r.Name) + return nil, r.ValidateCreateOrUpdate() +} + +// ValidateDelete implements webhook.Validator so a webhook will be registered for the type +func (r *RabbitMQ) ValidateDelete() (admission.Warnings, error) { + rabbitmqlog.Info("validate delete", "name", r.Name) + + // TODO(user): fill in your validation logic upon object deletion. + var allErr field.ErrorList + if r.Spec.TerminationPolicy == TerminationPolicyDoNotTerminate { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("teminationPolicy"), + r.Name, + "Can not delete as terminationPolicy is set to \"DoNotTerminate\"")) + return nil, apierrors.NewInvalid(schema.GroupKind{Group: "kafka.kubedb.com", Kind: "Kafka"}, r.Name, allErr) + } + return nil, nil +} + +func (r *RabbitMQ) ValidateCreateOrUpdate() error { + var allErr field.ErrorList + // TODO(user): fill in your validation logic upon object creation. + if r.Spec.EnableSSL { + if r.Spec.TLS == nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("enableSSL"), + r.Name, + ".spec.tls can't be nil, if .spec.enableSSL is true")) + } + } else { + if r.Spec.TLS != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("enableSSL"), + r.Name, + ".spec.tls must be nil, if .spec.enableSSL is disabled")) + } + } + + // number of replicas can not be 0 or less + if r.Spec.Replicas != nil && *r.Spec.Replicas <= 0 { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("replicas"), + r.Name, + "number of replicas can not be 0 or less")) + } + + err := r.ValidateVersion(r) + if err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("version"), + r.Name, + err.Error())) + } + + err = r.validateVolumes(r) + if err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumes"), + r.Name, + err.Error())) + } + + err = r.validateVolumesMountPaths(&r.Spec.PodTemplate) + if err != nil { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("podTemplate").Child("spec").Child("volumeMounts"), + r.Name, + err.Error())) + } + + if r.Spec.StorageType == "" { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("storageType"), + r.Name, + "StorageType can not be empty")) + } else { + if r.Spec.StorageType != StorageTypeDurable && r.Spec.StorageType != StorageTypeEphemeral { + allErr = append(allErr, field.Invalid(field.NewPath("spec").Child("storageType"), + r.Name, + "StorageType should be either durable or ephemeral")) + } + } + + if len(allErr) == 0 { + return nil + } + return apierrors.NewInvalid(schema.GroupKind{Group: "kafka.kubedb.com", Kind: "Kafka"}, r.Name, allErr) +} + +func (r *RabbitMQ) ValidateVersion(db *RabbitMQ) error { + rmVersion := catalog.RabbitMQVersion{} + err := DefaultClient.Get(context.TODO(), types.NamespacedName{Name: db.Spec.Version}, &rmVersion) + if err != nil { + return errors.New("version not supported") + } + return nil +} + +var rabbitmqReservedVolumes = []string{ + RabbitMQVolumeData, + RabbitMQVolumeConfig, + RabbitMQVolumeTempConfig, +} + +func (r *RabbitMQ) validateVolumes(db *RabbitMQ) error { + if db.Spec.PodTemplate.Spec.Volumes == nil { + return nil + } + rsv := make([]string, len(rabbitmqReservedVolumes)) + copy(rsv, rabbitmqReservedVolumes) + if db.Spec.TLS != nil && db.Spec.TLS.Certificates != nil { + for _, c := range db.Spec.TLS.Certificates { + rsv = append(rsv, db.CertSecretVolumeName(RabbitMQCertificateAlias(c.Alias))) + } + } + volumes := db.Spec.PodTemplate.Spec.Volumes + for _, rv := range rsv { + for _, ugv := range volumes { + if ugv.Name == rv { + return errors.New("Cannot use a reserve volume name: " + rv) + } + } + } + return nil +} + +var rabbitmqReservedVolumeMountPaths = []string{ + RabbitMQConfigDir, + RabbitMQTempConfigDir, + RabbitMQDataDir, + RabbitMQPluginsDir, + RabbitMQCertDir, +} + +func (r *RabbitMQ) validateVolumesMountPaths(podTemplate *ofst.PodTemplateSpec) error { + if podTemplate == nil { + return nil + } + if podTemplate.Spec.Containers == nil { + return nil + } + + for _, rvmp := range rabbitmqReservedVolumeMountPaths { + containerList := podTemplate.Spec.Containers + for i := range containerList { + mountPathList := containerList[i].VolumeMounts + for j := range mountPathList { + if mountPathList[j].MountPath == rvmp { + return errors.New("Can't use a reserve volume mount path name: " + rvmp) + } + } + } + } + + if podTemplate.Spec.InitContainers == nil { + return nil + } + + for _, rvmp := range rabbitmqReservedVolumeMountPaths { + containerList := podTemplate.Spec.InitContainers + for i := range containerList { + mountPathList := containerList[i].VolumeMounts + for j := range mountPathList { + if mountPathList[j].MountPath == rvmp { + return errors.New("Can't use a reserve volume mount path name: " + rvmp) + } + } + } + } + + return nil +} diff --git a/apis/kubedb/v1alpha2/register.go b/apis/kubedb/v1alpha2/register.go index d7ce21a06a..8f372a2873 100644 --- a/apis/kubedb/v1alpha2/register.go +++ b/apis/kubedb/v1alpha2/register.go @@ -80,6 +80,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PostgresList{}, &ProxySQL{}, &ProxySQLList{}, + &RabbitMQ{}, + &RabbitMQList{}, &Redis{}, &RedisList{}, &RedisSentinel{}, diff --git a/apis/kubedb/v1alpha2/singlestore_helpers.go b/apis/kubedb/v1alpha2/singlestore_helpers.go index 42308aebf7..91a30c0717 100644 --- a/apis/kubedb/v1alpha2/singlestore_helpers.go +++ b/apis/kubedb/v1alpha2/singlestore_helpers.go @@ -55,10 +55,18 @@ func (s *singlestoreApp) Type() appcat.AppType { return appcat.AppType(fmt.Sprintf("%s/%s", kubedb.GroupName, ResourceSingularSinglestore)) } +func (s *Singlestore) ResourceShortCode() string { + return ResourceCodeSinglestore +} + func (s *Singlestore) ResourceKind() string { return ResourceKindSinglestore } +func (s *Singlestore) ResourceSingular() string { + return ResourceSingularRabbitmq +} + func (s *Singlestore) ResourcePlural() string { return ResourcePluralSinglestore } diff --git a/apis/kubedb/v1alpha2/zz_generated.deepcopy.go b/apis/kubedb/v1alpha2/zz_generated.deepcopy.go index 2f634e954d..a3cf381b69 100644 --- a/apis/kubedb/v1alpha2/zz_generated.deepcopy.go +++ b/apis/kubedb/v1alpha2/zz_generated.deepcopy.go @@ -3405,6 +3405,182 @@ func (in *ProxySQLStatus) DeepCopy() *ProxySQLStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQ) DeepCopyInto(out *RabbitMQ) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQ. +func (in *RabbitMQ) DeepCopy() *RabbitMQ { + if in == nil { + return nil + } + out := new(RabbitMQ) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RabbitMQ) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQList) DeepCopyInto(out *RabbitMQList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RabbitMQ, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQList. +func (in *RabbitMQList) DeepCopy() *RabbitMQList { + if in == nil { + return nil + } + out := new(RabbitMQList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RabbitMQList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQSpec) DeepCopyInto(out *RabbitMQSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(corev1.PersistentVolumeClaimSpec) + (*in).DeepCopyInto(*out) + } + if in.AuthSecret != nil { + in, out := &in.AuthSecret, &out.AuthSecret + *out = new(SecretReference) + **out = **in + } + if in.ConfigSecret != nil { + in, out := &in.ConfigSecret, &out.ConfigSecret + *out = new(corev1.LocalObjectReference) + **out = **in + } + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(apiv1.TLSConfig) + (*in).DeepCopyInto(*out) + } + in.PodTemplate.DeepCopyInto(&out.PodTemplate) + if in.ServiceTemplates != nil { + in, out := &in.ServiceTemplates, &out.ServiceTemplates + *out = make([]NamedServiceTemplateSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.HealthChecker.DeepCopyInto(&out.HealthChecker) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQSpec. +func (in *RabbitMQSpec) DeepCopy() *RabbitMQSpec { + if in == nil { + return nil + } + out := new(RabbitMQSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitMQStatus) DeepCopyInto(out *RabbitMQStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]apiv1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitMQStatus. +func (in *RabbitMQStatus) DeepCopy() *RabbitMQStatus { + if in == nil { + return nil + } + out := new(RabbitMQStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitmqApp) DeepCopyInto(out *RabbitmqApp) { + *out = *in + if in.RabbitMQ != nil { + in, out := &in.RabbitMQ, &out.RabbitMQ + *out = new(RabbitMQ) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitmqApp. +func (in *RabbitmqApp) DeepCopy() *RabbitmqApp { + if in == nil { + return nil + } + out := new(RabbitmqApp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RabbitmqStatsService) DeepCopyInto(out *RabbitmqStatsService) { + *out = *in + if in.RabbitMQ != nil { + in, out := &in.RabbitMQ, &out.RabbitMQ + *out = new(RabbitMQ) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitmqStatsService. +func (in *RabbitmqStatsService) DeepCopy() *RabbitmqStatsService { + if in == nil { + return nil + } + out := new(RabbitmqStatsService) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RecoveryTarget) DeepCopyInto(out *RecoveryTarget) { *out = *in diff --git a/client/clientset/versioned/typed/catalog/v1alpha1/catalog_client.go b/client/clientset/versioned/typed/catalog/v1alpha1/catalog_client.go index 5bef33e6dc..4be8ad35ba 100644 --- a/client/clientset/versioned/typed/catalog/v1alpha1/catalog_client.go +++ b/client/clientset/versioned/typed/catalog/v1alpha1/catalog_client.go @@ -43,6 +43,7 @@ type CatalogV1alpha1Interface interface { PgpoolVersionsGetter PostgresVersionsGetter ProxySQLVersionsGetter + RabbitMQVersionsGetter RedisVersionsGetter SinglestoreVersionsGetter SolrVersionsGetter @@ -110,6 +111,10 @@ func (c *CatalogV1alpha1Client) ProxySQLVersions() ProxySQLVersionInterface { return newProxySQLVersions(c) } +func (c *CatalogV1alpha1Client) RabbitMQVersions() RabbitMQVersionInterface { + return newRabbitMQVersions(c) +} + func (c *CatalogV1alpha1Client) RedisVersions() RedisVersionInterface { return newRedisVersions(c) } diff --git a/client/clientset/versioned/typed/catalog/v1alpha1/fake/fake_catalog_client.go b/client/clientset/versioned/typed/catalog/v1alpha1/fake/fake_catalog_client.go index aec22e1341..8448037b5a 100644 --- a/client/clientset/versioned/typed/catalog/v1alpha1/fake/fake_catalog_client.go +++ b/client/clientset/versioned/typed/catalog/v1alpha1/fake/fake_catalog_client.go @@ -85,6 +85,10 @@ func (c *FakeCatalogV1alpha1) ProxySQLVersions() v1alpha1.ProxySQLVersionInterfa return &FakeProxySQLVersions{c} } +func (c *FakeCatalogV1alpha1) RabbitMQVersions() v1alpha1.RabbitMQVersionInterface { + return &FakeRabbitMQVersions{c} +} + func (c *FakeCatalogV1alpha1) RedisVersions() v1alpha1.RedisVersionInterface { return &FakeRedisVersions{c} } diff --git a/client/clientset/versioned/typed/catalog/v1alpha1/fake/fake_rabbitmqversion.go b/client/clientset/versioned/typed/catalog/v1alpha1/fake/fake_rabbitmqversion.go new file mode 100644 index 0000000000..5cc5c2d280 --- /dev/null +++ b/client/clientset/versioned/typed/catalog/v1alpha1/fake/fake_rabbitmqversion.go @@ -0,0 +1,122 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "kubedb.dev/apimachinery/apis/catalog/v1alpha1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeRabbitMQVersions implements RabbitMQVersionInterface +type FakeRabbitMQVersions struct { + Fake *FakeCatalogV1alpha1 +} + +var rabbitmqversionsResource = v1alpha1.SchemeGroupVersion.WithResource("rabbitmqversions") + +var rabbitmqversionsKind = v1alpha1.SchemeGroupVersion.WithKind("RabbitMQVersion") + +// Get takes name of the rabbitMQVersion, and returns the corresponding rabbitMQVersion object, and an error if there is any. +func (c *FakeRabbitMQVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RabbitMQVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(rabbitmqversionsResource, name), &v1alpha1.RabbitMQVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RabbitMQVersion), err +} + +// List takes label and field selectors, and returns the list of RabbitMQVersions that match those selectors. +func (c *FakeRabbitMQVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RabbitMQVersionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(rabbitmqversionsResource, rabbitmqversionsKind, opts), &v1alpha1.RabbitMQVersionList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.RabbitMQVersionList{ListMeta: obj.(*v1alpha1.RabbitMQVersionList).ListMeta} + for _, item := range obj.(*v1alpha1.RabbitMQVersionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested rabbitMQVersions. +func (c *FakeRabbitMQVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(rabbitmqversionsResource, opts)) +} + +// Create takes the representation of a rabbitMQVersion and creates it. Returns the server's representation of the rabbitMQVersion, and an error, if there is any. +func (c *FakeRabbitMQVersions) Create(ctx context.Context, rabbitMQVersion *v1alpha1.RabbitMQVersion, opts v1.CreateOptions) (result *v1alpha1.RabbitMQVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(rabbitmqversionsResource, rabbitMQVersion), &v1alpha1.RabbitMQVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RabbitMQVersion), err +} + +// Update takes the representation of a rabbitMQVersion and updates it. Returns the server's representation of the rabbitMQVersion, and an error, if there is any. +func (c *FakeRabbitMQVersions) Update(ctx context.Context, rabbitMQVersion *v1alpha1.RabbitMQVersion, opts v1.UpdateOptions) (result *v1alpha1.RabbitMQVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(rabbitmqversionsResource, rabbitMQVersion), &v1alpha1.RabbitMQVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RabbitMQVersion), err +} + +// Delete takes name of the rabbitMQVersion and deletes it. Returns an error if one occurs. +func (c *FakeRabbitMQVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(rabbitmqversionsResource, name, opts), &v1alpha1.RabbitMQVersion{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRabbitMQVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(rabbitmqversionsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.RabbitMQVersionList{}) + return err +} + +// Patch applies the patch and returns the patched rabbitMQVersion. +func (c *FakeRabbitMQVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RabbitMQVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(rabbitmqversionsResource, name, pt, data, subresources...), &v1alpha1.RabbitMQVersion{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RabbitMQVersion), err +} diff --git a/client/clientset/versioned/typed/catalog/v1alpha1/generated_expansion.go b/client/clientset/versioned/typed/catalog/v1alpha1/generated_expansion.go index 3549d92d4a..f79256a9e8 100644 --- a/client/clientset/versioned/typed/catalog/v1alpha1/generated_expansion.go +++ b/client/clientset/versioned/typed/catalog/v1alpha1/generated_expansion.go @@ -46,6 +46,8 @@ type PostgresVersionExpansion interface{} type ProxySQLVersionExpansion interface{} +type RabbitMQVersionExpansion interface{} + type RedisVersionExpansion interface{} type SinglestoreVersionExpansion interface{} diff --git a/client/clientset/versioned/typed/catalog/v1alpha1/rabbitmqversion.go b/client/clientset/versioned/typed/catalog/v1alpha1/rabbitmqversion.go new file mode 100644 index 0000000000..e4cebdd210 --- /dev/null +++ b/client/clientset/versioned/typed/catalog/v1alpha1/rabbitmqversion.go @@ -0,0 +1,169 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "kubedb.dev/apimachinery/apis/catalog/v1alpha1" + scheme "kubedb.dev/apimachinery/client/clientset/versioned/scheme" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// RabbitMQVersionsGetter has a method to return a RabbitMQVersionInterface. +// A group's client should implement this interface. +type RabbitMQVersionsGetter interface { + RabbitMQVersions() RabbitMQVersionInterface +} + +// RabbitMQVersionInterface has methods to work with RabbitMQVersion resources. +type RabbitMQVersionInterface interface { + Create(ctx context.Context, rabbitMQVersion *v1alpha1.RabbitMQVersion, opts v1.CreateOptions) (*v1alpha1.RabbitMQVersion, error) + Update(ctx context.Context, rabbitMQVersion *v1alpha1.RabbitMQVersion, opts v1.UpdateOptions) (*v1alpha1.RabbitMQVersion, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.RabbitMQVersion, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RabbitMQVersionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RabbitMQVersion, err error) + RabbitMQVersionExpansion +} + +// rabbitMQVersions implements RabbitMQVersionInterface +type rabbitMQVersions struct { + client rest.Interface +} + +// newRabbitMQVersions returns a RabbitMQVersions +func newRabbitMQVersions(c *CatalogV1alpha1Client) *rabbitMQVersions { + return &rabbitMQVersions{ + client: c.RESTClient(), + } +} + +// Get takes name of the rabbitMQVersion, and returns the corresponding rabbitMQVersion object, and an error if there is any. +func (c *rabbitMQVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RabbitMQVersion, err error) { + result = &v1alpha1.RabbitMQVersion{} + err = c.client.Get(). + Resource("rabbitmqversions"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of RabbitMQVersions that match those selectors. +func (c *rabbitMQVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RabbitMQVersionList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.RabbitMQVersionList{} + err = c.client.Get(). + Resource("rabbitmqversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested rabbitMQVersions. +func (c *rabbitMQVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("rabbitmqversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a rabbitMQVersion and creates it. Returns the server's representation of the rabbitMQVersion, and an error, if there is any. +func (c *rabbitMQVersions) Create(ctx context.Context, rabbitMQVersion *v1alpha1.RabbitMQVersion, opts v1.CreateOptions) (result *v1alpha1.RabbitMQVersion, err error) { + result = &v1alpha1.RabbitMQVersion{} + err = c.client.Post(). + Resource("rabbitmqversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(rabbitMQVersion). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a rabbitMQVersion and updates it. Returns the server's representation of the rabbitMQVersion, and an error, if there is any. +func (c *rabbitMQVersions) Update(ctx context.Context, rabbitMQVersion *v1alpha1.RabbitMQVersion, opts v1.UpdateOptions) (result *v1alpha1.RabbitMQVersion, err error) { + result = &v1alpha1.RabbitMQVersion{} + err = c.client.Put(). + Resource("rabbitmqversions"). + Name(rabbitMQVersion.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(rabbitMQVersion). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the rabbitMQVersion and deletes it. Returns an error if one occurs. +func (c *rabbitMQVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("rabbitmqversions"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *rabbitMQVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("rabbitmqversions"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched rabbitMQVersion. +func (c *rabbitMQVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RabbitMQVersion, err error) { + result = &v1alpha1.RabbitMQVersion{} + err = c.client.Patch(pt). + Resource("rabbitmqversions"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/clientset/versioned/typed/kubedb/v1alpha2/fake/fake_kubedb_client.go b/client/clientset/versioned/typed/kubedb/v1alpha2/fake/fake_kubedb_client.go index 16c009e0e4..83da38f72f 100644 --- a/client/clientset/versioned/typed/kubedb/v1alpha2/fake/fake_kubedb_client.go +++ b/client/clientset/versioned/typed/kubedb/v1alpha2/fake/fake_kubedb_client.go @@ -81,6 +81,10 @@ func (c *FakeKubedbV1alpha2) ProxySQLs(namespace string) v1alpha2.ProxySQLInterf return &FakeProxySQLs{c, namespace} } +func (c *FakeKubedbV1alpha2) RabbitMQs(namespace string) v1alpha2.RabbitMQInterface { + return &FakeRabbitMQs{c, namespace} +} + func (c *FakeKubedbV1alpha2) Redises(namespace string) v1alpha2.RedisInterface { return &FakeRedises{c, namespace} } diff --git a/client/clientset/versioned/typed/kubedb/v1alpha2/fake/fake_rabbitmq.go b/client/clientset/versioned/typed/kubedb/v1alpha2/fake/fake_rabbitmq.go new file mode 100644 index 0000000000..a9138f9c80 --- /dev/null +++ b/client/clientset/versioned/typed/kubedb/v1alpha2/fake/fake_rabbitmq.go @@ -0,0 +1,142 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha2 "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeRabbitMQs implements RabbitMQInterface +type FakeRabbitMQs struct { + Fake *FakeKubedbV1alpha2 + ns string +} + +var rabbitmqsResource = v1alpha2.SchemeGroupVersion.WithResource("rabbitmqs") + +var rabbitmqsKind = v1alpha2.SchemeGroupVersion.WithKind("RabbitMQ") + +// Get takes name of the rabbitMQ, and returns the corresponding rabbitMQ object, and an error if there is any. +func (c *FakeRabbitMQs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.RabbitMQ, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rabbitmqsResource, c.ns, name), &v1alpha2.RabbitMQ{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.RabbitMQ), err +} + +// List takes label and field selectors, and returns the list of RabbitMQs that match those selectors. +func (c *FakeRabbitMQs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.RabbitMQList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rabbitmqsResource, rabbitmqsKind, c.ns, opts), &v1alpha2.RabbitMQList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.RabbitMQList{ListMeta: obj.(*v1alpha2.RabbitMQList).ListMeta} + for _, item := range obj.(*v1alpha2.RabbitMQList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested rabbitMQs. +func (c *FakeRabbitMQs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rabbitmqsResource, c.ns, opts)) + +} + +// Create takes the representation of a rabbitMQ and creates it. Returns the server's representation of the rabbitMQ, and an error, if there is any. +func (c *FakeRabbitMQs) Create(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.CreateOptions) (result *v1alpha2.RabbitMQ, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rabbitmqsResource, c.ns, rabbitMQ), &v1alpha2.RabbitMQ{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.RabbitMQ), err +} + +// Update takes the representation of a rabbitMQ and updates it. Returns the server's representation of the rabbitMQ, and an error, if there is any. +func (c *FakeRabbitMQs) Update(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.UpdateOptions) (result *v1alpha2.RabbitMQ, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rabbitmqsResource, c.ns, rabbitMQ), &v1alpha2.RabbitMQ{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.RabbitMQ), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeRabbitMQs) UpdateStatus(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.UpdateOptions) (*v1alpha2.RabbitMQ, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(rabbitmqsResource, "status", c.ns, rabbitMQ), &v1alpha2.RabbitMQ{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.RabbitMQ), err +} + +// Delete takes name of the rabbitMQ and deletes it. Returns an error if one occurs. +func (c *FakeRabbitMQs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(rabbitmqsResource, c.ns, name, opts), &v1alpha2.RabbitMQ{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRabbitMQs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rabbitmqsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.RabbitMQList{}) + return err +} + +// Patch applies the patch and returns the patched rabbitMQ. +func (c *FakeRabbitMQs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.RabbitMQ, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rabbitmqsResource, c.ns, name, pt, data, subresources...), &v1alpha2.RabbitMQ{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha2.RabbitMQ), err +} diff --git a/client/clientset/versioned/typed/kubedb/v1alpha2/generated_expansion.go b/client/clientset/versioned/typed/kubedb/v1alpha2/generated_expansion.go index c5ab35ffb5..bfa6427694 100644 --- a/client/clientset/versioned/typed/kubedb/v1alpha2/generated_expansion.go +++ b/client/clientset/versioned/typed/kubedb/v1alpha2/generated_expansion.go @@ -44,6 +44,8 @@ type PostgresExpansion interface{} type ProxySQLExpansion interface{} +type RabbitMQExpansion interface{} + type RedisExpansion interface{} type RedisSentinelExpansion interface{} diff --git a/client/clientset/versioned/typed/kubedb/v1alpha2/kubedb_client.go b/client/clientset/versioned/typed/kubedb/v1alpha2/kubedb_client.go index 5410abfcec..43cfca3f8e 100644 --- a/client/clientset/versioned/typed/kubedb/v1alpha2/kubedb_client.go +++ b/client/clientset/versioned/typed/kubedb/v1alpha2/kubedb_client.go @@ -42,6 +42,7 @@ type KubedbV1alpha2Interface interface { PgpoolsGetter PostgresesGetter ProxySQLsGetter + RabbitMQsGetter RedisesGetter RedisSentinelsGetter SinglestoresGetter @@ -106,6 +107,10 @@ func (c *KubedbV1alpha2Client) ProxySQLs(namespace string) ProxySQLInterface { return newProxySQLs(c, namespace) } +func (c *KubedbV1alpha2Client) RabbitMQs(namespace string) RabbitMQInterface { + return newRabbitMQs(c, namespace) +} + func (c *KubedbV1alpha2Client) Redises(namespace string) RedisInterface { return newRedises(c, namespace) } diff --git a/client/clientset/versioned/typed/kubedb/v1alpha2/rabbitmq.go b/client/clientset/versioned/typed/kubedb/v1alpha2/rabbitmq.go new file mode 100644 index 0000000000..33a570babd --- /dev/null +++ b/client/clientset/versioned/typed/kubedb/v1alpha2/rabbitmq.go @@ -0,0 +1,196 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + "time" + + v1alpha2 "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" + scheme "kubedb.dev/apimachinery/client/clientset/versioned/scheme" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// RabbitMQsGetter has a method to return a RabbitMQInterface. +// A group's client should implement this interface. +type RabbitMQsGetter interface { + RabbitMQs(namespace string) RabbitMQInterface +} + +// RabbitMQInterface has methods to work with RabbitMQ resources. +type RabbitMQInterface interface { + Create(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.CreateOptions) (*v1alpha2.RabbitMQ, error) + Update(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.UpdateOptions) (*v1alpha2.RabbitMQ, error) + UpdateStatus(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.UpdateOptions) (*v1alpha2.RabbitMQ, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.RabbitMQ, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.RabbitMQList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.RabbitMQ, err error) + RabbitMQExpansion +} + +// rabbitMQs implements RabbitMQInterface +type rabbitMQs struct { + client rest.Interface + ns string +} + +// newRabbitMQs returns a RabbitMQs +func newRabbitMQs(c *KubedbV1alpha2Client, namespace string) *rabbitMQs { + return &rabbitMQs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the rabbitMQ, and returns the corresponding rabbitMQ object, and an error if there is any. +func (c *rabbitMQs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.RabbitMQ, err error) { + result = &v1alpha2.RabbitMQ{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rabbitmqs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of RabbitMQs that match those selectors. +func (c *rabbitMQs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.RabbitMQList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha2.RabbitMQList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rabbitmqs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested rabbitMQs. +func (c *rabbitMQs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("rabbitmqs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a rabbitMQ and creates it. Returns the server's representation of the rabbitMQ, and an error, if there is any. +func (c *rabbitMQs) Create(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.CreateOptions) (result *v1alpha2.RabbitMQ, err error) { + result = &v1alpha2.RabbitMQ{} + err = c.client.Post(). + Namespace(c.ns). + Resource("rabbitmqs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(rabbitMQ). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a rabbitMQ and updates it. Returns the server's representation of the rabbitMQ, and an error, if there is any. +func (c *rabbitMQs) Update(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.UpdateOptions) (result *v1alpha2.RabbitMQ, err error) { + result = &v1alpha2.RabbitMQ{} + err = c.client.Put(). + Namespace(c.ns). + Resource("rabbitmqs"). + Name(rabbitMQ.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(rabbitMQ). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *rabbitMQs) UpdateStatus(ctx context.Context, rabbitMQ *v1alpha2.RabbitMQ, opts v1.UpdateOptions) (result *v1alpha2.RabbitMQ, err error) { + result = &v1alpha2.RabbitMQ{} + err = c.client.Put(). + Namespace(c.ns). + Resource("rabbitmqs"). + Name(rabbitMQ.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(rabbitMQ). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the rabbitMQ and deletes it. Returns an error if one occurs. +func (c *rabbitMQs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rabbitmqs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *rabbitMQs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("rabbitmqs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched rabbitMQ. +func (c *rabbitMQs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.RabbitMQ, err error) { + result = &v1alpha2.RabbitMQ{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("rabbitmqs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/client/informers/externalversions/catalog/v1alpha1/interface.go b/client/informers/externalversions/catalog/v1alpha1/interface.go index 27080a3744..0efd4438fe 100644 --- a/client/informers/externalversions/catalog/v1alpha1/interface.go +++ b/client/informers/externalversions/catalog/v1alpha1/interface.go @@ -52,6 +52,8 @@ type Interface interface { PostgresVersions() PostgresVersionInformer // ProxySQLVersions returns a ProxySQLVersionInformer. ProxySQLVersions() ProxySQLVersionInformer + // RabbitMQVersions returns a RabbitMQVersionInformer. + RabbitMQVersions() RabbitMQVersionInformer // RedisVersions returns a RedisVersionInformer. RedisVersions() RedisVersionInformer // SinglestoreVersions returns a SinglestoreVersionInformer. @@ -143,6 +145,11 @@ func (v *version) ProxySQLVersions() ProxySQLVersionInformer { return &proxySQLVersionInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } +// RabbitMQVersions returns a RabbitMQVersionInformer. +func (v *version) RabbitMQVersions() RabbitMQVersionInformer { + return &rabbitMQVersionInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // RedisVersions returns a RedisVersionInformer. func (v *version) RedisVersions() RedisVersionInformer { return &redisVersionInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/client/informers/externalversions/catalog/v1alpha1/rabbitmqversion.go b/client/informers/externalversions/catalog/v1alpha1/rabbitmqversion.go new file mode 100644 index 0000000000..e5e71f8149 --- /dev/null +++ b/client/informers/externalversions/catalog/v1alpha1/rabbitmqversion.go @@ -0,0 +1,90 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + catalogv1alpha1 "kubedb.dev/apimachinery/apis/catalog/v1alpha1" + versioned "kubedb.dev/apimachinery/client/clientset/versioned" + internalinterfaces "kubedb.dev/apimachinery/client/informers/externalversions/internalinterfaces" + v1alpha1 "kubedb.dev/apimachinery/client/listers/catalog/v1alpha1" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// RabbitMQVersionInformer provides access to a shared informer and lister for +// RabbitMQVersions. +type RabbitMQVersionInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.RabbitMQVersionLister +} + +type rabbitMQVersionInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewRabbitMQVersionInformer constructs a new informer for RabbitMQVersion type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewRabbitMQVersionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredRabbitMQVersionInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredRabbitMQVersionInformer constructs a new informer for RabbitMQVersion type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredRabbitMQVersionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CatalogV1alpha1().RabbitMQVersions().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CatalogV1alpha1().RabbitMQVersions().Watch(context.TODO(), options) + }, + }, + &catalogv1alpha1.RabbitMQVersion{}, + resyncPeriod, + indexers, + ) +} + +func (f *rabbitMQVersionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredRabbitMQVersionInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *rabbitMQVersionInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&catalogv1alpha1.RabbitMQVersion{}, f.defaultInformer) +} + +func (f *rabbitMQVersionInformer) Lister() v1alpha1.RabbitMQVersionLister { + return v1alpha1.NewRabbitMQVersionLister(f.Informer().GetIndexer()) +} diff --git a/client/informers/externalversions/generic.go b/client/informers/externalversions/generic.go index c313bf6a70..c5192638e6 100644 --- a/client/informers/externalversions/generic.go +++ b/client/informers/externalversions/generic.go @@ -124,6 +124,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Catalog().V1alpha1().PostgresVersions().Informer()}, nil case catalogv1alpha1.SchemeGroupVersion.WithResource("proxysqlversions"): return &genericInformer{resource: resource.GroupResource(), informer: f.Catalog().V1alpha1().ProxySQLVersions().Informer()}, nil + case catalogv1alpha1.SchemeGroupVersion.WithResource("rabbitmqversions"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Catalog().V1alpha1().RabbitMQVersions().Informer()}, nil case catalogv1alpha1.SchemeGroupVersion.WithResource("redisversions"): return &genericInformer{resource: resource.GroupResource(), informer: f.Catalog().V1alpha1().RedisVersions().Informer()}, nil case catalogv1alpha1.SchemeGroupVersion.WithResource("singlestoreversions"): @@ -170,6 +172,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Kubedb().V1alpha2().Postgreses().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("proxysqls"): return &genericInformer{resource: resource.GroupResource(), informer: f.Kubedb().V1alpha2().ProxySQLs().Informer()}, nil + case v1alpha2.SchemeGroupVersion.WithResource("rabbitmqs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Kubedb().V1alpha2().RabbitMQs().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("redises"): return &genericInformer{resource: resource.GroupResource(), informer: f.Kubedb().V1alpha2().Redises().Informer()}, nil case v1alpha2.SchemeGroupVersion.WithResource("redissentinels"): diff --git a/client/informers/externalversions/kubedb/v1alpha2/interface.go b/client/informers/externalversions/kubedb/v1alpha2/interface.go index 0521fec802..7f20f3dc10 100644 --- a/client/informers/externalversions/kubedb/v1alpha2/interface.go +++ b/client/informers/externalversions/kubedb/v1alpha2/interface.go @@ -50,6 +50,8 @@ type Interface interface { Postgreses() PostgresInformer // ProxySQLs returns a ProxySQLInformer. ProxySQLs() ProxySQLInformer + // RabbitMQs returns a RabbitMQInformer. + RabbitMQs() RabbitMQInformer // Redises returns a RedisInformer. Redises() RedisInformer // RedisSentinels returns a RedisSentinelInformer. @@ -138,6 +140,11 @@ func (v *version) ProxySQLs() ProxySQLInformer { return &proxySQLInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// RabbitMQs returns a RabbitMQInformer. +func (v *version) RabbitMQs() RabbitMQInformer { + return &rabbitMQInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // Redises returns a RedisInformer. func (v *version) Redises() RedisInformer { return &redisInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/client/informers/externalversions/kubedb/v1alpha2/rabbitmq.go b/client/informers/externalversions/kubedb/v1alpha2/rabbitmq.go new file mode 100644 index 0000000000..dd0306a407 --- /dev/null +++ b/client/informers/externalversions/kubedb/v1alpha2/rabbitmq.go @@ -0,0 +1,91 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + time "time" + + kubedbv1alpha2 "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" + versioned "kubedb.dev/apimachinery/client/clientset/versioned" + internalinterfaces "kubedb.dev/apimachinery/client/informers/externalversions/internalinterfaces" + v1alpha2 "kubedb.dev/apimachinery/client/listers/kubedb/v1alpha2" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// RabbitMQInformer provides access to a shared informer and lister for +// RabbitMQs. +type RabbitMQInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha2.RabbitMQLister +} + +type rabbitMQInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewRabbitMQInformer constructs a new informer for RabbitMQ type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewRabbitMQInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredRabbitMQInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredRabbitMQInformer constructs a new informer for RabbitMQ type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredRabbitMQInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubedbV1alpha2().RabbitMQs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubedbV1alpha2().RabbitMQs(namespace).Watch(context.TODO(), options) + }, + }, + &kubedbv1alpha2.RabbitMQ{}, + resyncPeriod, + indexers, + ) +} + +func (f *rabbitMQInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredRabbitMQInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *rabbitMQInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&kubedbv1alpha2.RabbitMQ{}, f.defaultInformer) +} + +func (f *rabbitMQInformer) Lister() v1alpha2.RabbitMQLister { + return v1alpha2.NewRabbitMQLister(f.Informer().GetIndexer()) +} diff --git a/client/listers/catalog/v1alpha1/expansion_generated.go b/client/listers/catalog/v1alpha1/expansion_generated.go index d33cc43beb..44a0b82181 100644 --- a/client/listers/catalog/v1alpha1/expansion_generated.go +++ b/client/listers/catalog/v1alpha1/expansion_generated.go @@ -74,6 +74,10 @@ type PostgresVersionListerExpansion interface{} // ProxySQLVersionLister. type ProxySQLVersionListerExpansion interface{} +// RabbitMQVersionListerExpansion allows custom methods to be added to +// RabbitMQVersionLister. +type RabbitMQVersionListerExpansion interface{} + // RedisVersionListerExpansion allows custom methods to be added to // RedisVersionLister. type RedisVersionListerExpansion interface{} diff --git a/client/listers/catalog/v1alpha1/rabbitmqversion.go b/client/listers/catalog/v1alpha1/rabbitmqversion.go new file mode 100644 index 0000000000..1c66cb408b --- /dev/null +++ b/client/listers/catalog/v1alpha1/rabbitmqversion.go @@ -0,0 +1,69 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "kubedb.dev/apimachinery/apis/catalog/v1alpha1" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// RabbitMQVersionLister helps list RabbitMQVersions. +// All objects returned here must be treated as read-only. +type RabbitMQVersionLister interface { + // List lists all RabbitMQVersions in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.RabbitMQVersion, err error) + // Get retrieves the RabbitMQVersion from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.RabbitMQVersion, error) + RabbitMQVersionListerExpansion +} + +// rabbitMQVersionLister implements the RabbitMQVersionLister interface. +type rabbitMQVersionLister struct { + indexer cache.Indexer +} + +// NewRabbitMQVersionLister returns a new RabbitMQVersionLister. +func NewRabbitMQVersionLister(indexer cache.Indexer) RabbitMQVersionLister { + return &rabbitMQVersionLister{indexer: indexer} +} + +// List lists all RabbitMQVersions in the indexer. +func (s *rabbitMQVersionLister) List(selector labels.Selector) (ret []*v1alpha1.RabbitMQVersion, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.RabbitMQVersion)) + }) + return ret, err +} + +// Get retrieves the RabbitMQVersion from the index for a given name. +func (s *rabbitMQVersionLister) Get(name string) (*v1alpha1.RabbitMQVersion, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("rabbitmqversion"), name) + } + return obj.(*v1alpha1.RabbitMQVersion), nil +} diff --git a/client/listers/kubedb/v1alpha2/expansion_generated.go b/client/listers/kubedb/v1alpha2/expansion_generated.go index e8005e9275..10e97c865f 100644 --- a/client/listers/kubedb/v1alpha2/expansion_generated.go +++ b/client/listers/kubedb/v1alpha2/expansion_generated.go @@ -122,6 +122,14 @@ type ProxySQLListerExpansion interface{} // ProxySQLNamespaceLister. type ProxySQLNamespaceListerExpansion interface{} +// RabbitMQListerExpansion allows custom methods to be added to +// RabbitMQLister. +type RabbitMQListerExpansion interface{} + +// RabbitMQNamespaceListerExpansion allows custom methods to be added to +// RabbitMQNamespaceLister. +type RabbitMQNamespaceListerExpansion interface{} + // RedisListerExpansion allows custom methods to be added to // RedisLister. type RedisListerExpansion interface{} diff --git a/client/listers/kubedb/v1alpha2/rabbitmq.go b/client/listers/kubedb/v1alpha2/rabbitmq.go new file mode 100644 index 0000000000..a9b97042b8 --- /dev/null +++ b/client/listers/kubedb/v1alpha2/rabbitmq.go @@ -0,0 +1,100 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + v1alpha2 "kubedb.dev/apimachinery/apis/kubedb/v1alpha2" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// RabbitMQLister helps list RabbitMQs. +// All objects returned here must be treated as read-only. +type RabbitMQLister interface { + // List lists all RabbitMQs in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.RabbitMQ, err error) + // RabbitMQs returns an object that can list and get RabbitMQs. + RabbitMQs(namespace string) RabbitMQNamespaceLister + RabbitMQListerExpansion +} + +// rabbitMQLister implements the RabbitMQLister interface. +type rabbitMQLister struct { + indexer cache.Indexer +} + +// NewRabbitMQLister returns a new RabbitMQLister. +func NewRabbitMQLister(indexer cache.Indexer) RabbitMQLister { + return &rabbitMQLister{indexer: indexer} +} + +// List lists all RabbitMQs in the indexer. +func (s *rabbitMQLister) List(selector labels.Selector) (ret []*v1alpha2.RabbitMQ, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.RabbitMQ)) + }) + return ret, err +} + +// RabbitMQs returns an object that can list and get RabbitMQs. +func (s *rabbitMQLister) RabbitMQs(namespace string) RabbitMQNamespaceLister { + return rabbitMQNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RabbitMQNamespaceLister helps list and get RabbitMQs. +// All objects returned here must be treated as read-only. +type RabbitMQNamespaceLister interface { + // List lists all RabbitMQs in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha2.RabbitMQ, err error) + // Get retrieves the RabbitMQ from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha2.RabbitMQ, error) + RabbitMQNamespaceListerExpansion +} + +// rabbitMQNamespaceLister implements the RabbitMQNamespaceLister +// interface. +type rabbitMQNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all RabbitMQs in the indexer for a given namespace. +func (s rabbitMQNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.RabbitMQ, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha2.RabbitMQ)) + }) + return ret, err +} + +// Get retrieves the RabbitMQ from the indexer for a given namespace and name. +func (s rabbitMQNamespaceLister) Get(name string) (*v1alpha2.RabbitMQ, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha2.Resource("rabbitmq"), name) + } + return obj.(*v1alpha2.RabbitMQ), nil +} diff --git a/crds/catalog.kubedb.com_rabbitmqversions.yaml b/crds/catalog.kubedb.com_rabbitmqversions.yaml new file mode 100644 index 0000000000..ed8a9e344d --- /dev/null +++ b/crds/catalog.kubedb.com_rabbitmqversions.yaml @@ -0,0 +1,80 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: kubedb + name: rabbitmqversions.catalog.kubedb.com +spec: + group: catalog.kubedb.com + names: + categories: + - datastore + - kubedb + - appscode + kind: RabbitMQVersion + listKind: RabbitMQVersionList + plural: rabbitmqversions + shortNames: + - rmversion + singular: rabbitmqversion + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .spec.db.image + name: DB_IMAGE + type: string + - jsonPath: .spec.deprecated + name: Deprecated + type: boolean + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + db: + properties: + image: + type: string + required: + - image + type: object + deprecated: + type: boolean + initContainer: + properties: + image: + type: string + required: + - image + type: object + securityContext: + properties: + runAsUser: + format: int64 + type: integer + type: object + version: + type: string + required: + - db + - initContainer + - version + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/crds/kubedb.com_kafkas.yaml b/crds/kubedb.com_kafkas.yaml index 1cee501ea5..0fd5d602ed 100644 --- a/crds/kubedb.com_kafkas.yaml +++ b/crds/kubedb.com_kafkas.yaml @@ -98,6 +98,9 @@ spec: type: object spec: properties: + activeDeadlineSeconds: + format: int64 + type: integer affinity: properties: nodeAffinity: @@ -503,174 +506,9 @@ spec: type: array type: object type: object - args: - items: - type: string - type: array - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - 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: - type: string - optional: - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - hostIPC: - type: boolean - hostNetwork: - type: boolean - hostPID: + automountServiceAccountToken: type: boolean - imagePullSecrets: - items: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: + containers: items: properties: args: @@ -1306,1645 +1144,2867 @@ spec: - name type: object type: array - lifecycle: + dnsConfig: properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - 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: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: properties: - host: + name: 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 - type: object - httpGet: - properties: - host: + value: type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - 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 + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + 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: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object required: - - seconds + - name type: object - tcpSocket: + type: array + envFrom: + items: properties: - host: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: properties: - name: - type: string - value: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: type: string required: - - name - - value + - port type: object - type: array - 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 - nodeSelector: - additionalProperties: - type: string - type: object - x-kubernetes-map-type: atomic - priority: - format: int32 - type: integer - priorityClassName: - type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - 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: + httpGet: properties: - name: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: type: string - value: + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: type: string required: - - name - - value + - port type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - schedulerName: - type: string - securityContext: - properties: - 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 - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value + 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 - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - serviceAccountName: - type: string - 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: + name: type: string - type: object - type: array - topologySpreadConstraints: - items: - properties: - labelSelector: + 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: - matchExpressions: + exec: + properties: + command: + items: + type: string + type: array + 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 + 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: - key: - type: string - operator: + name: type: string - values: - items: - type: string - type: array required: - - key - - operator + - name type: object type: array - matchLabels: + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: additionalProperties: - type: string + 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 - x-kubernetes-map-type: atomic - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - format: int32 - type: integer - minDomains: - format: int32 - type: integer - nodeAffinityPolicy: - type: string - nodeTaintsPolicy: - type: string - topologyKey: - type: string - whenUnsatisfiable: - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - - whenUnsatisfiable - x-kubernetes-list-type: map - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: + restartPolicy: type: string - required: - - mountPath - - name - type: object - type: array - volumes: - items: - properties: - awsElasticBlockStore: + securityContext: properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: + allowPrivilegeEscalation: type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: type: string - readOnly: + readOnlyRootFilesystem: type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: + runAsGroup: + format: int64 + type: integer + runAsNonRoot: type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - name: + level: + type: string + role: + type: string + type: + type: string + user: 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: + seccompProfile: properties: - name: + localhostProfile: type: string + type: + type: string + required: + - type 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 - name: - type: string - optional: - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: + windowsOptions: properties: - name: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: type: string type: object - x-kubernetes-map-type: atomic - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver type: object - downwardAPI: + startupProbe: properties: - defaultMode: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: 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: + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: properties: - containerName: + name: 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: + value: type: string required: - - resource + - name + - value type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - 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: + type: array + 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: - 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 - 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 - required: - - key - - operator - type: object - type: array - 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 + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - spec + - port type: object - type: object - fc: - properties: - fsType: - type: string - lun: + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: format: int32 type: integer - readOnly: - type: boolean - targetWWNs: - items: + 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 - type: array - wwids: - items: + name: type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - 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: + mountPropagation: type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: 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: + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostUsers: + type: boolean + imagePullSecrets: + items: + properties: + name: + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: properties: - clusterTrustBundle: + configMapKeyRef: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic + key: + type: string name: type: string optional: type: boolean - path: - type: string - signerName: - type: string required: - - path + - key type: object - configMap: + x-kubernetes-map-type: atomic + fieldRef: properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: + apiVersion: type: string - optional: - type: boolean + fieldPath: + type: string + required: + - fieldPath 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 - type: object - secret: + resourceFieldRef: properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: + containerName: type: string - optional: - type: boolean + 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 - serviceAccountToken: + secretKeyRef: properties: - audience: + key: type: string - expirationSeconds: - format: int64 - type: integer - path: + name: type: string + optional: + type: boolean required: - - path + - key type: object + x-kubernetes-map-type: atomic type: object - type: array - 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: + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: properties: - name: - type: string + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 - 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: + preStop: properties: - name: - type: string + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 - 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: + livenessProbe: properties: - defaultMode: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: 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 - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: + grpc: properties: - name: + port: + format: int32 + type: integer + service: type: string + required: + - port 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 - 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 - suffix: - type: string - type: object - disableSecurity: - type: boolean - enableSSL: - type: boolean - healthChecker: - default: - failureThreshold: 3 - periodSeconds: 20 - timeoutSeconds: 10 - properties: - disableWriteCheck: - type: boolean - failureThreshold: - default: 1 - format: int32 - type: integer - periodSeconds: - default: 10 - format: int32 - type: integer - timeoutSeconds: - default: 10 - format: int32 - type: integer - type: object - keystoreCredSecret: - properties: - externallyManaged: - type: boolean - name: - type: string - type: object - x-kubernetes-map-type: atomic - 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: + httpGet: properties: - key: + host: type: string - name: + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: type: string - optional: - type: boolean required: - - key + - port type: object - x-kubernetes-map-type: atomic - fieldRef: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - apiVersion: + host: type: string - fieldPath: + 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 + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: type: string required: - - fieldPath + - port type: object - x-kubernetes-map-type: atomic - resourceFieldRef: + httpGet: properties: - containerName: + host: type: string - divisor: + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - resource: + scheme: type: string required: - - resource + - port type: object - x-kubernetes-map-type: atomic - secretKeyRef: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - key: - type: string - name: + host: type: string - optional: - type: boolean + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - key + - port type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - port: - default: 56790 - format: int32 - type: integer - resources: - properties: - claims: - items: + 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: - name: - type: string - required: - - name + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object type: object - type: 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 - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - 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: - 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: - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + restartPolicy: + type: string + securityContext: properties: - preference: + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - matchExpressions: + add: items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object + type: string type: array - matchFields: + drop: items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object + type: string type: array type: object - x-kubernetes-map-type: atomic - weight: - format: int32 + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - matchExpressions: + 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: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object + type: string type: array - matchFields: + 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: - key: + name: type: string - operator: + value: type: string - values: - items: - type: string - type: array required: - - key - - operator + - name + - value type: object type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic + 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 + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + nodeName: + type: string + nodeSelector: + additionalProperties: + type: string type: object - podAffinity: + x-kubernetes-map-type: atomic + os: properties: - preferredDuringSchedulingIgnoredDuringExecution: + 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 + 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: + 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 + sysctls: items: properties: - podAffinityTerm: - properties: - labelSelector: - properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + 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 + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + 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: + 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 + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + 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 + 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 + 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 + required: + - key + - operator + type: object + type: array + 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 + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + 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 + readOnly: + type: boolean + secretRef: + properties: + name: + 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 + required: + - key + - operator + type: object + type: array + 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 + name: + 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 + 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 + name: + 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 + 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 + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + 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: + 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 + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + 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 + 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 + suffix: + type: string + type: object + disableSecurity: + type: boolean + enableSSL: + type: boolean + healthChecker: + default: + failureThreshold: 3 + periodSeconds: 20 + timeoutSeconds: 10 + properties: + disableWriteCheck: + type: boolean + failureThreshold: + default: 1 + format: int32 + type: integer + periodSeconds: + default: 10 + format: int32 + type: integer + timeoutSeconds: + default: 10 + format: int32 + type: integer + type: object + keystoreCredSecret: + properties: + externallyManaged: + type: boolean + name: + type: string + type: object + x-kubernetes-map-type: atomic + 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: + 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: + 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 + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + 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: + 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 + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: matchExpressions: items: properties: @@ -2964,446 +4024,1418 @@ spec: matchLabels: additionalProperties: type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + 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: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + type: object + httpGet: + properties: + host: + type: string + httpHeaders: items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + 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 + 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 + 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 + 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 + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + 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 + 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 - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - items: + value: type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: + required: + - name + - value + type: object + type: array + 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 + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + 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: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: items: type: string type: array - topologyKey: - type: string - required: - - topologyKey type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: + httpGet: properties: - matchExpressions: + host: + type: string + httpHeaders: items: properties: - key: + name: type: string - operator: + value: type: string - values: - items: - type: string - type: array required: - - key - - operator + - name + - value type: object type: array - matchLabels: - additionalProperties: + 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: object + type: array type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: + httpGet: properties: - matchExpressions: + host: + type: string + httpHeaders: items: properties: - key: + name: type: string - operator: + value: type: string - values: - items: - type: string - type: array required: - - key - - operator + - name + - value type: object type: array - matchLabels: - additionalProperties: - type: string - type: object + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port type: object - x-kubernetes-map-type: atomic - namespaces: + 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 + 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 + 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 - topologyKey: + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: type: string required: - - topologyKey + - port type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: + httpGet: properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - items: + host: + type: string + httpHeaders: + items: + properties: + name: type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - items: + value: type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string required: - - podAffinityTerm - - weight + - port type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - items: + 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 - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: + 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 + capabilities: + properties: + add: items: type: string type: array - x-kubernetes-list-type: atomic - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: + drop: items: type: string type: array - topologyKey: - type: string - required: - - topologyKey type: object - type: array - type: object - type: object - args: - items: - type: string - type: array - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: + privileged: + type: boolean + procMount: type: string - type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - key: + level: type: string - name: + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: type: string - optional: - type: boolean required: - - key + - type type: object - x-kubernetes-map-type: atomic - fieldRef: + windowsOptions: properties: - apiVersion: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: type: string - fieldPath: + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: type: string required: - - fieldPath + - port type: object - x-kubernetes-map-type: atomic - resourceFieldRef: + httpGet: properties: - containerName: + host: type: string - divisor: + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - resource: + scheme: type: string required: - - resource + - port type: object - x-kubernetes-map-type: atomic - secretKeyRef: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - key: - type: string - name: + host: type: string - optional: - type: boolean + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - key + - port type: object - x-kubernetes-map-type: atomic + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer type: object + stdin: + type: boolean + stdinOnce: + type: boolean + targetContainerName: + type: string + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string required: - name type: object type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array hostIPC: type: boolean hostNetwork: type: boolean hostPID: type: boolean + hostUsers: + type: boolean imagePullSecrets: items: properties: @@ -4048,322 +6080,46 @@ spec: - name type: object type: array - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - 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 - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - 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 - 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 - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object + nodeName: + type: string nodeSelector: additionalProperties: type: string type: object x-kubernetes-map-type: atomic + os: + properties: + name: + type: string + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + preemptionPolicy: + type: string priority: format: int32 type: integer priorityClassName: type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - 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 - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + type: string runtimeClassName: type: string schedulerName: @@ -4434,6 +6190,8 @@ spec: type: object serviceAccountName: type: string + setHostnameAsFQDN: + type: boolean shareProcessNamespace: type: boolean terminationGracePeriodSeconds: @@ -4511,26 +6269,6 @@ spec: - topologyKey - whenUnsatisfiable x-kubernetes-list-type: map - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array volumes: items: properties: diff --git a/crds/kubedb.com_rabbitmqs.yaml b/crds/kubedb.com_rabbitmqs.yaml new file mode 100644 index 0000000000..fa880c8dd8 --- /dev/null +++ b/crds/kubedb.com_rabbitmqs.yaml @@ -0,0 +1,3756 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: kubedb + name: rabbitmqs.kubedb.com +spec: + group: kubedb.com + names: + kind: RabbitMQ + listKind: RabbitMQList + plural: rabbitmqs + shortNames: + - rm + singular: rabbitmq + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .apiVersion + name: Type + type: string + - jsonPath: .spec.version + name: Version + type: string + - jsonPath: .status.phase + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + authSecret: + properties: + externallyManaged: + type: boolean + name: + type: string + type: object + x-kubernetes-map-type: atomic + configSecret: + properties: + name: + type: string + type: object + x-kubernetes-map-type: atomic + disableSecurity: + type: boolean + enableSSL: + type: boolean + halted: + type: boolean + healthChecker: + default: + failureThreshold: 3 + periodSeconds: 20 + timeoutSeconds: 10 + properties: + disableWriteCheck: + type: boolean + failureThreshold: + default: 1 + format: int32 + type: integer + periodSeconds: + default: 10 + format: int32 + type: integer + timeoutSeconds: + default: 10 + format: int32 + type: integer + type: object + podTemplate: + properties: + controller: + 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 + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + type: boolean + containers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + 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: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + 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 + 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 + 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 + 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 + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + 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 + 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 + 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 + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + 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: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + 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 + 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 + 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 + 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 + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + 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 + 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 + 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 + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + ip: + type: string + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + hostUsers: + type: boolean + imagePullSecrets: + items: + properties: + name: + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + 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: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + 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 + 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 + 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 + 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 + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + 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 + 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 + 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 + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + 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 + 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: + 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 + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + 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 + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + 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 + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + 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: + 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 + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + 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 + 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 + 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 + required: + - key + - operator + type: object + type: array + 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 + wwids: + items: + type: string + type: array + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + 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 + readOnly: + type: boolean + secretRef: + properties: + name: + 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 + required: + - key + - operator + type: object + type: array + 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 + name: + 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 + 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 + name: + 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 + 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 + pool: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + 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: + 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 + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + 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 + serviceTemplates: + items: + properties: + alias: + enum: + - primary + - standby + - stats + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + clusterIP: + type: string + externalIPs: + items: + type: string + type: array + externalTrafficPolicy: + type: string + healthCheckNodePort: + format: int32 + type: integer + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + ports: + items: + properties: + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object + type: array + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + required: + - alias + type: object + type: array + storage: + properties: + accessModes: + items: + type: string + type: array + 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 + required: + - key + - operator + type: object + type: array + 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 + terminationPolicy: + enum: + - Halt + - Delete + - WipeOut + - DoNotTerminate + type: string + tls: + properties: + certificates: + items: + properties: + alias: + type: string + dnsNames: + items: + type: string + type: array + duration: + type: string + emailAddresses: + items: + type: string + type: array + ipAddresses: + items: + type: string + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + privateKey: + properties: + encoding: + enum: + - PKCS1 + - PKCS8 + type: string + type: object + renewBefore: + type: string + secretName: + type: string + subject: + properties: + countries: + items: + type: string + type: array + localities: + items: + type: string + type: array + organizationalUnits: + items: + type: string + type: array + organizations: + items: + type: string + type: array + postalCodes: + items: + type: string + type: array + provinces: + items: + type: string + type: array + serialNumber: + type: string + streetAddresses: + items: + type: string + type: array + type: object + uris: + items: + type: string + type: array + required: + - alias + type: object + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: object + version: + type: string + required: + - version + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + message: + type: string + observedGeneration: + format: int64 + type: integer + reason: + type: string + severity: + type: string + status: + type: string + type: + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + observedGeneration: + format: int64 + type: integer + phase: + enum: + - Provisioning + - Ready + - NotReady + - Critical + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {}