diff --git a/.chainsaw.yaml b/.chainsaw.yaml index c05eb78..f3c8ee8 100644 --- a/.chainsaw.yaml +++ b/.chainsaw.yaml @@ -12,5 +12,4 @@ spec: error: 10s exec: 45s # skipDelete: true - parallel: 1 failFast: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 48f44b0..23f5613 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -6,7 +6,7 @@ body: - type: markdown attributes: value: | - First, check out our [Collaboration Guide](https://zncdata.dev/docs/developer-manual/collaboration) + First, check out our [Collaboration Guide](https://kubedoop.dev/docs/developer-manual/collaboration) Please provide a searchable summary of the issue in the title above ⬆️. - type: dropdown attributes: @@ -27,4 +27,4 @@ body: - type: textarea attributes: label: Motivation 🔦 - description: What are you trying to accomplish? How has the lack of this feature affected you? Providing context helps us come up with a solution that is more useful in the real world. \ No newline at end of file + description: What are you trying to accomplish? How has the lack of this feature affected you? Providing context helps us come up with a solution that is more useful in the real world. diff --git a/PROJECT b/PROJECT index 181df0c..f1397fb 100644 --- a/PROJECT +++ b/PROJECT @@ -2,7 +2,7 @@ # This file is used to track the info used to scaffold your project # and allow the plugins properly work. # More info: https://book.kubebuilder.io/reference/project-config.html -domain: zncdata.dev +domain: kubedoop.dev layout: - go.kubebuilder.io/v4 projectName: hive-operator @@ -12,7 +12,7 @@ resources: crdVersion: v1 namespaced: true controller: true - domain: zncdata.dev + domain: kubedoop.dev kind: HiveMetastore path: github.com/zncdatadev/hive-operator/api/v1alpha1 version: v1alpha1 diff --git a/README.md b/README.md index f1f3b21..cf37f0f 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Kubedoop built-in operators: ## Contributing -If you'd like to contribute to Kubedoop, please refer to our [Contributing Guide](https://zncdata.dev/docs/developer-manual/collaboration) for more information. +If you'd like to contribute to Kubedoop, please refer to our [Contributing Guide](https://kubedoop.dev/docs/developer-manual/collaboration) for more information. We welcome contributions of all kinds, including but not limited to code, documentation, and use cases. ## License diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index b91b078..29293dd 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -16,7 +16,7 @@ limitations under the License. // Package v1alpha1 contains API Schema definitions for the v1alpha1 API group // +kubebuilder:object:generate=true -// +groupName=zncdata.dev +// +groupName=kubedoop.dev package v1alpha1 import ( @@ -26,7 +26,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "zncdata.dev", Version: "v1alpha1"} + GroupVersion = schema.GroupVersion{Group: "kubedoop.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/api/v1alpha1/hivemetastore_types.go b/api/v1alpha1/hivemetastore_types.go index 69b7b13..a47a346 100644 --- a/api/v1alpha1/hivemetastore_types.go +++ b/api/v1alpha1/hivemetastore_types.go @@ -19,7 +19,7 @@ package v1alpha1 import ( commonsv1alpha1 "github.com/zncdatadev/operator-go/pkg/apis/commons/v1alpha1" s3v1alpha1 "github.com/zncdatadev/operator-go/pkg/apis/s3/v1alpha1" - corev1 "k8s.io/api/core/v1" + "github.com/zncdatadev/operator-go/pkg/constants" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -77,7 +77,7 @@ type ClusterConfigSpec struct { // +kubebuilder:validation:Optional // +kubebuilder:default:=cluster-internal // +kubebuilder:validation:Enum=cluster-internal;external-unstable;external-stable - ListenerClass string `json:"listenerClass,omitempty"` + ListenerClass constants.ListenerClass `json:"listenerClass,omitempty"` // +kubebuilder:validation:Optional HDFS *HDFSSpec `json:"hdfs,omitempty"` @@ -153,41 +153,15 @@ type RoleSpec struct { // +kubebuilder:validation:Optional RoleConfig *commonsv1alpha1.RoleConfigSpec `json:"roleConfig,omitempty"` - // +kubebuilder:validation:Optional - CliOverrides []string `json:"cliOverrides,omitempty"` - - // - hdfs-site.xml - // - core-site.xml - // +kubebuilder:validation:Optional - ConfigOverrides map[string]string `json:"configOverrides,omitempty"` - - // +kubebuilder:validation:Optional - EnvOverrides map[string]string `json:"envOverrides,omitempty"` - - // +kubebuilder:validation:Optional - // PodOverride *corev1.PodTemplateSpec `json:"podOverride,omitempty"` + *commonsv1alpha1.OverridesSpec `json:",inline"` } type ConfigSpec struct { - // +kubebuilder:validation:Optional - Resources *commonsv1alpha1.ResourcesSpec `json:"resources,omitempty"` - - // +kubebuilder:validation:Optional - Affinity *corev1.Affinity `json:"affinity"` - - // +kubebuilder:validation:Optional - PodDisruptionBudget *commonsv1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` - - // Use time.ParseDuration to parse the string - // +kubebuilder:validation:Optional - GracefulShutdownTimeout *string `json:"gracefulShutdownTimeout,omitempty"` + *commonsv1alpha1.RoleGroupConfigSpec `json:",inline"` // +kubebuilder:validation:Optional // +kubebuilder:default:="/kubedoop/warehouse" WarehouseDir string `json:"warehouseDir,omitempty"` - - // +kubebuilder:validation:Optional - Logging *LoggingSpec `json:"logging,omitempty"` } type RoleGroupSpec struct { @@ -198,17 +172,7 @@ type RoleGroupSpec struct { // +kubebuilder:validation:Optional Config *ConfigSpec `json:"config,omitempty"` - // +kubebuilder:validation:Optional - CliOverrides []string `json:"cliOverrides,omitempty"` - - // +kubebuilder:validation:Optional - ConfigOverrides map[string]string `json:"configOverrides,omitempty"` - - // +kubebuilder:validation:Optional - EnvOverrides map[string]string `json:"envOverrides,omitempty"` - - // +kubebuilder:validation:Optional - // PodOverride *corev1.PodTemplateSpec `json:"podOverride,omitempty"` + *commonsv1alpha1.OverridesSpec `json:",inline"` } // HiveMetastoreStatus defines the observed state of HiveMetastore diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index eed32e0..9870f9e 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -23,8 +23,7 @@ package v1alpha1 import ( commonsv1alpha1 "github.com/zncdatadev/operator-go/pkg/apis/commons/v1alpha1" s3v1alpha1 "github.com/zncdatadev/operator-go/pkg/apis/s3/v1alpha1" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -91,29 +90,9 @@ func (in *ClusterConfigSpec) DeepCopy() *ClusterConfigSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec) { *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(commonsv1alpha1.ResourcesSpec) - (*in).DeepCopyInto(*out) - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(v1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.PodDisruptionBudget != nil { - in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget - *out = new(commonsv1alpha1.PodDisruptionBudgetSpec) - (*in).DeepCopyInto(*out) - } - if in.GracefulShutdownTimeout != nil { - in, out := &in.GracefulShutdownTimeout, &out.GracefulShutdownTimeout - *out = new(string) - **out = **in - } - if in.Logging != nil { - in, out := &in.Logging, &out.Logging - *out = new(LoggingSpec) + if in.RoleGroupConfigSpec != nil { + in, out := &in.RoleGroupConfigSpec, &out.RoleGroupConfigSpec + *out = new(commonsv1alpha1.RoleGroupConfigSpec) (*in).DeepCopyInto(*out) } } @@ -257,7 +236,7 @@ func (in *HiveMetastoreStatus) DeepCopyInto(out *HiveMetastoreStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) + *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -334,24 +313,10 @@ func (in *RoleGroupSpec) DeepCopyInto(out *RoleGroupSpec) { *out = new(ConfigSpec) (*in).DeepCopyInto(*out) } - if in.CliOverrides != nil { - in, out := &in.CliOverrides, &out.CliOverrides - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ConfigOverrides != nil { - in, out := &in.ConfigOverrides, &out.ConfigOverrides - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.EnvOverrides != nil { - in, out := &in.EnvOverrides, &out.EnvOverrides - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + if in.OverridesSpec != nil { + in, out := &in.OverridesSpec, &out.OverridesSpec + *out = new(commonsv1alpha1.OverridesSpec) + (*in).DeepCopyInto(*out) } } @@ -394,24 +359,10 @@ func (in *RoleSpec) DeepCopyInto(out *RoleSpec) { *out = new(commonsv1alpha1.RoleConfigSpec) (*in).DeepCopyInto(*out) } - if in.CliOverrides != nil { - in, out := &in.CliOverrides, &out.CliOverrides - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ConfigOverrides != nil { - in, out := &in.ConfigOverrides, &out.ConfigOverrides - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.EnvOverrides != nil { - in, out := &in.EnvOverrides, &out.EnvOverrides - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } + if in.OverridesSpec != nil { + in, out := &in.OverridesSpec, &out.OverridesSpec + *out = new(commonsv1alpha1.OverridesSpec) + (*in).DeepCopyInto(*out) } } diff --git a/cmd/main.go b/cmd/main.go index 3313fce..f708d40 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -127,7 +127,7 @@ func main() { HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, WebhookServer: webhookServer, - LeaderElectionID: "d5bf9a68.zncdata.dev", + LeaderElectionID: "d5bf9a68.kubedoop.dev", // LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily // when the Manager ends. This requires the binary to immediately end when the // Manager is stopped, otherwise, this setting is unsafe. Setting this significantly diff --git a/config/crd/bases/kubedoop.dev_hivemetastores.yaml b/config/crd/bases/kubedoop.dev_hivemetastores.yaml new file mode 100644 index 0000000..2229839 --- /dev/null +++ b/config/crd/bases/kubedoop.dev_hivemetastores.yaml @@ -0,0 +1,632 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.5 + name: hivemetastores.kubedoop.dev +spec: + group: kubedoop.dev + names: + kind: HiveMetastore + listKind: HiveMetastoreList + plural: hivemetastores + singular: hivemetastore + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: HiveMetastore is the Schema for the hivemetastores API + properties: + apiVersion: + 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 + kind: + 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 + metadata: + type: object + spec: + description: HiveMetastoreSpec defines the desired state of HiveMetastore + properties: + clusterConfig: + properties: + authentication: + properties: + kerberos: + properties: + secretClass: + type: string + required: + - secretClass + type: object + tls: + properties: + jksPassword: + default: changeit + type: string + secretClass: + default: tls + type: string + type: object + required: + - kerberos + type: object + database: + properties: + connectionString: + type: string + credentialsSecret: + description: |- + A reference to a secret to use for the database connection credentials. + It must contain the following keys: + - username + - password + type: string + databaseType: + default: derby + type: string + required: + - connectionString + - credentialsSecret + - databaseType + type: object + hdfs: + properties: + configMap: + type: string + required: + - configMap + type: object + listenerClass: + default: cluster-internal + enum: + - cluster-internal + - external-unstable + - external-stable + type: string + s3: + properties: + inline: + description: S3ConnectionSpec defines the desired credential + of S3Connection + properties: + credentials: + description: |- + Provides access credentials for S3Connection through SecretClass. SecretClass only needs to include: + - ACCESS_KEY + - SECRET_KEY + properties: + scope: + description: SecretClass scope + properties: + node: + type: boolean + pod: + type: boolean + services: + items: + type: string + type: array + type: object + secretClass: + type: string + required: + - secretClass + type: object + host: + type: string + pathStyle: + default: false + type: boolean + port: + type: integer + tls: + properties: + verification: + description: |- + TLSPrivider defines the TLS provider for authentication. + You can specify the none or server or mutual verification. + properties: + mutual: + properties: + certSecretClass: + type: string + required: + - certSecretClass + type: object + none: + type: object + server: + properties: + caCert: + description: |- + CACert is the CA certificate for server verification. + You can specify the secret class or the webPki. + properties: + secretClass: + type: string + webPki: + type: object + type: object + required: + - caCert + type: object + type: object + type: object + required: + - credentials + - host + type: object + reference: + description: S3 connection reference + type: string + type: object + vectorAggregatorConfigMapName: + type: string + required: + - database + type: object + clusterOperation: + description: ClusterOperationSpec defines the desired state of ClusterOperation + properties: + reconciliationPaused: + default: false + type: boolean + stopped: + default: false + type: boolean + type: object + image: + properties: + custom: + type: string + kubedoopVersion: + default: 0.0.0-dev + type: string + productVersion: + default: 3.1.3 + type: string + pullPolicy: + default: IfNotPresent + description: PullPolicy describes a policy for if/when to pull + a container image + enum: + - Always + - Never + - IfNotPresent + type: string + pullSecretName: + type: string + repo: + default: quay.io/zncdatadev + type: string + type: object + metastore: + properties: + cliOverrides: + items: + type: string + type: array + config: + properties: + affinity: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + gracefulShutdownTimeout: + default: 30s + type: string + logging: + properties: + containers: + additionalProperties: + properties: + console: + description: |- + LogLevelSpec + level mapping if app log level is not standard + - FATAL -> CRITICAL + - ERROR -> ERROR + - WARN -> WARNING + - INFO -> INFO + - DEBUG -> DEBUG + - TRACE -> DEBUG + + Default log level is INFO + properties: + level: + default: INFO + enum: + - FATAL + - ERROR + - WARN + - INFO + - DEBUG + - TRACE + type: string + type: object + file: + description: |- + LogLevelSpec + level mapping if app log level is not standard + - FATAL -> CRITICAL + - ERROR -> ERROR + - WARN -> WARNING + - INFO -> INFO + - DEBUG -> DEBUG + - TRACE -> DEBUG + + Default log level is INFO + properties: + level: + default: INFO + enum: + - FATAL + - ERROR + - WARN + - INFO + - DEBUG + - TRACE + type: string + type: object + loggers: + additionalProperties: + description: |- + LogLevelSpec + level mapping if app log level is not standard + - FATAL -> CRITICAL + - ERROR -> ERROR + - WARN -> WARNING + - INFO -> INFO + - DEBUG -> DEBUG + - TRACE -> DEBUG + + Default log level is INFO + properties: + level: + default: INFO + enum: + - FATAL + - ERROR + - WARN + - INFO + - DEBUG + - TRACE + type: string + type: object + type: object + type: object + type: object + enableVectorAgent: + type: boolean + type: object + resources: + properties: + cpu: + properties: + max: + 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 + min: + 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 + memory: + properties: + limit: + 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 + storage: + properties: + capacity: + anyOf: + - type: integer + - type: string + default: 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + storageClass: + type: string + type: object + type: object + warehouseDir: + default: /kubedoop/warehouse + type: string + type: object + configOverrides: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + envOverrides: + additionalProperties: + type: string + type: object + podOverrides: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + roleConfig: + properties: + podDisruptionBudget: + description: |- + This struct is used to configure: + 1. If PodDisruptionBudgets are created by the operator + 2. The allowed number of Pods to be unavailable (`maxUnavailable`) + properties: + enabled: + default: true + description: |- + Whether a PodDisruptionBudget should be written out for this role. + Disabling this enables you to specify your own - custom - one. + Defaults to true. + type: boolean + maxUnavailable: + description: |- + The number of Pods that are allowed to be down because of voluntary disruptions. + If you don't explicitly set this, the operator will use a sane default based + upon knowledge about the individual product. + format: int32 + type: integer + type: object + type: object + roleGroups: + additionalProperties: + properties: + cliOverrides: + items: + type: string + type: array + config: + properties: + affinity: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + gracefulShutdownTimeout: + default: 30s + type: string + logging: + properties: + containers: + additionalProperties: + properties: + console: + description: |- + LogLevelSpec + level mapping if app log level is not standard + - FATAL -> CRITICAL + - ERROR -> ERROR + - WARN -> WARNING + - INFO -> INFO + - DEBUG -> DEBUG + - TRACE -> DEBUG + + Default log level is INFO + properties: + level: + default: INFO + enum: + - FATAL + - ERROR + - WARN + - INFO + - DEBUG + - TRACE + type: string + type: object + file: + description: |- + LogLevelSpec + level mapping if app log level is not standard + - FATAL -> CRITICAL + - ERROR -> ERROR + - WARN -> WARNING + - INFO -> INFO + - DEBUG -> DEBUG + - TRACE -> DEBUG + + Default log level is INFO + properties: + level: + default: INFO + enum: + - FATAL + - ERROR + - WARN + - INFO + - DEBUG + - TRACE + type: string + type: object + loggers: + additionalProperties: + description: |- + LogLevelSpec + level mapping if app log level is not standard + - FATAL -> CRITICAL + - ERROR -> ERROR + - WARN -> WARNING + - INFO -> INFO + - DEBUG -> DEBUG + - TRACE -> DEBUG + + Default log level is INFO + properties: + level: + default: INFO + enum: + - FATAL + - ERROR + - WARN + - INFO + - DEBUG + - TRACE + type: string + type: object + type: object + type: object + type: object + enableVectorAgent: + type: boolean + type: object + resources: + properties: + cpu: + properties: + max: + 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 + min: + 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 + memory: + properties: + limit: + 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 + storage: + properties: + capacity: + anyOf: + - type: integer + - type: string + default: 10Gi + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + storageClass: + type: string + type: object + type: object + warehouseDir: + default: /kubedoop/warehouse + type: string + type: object + configOverrides: + additionalProperties: + additionalProperties: + type: string + type: object + type: object + envOverrides: + additionalProperties: + type: string + type: object + podOverrides: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + replicas: + default: 1 + format: int32 + type: integer + type: object + type: object + required: + - roleGroups + type: object + required: + - clusterConfig + - metastore + type: object + status: + description: HiveMetastoreStatus defines the observed state of HiveMetastore + properties: + condition: + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + replicas: + format: int32 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/zncdata.dev_hivemetastores.yaml b/config/crd/bases/zncdata.dev_hivemetastores.yaml deleted file mode 100644 index 666339d..0000000 --- a/config/crd/bases/zncdata.dev_hivemetastores.yaml +++ /dev/null @@ -1,2513 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.16.5 - name: hivemetastores.zncdata.dev -spec: - group: zncdata.dev - names: - kind: HiveMetastore - listKind: HiveMetastoreList - plural: hivemetastores - singular: hivemetastore - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: HiveMetastore is the Schema for the hivemetastores API - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: HiveMetastoreSpec defines the desired state of HiveMetastore - properties: - clusterConfig: - properties: - authentication: - properties: - kerberos: - properties: - secretClass: - type: string - required: - - secretClass - type: object - tls: - properties: - jksPassword: - default: changeit - type: string - secretClass: - default: tls - type: string - type: object - required: - - kerberos - type: object - database: - properties: - connectionString: - type: string - credentialsSecret: - description: |- - A reference to a secret to use for the database connection credentials. - It must contain the following keys: - - username - - password - type: string - databaseType: - default: derby - type: string - required: - - connectionString - - credentialsSecret - - databaseType - type: object - hdfs: - properties: - configMap: - type: string - required: - - configMap - type: object - listenerClass: - default: cluster-internal - enum: - - cluster-internal - - external-unstable - - external-stable - type: string - s3: - properties: - inline: - description: S3ConnectionSpec defines the desired credential - of S3Connection - properties: - credentials: - description: |- - Provides access credentials for S3Connection through SecretClass. SecretClass only needs to include: - - ACCESS_KEY - - SECRET_KEY - properties: - scope: - description: SecretClass scope - properties: - node: - type: boolean - pod: - type: boolean - services: - items: - type: string - type: array - type: object - secretClass: - type: string - required: - - secretClass - type: object - host: - type: string - pathStyle: - default: false - type: boolean - port: - type: integer - tls: - properties: - verification: - description: |- - TLSPrivider defines the TLS provider for authentication. - You can specify the none or server or mutual verification. - properties: - mutual: - properties: - certSecretClass: - type: string - required: - - certSecretClass - type: object - none: - type: object - server: - properties: - caCert: - description: |- - CACert is the CA certificate for server verification. - You can specify the secret class or the webPki. - properties: - secretClass: - type: string - webPki: - type: object - type: object - required: - - caCert - type: object - type: object - type: object - required: - - credentials - - host - type: object - reference: - description: S3 connection reference - type: string - type: object - vectorAggregatorConfigMapName: - type: string - required: - - database - type: object - clusterOperation: - description: ClusterOperationSpec defines the desired state of ClusterOperation - properties: - reconciliationPaused: - default: false - type: boolean - stopped: - default: false - type: boolean - type: object - image: - properties: - custom: - type: string - kubedoopVersion: - default: 0.0.0-dev - type: string - productVersion: - default: 3.1.3 - type: string - pullPolicy: - default: IfNotPresent - description: PullPolicy describes a policy for if/when to pull - a container image - enum: - - Always - - Never - - IfNotPresent - type: string - pullSecretName: - type: string - repo: - default: quay.io/zncdatadev - type: string - type: object - metastore: - properties: - cliOverrides: - items: - type: string - type: array - config: - properties: - affinity: - description: Affinity is a group of affinity scheduling rules. - properties: - nodeAffinity: - description: Describes node affinity scheduling rules - for the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated - with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching - the corresponding nodeSelectorTerm, in the - range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector - terms. The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that the - selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, - etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, - associated with the corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The - requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - gracefulShutdownTimeout: - description: Use time.ParseDuration to parse the string - type: string - logging: - properties: - enableVectorAgent: - default: false - type: boolean - metastore: - additionalProperties: - properties: - console: - description: |- - LogLevelSpec - level mapping if app log level is not standard - - FATAL -> CRITICAL - - ERROR -> ERROR - - WARN -> WARNING - - INFO -> INFO - - DEBUG -> DEBUG - - TRACE -> DEBUG - - Default log level is INFO - properties: - level: - default: INFO - enum: - - FATAL - - ERROR - - WARN - - INFO - - DEBUG - - TRACE - type: string - type: object - file: - description: |- - LogLevelSpec - level mapping if app log level is not standard - - FATAL -> CRITICAL - - ERROR -> ERROR - - WARN -> WARNING - - INFO -> INFO - - DEBUG -> DEBUG - - TRACE -> DEBUG - - Default log level is INFO - properties: - level: - default: INFO - enum: - - FATAL - - ERROR - - WARN - - INFO - - DEBUG - - TRACE - type: string - type: object - loggers: - additionalProperties: - description: |- - LogLevelSpec - level mapping if app log level is not standard - - FATAL -> CRITICAL - - ERROR -> ERROR - - WARN -> WARNING - - INFO -> INFO - - DEBUG -> DEBUG - - TRACE -> DEBUG - - Default log level is INFO - properties: - level: - default: INFO - enum: - - FATAL - - ERROR - - WARN - - INFO - - DEBUG - - TRACE - type: string - type: object - type: object - type: object - type: object - type: object - podDisruptionBudget: - description: |- - This struct is used to configure: - - 1. If PodDisruptionBudgets are created by the operator - 2. The allowed number of Pods to be unavailable (`maxUnavailable`) - properties: - enabled: - default: true - type: boolean - maxUnavailable: - format: int32 - type: integer - type: object - resources: - properties: - cpu: - properties: - max: - 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 - min: - 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 - memory: - properties: - limit: - 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 - storage: - properties: - capacity: - anyOf: - - type: integer - - type: string - default: 10Gi - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - storageClass: - type: string - type: object - type: object - warehouseDir: - default: /kubedoop/warehouse - type: string - type: object - configOverrides: - additionalProperties: - type: string - description: |- - - hdfs-site.xml - - core-site.xml - type: object - envOverrides: - additionalProperties: - type: string - type: object - roleConfig: - properties: - podDisruptionBudget: - description: |- - This struct is used to configure: - - 1. If PodDisruptionBudgets are created by the operator - 2. The allowed number of Pods to be unavailable (`maxUnavailable`) - properties: - enabled: - default: true - type: boolean - maxUnavailable: - format: int32 - type: integer - type: object - type: object - roleGroups: - additionalProperties: - properties: - cliOverrides: - items: - type: string - type: array - config: - properties: - affinity: - description: Affinity is a group of affinity scheduling - rules. - properties: - nodeAffinity: - description: Describes node affinity scheduling - rules for the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated - with the corresponding weight. - properties: - matchExpressions: - description: A list of node selector - requirements by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching - the corresponding nodeSelectorTerm, - in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector - terms. The terms are ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector - requirements by node's labels. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. - items: - description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key that - the selector applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules - (e.g. co-locate this pod in the same node, zone, - etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added - per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity - term, associated with the corresponding - weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a - list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a - list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling - rules (e.g. avoid putting this pod in the same - node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added - per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity - term, associated with the corresponding - weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a - list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both matchLabelKeys and labelSelector. - Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: |- - MismatchLabelKeys is a set of pod label keys to select which pods will - be taken into consideration. The keys are used to lookup values from the - incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` - to select the group of existing pods which pods will be taken into consideration - for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming - pod labels will be ignored. The default value is empty. - The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. - Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is a - list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - gracefulShutdownTimeout: - description: Use time.ParseDuration to parse the string - type: string - logging: - properties: - enableVectorAgent: - default: false - type: boolean - metastore: - additionalProperties: - properties: - console: - description: |- - LogLevelSpec - level mapping if app log level is not standard - - FATAL -> CRITICAL - - ERROR -> ERROR - - WARN -> WARNING - - INFO -> INFO - - DEBUG -> DEBUG - - TRACE -> DEBUG - - Default log level is INFO - properties: - level: - default: INFO - enum: - - FATAL - - ERROR - - WARN - - INFO - - DEBUG - - TRACE - type: string - type: object - file: - description: |- - LogLevelSpec - level mapping if app log level is not standard - - FATAL -> CRITICAL - - ERROR -> ERROR - - WARN -> WARNING - - INFO -> INFO - - DEBUG -> DEBUG - - TRACE -> DEBUG - - Default log level is INFO - properties: - level: - default: INFO - enum: - - FATAL - - ERROR - - WARN - - INFO - - DEBUG - - TRACE - type: string - type: object - loggers: - additionalProperties: - description: |- - LogLevelSpec - level mapping if app log level is not standard - - FATAL -> CRITICAL - - ERROR -> ERROR - - WARN -> WARNING - - INFO -> INFO - - DEBUG -> DEBUG - - TRACE -> DEBUG - - Default log level is INFO - properties: - level: - default: INFO - enum: - - FATAL - - ERROR - - WARN - - INFO - - DEBUG - - TRACE - type: string - type: object - type: object - type: object - type: object - type: object - podDisruptionBudget: - description: |- - This struct is used to configure: - - 1. If PodDisruptionBudgets are created by the operator - 2. The allowed number of Pods to be unavailable (`maxUnavailable`) - properties: - enabled: - default: true - type: boolean - maxUnavailable: - format: int32 - type: integer - type: object - resources: - properties: - cpu: - properties: - max: - 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 - min: - 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 - memory: - properties: - limit: - 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 - storage: - properties: - capacity: - anyOf: - - type: integer - - type: string - default: 10Gi - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - storageClass: - type: string - type: object - type: object - warehouseDir: - default: /kubedoop/warehouse - type: string - type: object - configOverrides: - additionalProperties: - type: string - type: object - envOverrides: - additionalProperties: - type: string - type: object - replicas: - default: 1 - format: int32 - type: integer - type: object - type: object - required: - - roleGroups - type: object - required: - - clusterConfig - - metastore - type: object - status: - description: HiveMetastoreStatus defines the observed state of HiveMetastore - properties: - condition: - items: - description: Condition contains details for one aspect of the current - state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - replicas: - format: int32 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index beec491..f5e7a28 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,7 +2,7 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/zncdata.dev_hivemetastores.yaml +- bases/kubedoop.dev_hivemetastores.yaml #+kubebuilder:scaffold:crdkustomizeresource patches: diff --git a/config/crd/patches/cainjection_in_hivemetastores.yaml b/config/crd/patches/cainjection_in_hivemetastores.yaml index 3905985..1040cf5 100644 --- a/config/crd/patches/cainjection_in_hivemetastores.yaml +++ b/config/crd/patches/cainjection_in_hivemetastores.yaml @@ -4,4 +4,4 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - name: hivemetastores.zncdata.dev + name: hivemetastores.kubedoop.dev diff --git a/config/crd/patches/webhook_in_hivemetastores.yaml b/config/crd/patches/webhook_in_hivemetastores.yaml index 80ae5ce..8182bc5 100644 --- a/config/crd/patches/webhook_in_hivemetastores.yaml +++ b/config/crd/patches/webhook_in_hivemetastores.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: hivemetastores.zncdata.dev + name: hivemetastores.kubedoop.dev spec: conversion: strategy: Webhook diff --git a/config/rbac/hivemetastore_editor_role.yaml b/config/rbac/hivemetastore_editor_role.yaml index 1c8b084..3334628 100644 --- a/config/rbac/hivemetastore_editor_role.yaml +++ b/config/rbac/hivemetastore_editor_role.yaml @@ -12,7 +12,7 @@ metadata: name: hivemetastore-editor-role rules: - apiGroups: - - zncdata.dev + - kubedoop.dev resources: - hivemetastores verbs: @@ -24,7 +24,7 @@ rules: - update - watch - apiGroups: - - zncdata.dev + - kubedoop.dev resources: - hivemetastores/status verbs: diff --git a/config/rbac/hivemetastore_viewer_role.yaml b/config/rbac/hivemetastore_viewer_role.yaml index 4fa85f0..393bec1 100644 --- a/config/rbac/hivemetastore_viewer_role.yaml +++ b/config/rbac/hivemetastore_viewer_role.yaml @@ -12,7 +12,7 @@ metadata: name: hivemetastore-viewer-role rules: - apiGroups: - - zncdata.dev + - kubedoop.dev resources: - hivemetastores verbs: @@ -20,7 +20,7 @@ rules: - list - watch - apiGroups: - - zncdata.dev + - kubedoop.dev resources: - hivemetastores/status verbs: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 3da6b92..0f6eef6 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -38,9 +38,9 @@ rules: - update - watch - apiGroups: - - policy + - kubedoop.dev resources: - - poddisruptionbudgets + - hivemetastores verbs: - create - delete @@ -50,18 +50,23 @@ rules: - update - watch - apiGroups: - - s3.zncdata.dev + - kubedoop.dev resources: - - s3buckets - - s3connections + - hivemetastores/finalizers + verbs: + - update +- apiGroups: + - kubedoop.dev + resources: + - hivemetastores/status verbs: - get - - list - - watch + - patch + - update - apiGroups: - - zncdata.dev + - policy resources: - - hivemetastores + - poddisruptionbudgets verbs: - create - delete @@ -71,16 +76,11 @@ rules: - update - watch - apiGroups: - - zncdata.dev - resources: - - hivemetastores/finalizers - verbs: - - update -- apiGroups: - - zncdata.dev + - s3.kubedoop.dev resources: - - hivemetastores/status + - s3buckets + - s3connections verbs: - get - - patch - - update + - list + - watch diff --git a/config/samples/_v1alpha1_hivemetastore.yaml b/config/samples/_v1alpha1_hivemetastore.yaml index b873292..2a50853 100644 --- a/config/samples/_v1alpha1_hivemetastore.yaml +++ b/config/samples/_v1alpha1_hivemetastore.yaml @@ -1,4 +1,4 @@ -apiVersion: zncdata.dev/v1alpha1 +apiVersion: kubedoop.dev/v1alpha1 kind: HiveMetastore metadata: labels: @@ -9,6 +9,21 @@ metadata: app.kubernetes.io/created-by: hive-operator name: hivemetastore-sample spec: + clusterConfig: + database: + connectionString: jdbc:derby:;databaseName=/tmp/hive;create=true + credentialsSecret: hive-credentials + databaseType: derby metastore: roleGroups: + default: replicas: 1 +--- +apiVersion: v1 +kind: Secret +metadata: + name: hive-credentials +type: Opaque +stringData: + username: APP + password: mine diff --git a/examples/simple-hive-cluster-postgres-s3.yaml b/examples/simple-hive-cluster-postgres-s3.yaml index a82e2ba..274f158 100644 --- a/examples/simple-hive-cluster-postgres-s3.yaml +++ b/examples/simple-hive-cluster-postgres-s3.yaml @@ -21,9 +21,9 @@ spec: stackableVersion: 0.0.0-dev clusterConfig: database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true + connectionString: jdbc:derby:;databaseName=/tmp/hive;create=true credentialsSecret: hive-credentials - dbType: derby + databaseType: derby s3: inline: host: test-minio diff --git a/examples/simple-hive-cluster.yaml b/examples/simple-hive-cluster.yaml index 4e7612c..ef49897 100644 --- a/examples/simple-hive-cluster.yaml +++ b/examples/simple-hive-cluster.yaml @@ -5,13 +5,13 @@ metadata: name: simple-hive-derby spec: image: - productVersion: 4.0.0 - stackableVersion: 0.0.0-dev + productVersion: 3.1.1 + kubedoopVersion: 0.0.0-dev clusterConfig: database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true + connectionString: jdbc:derby:;databaseName=/tmp/hive;create=true credentialsSecret: hive-credentials - dbType: derby + databaseType: derby metastore: roleGroups: default: diff --git a/go.mod b/go.mod index 65b43ef..0706b15 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.2 require ( github.com/onsi/ginkgo/v2 v2.21.0 github.com/onsi/gomega v1.35.1 - github.com/zncdatadev/operator-go v0.11.2 + github.com/zncdatadev/operator-go v0.11.3-0.20241120074847-158caee1e00a k8s.io/api v0.31.2 k8s.io/apimachinery v0.31.2 k8s.io/client-go v0.31.2 diff --git a/go.sum b/go.sum index f13ca90..cb388a9 100644 --- a/go.sum +++ b/go.sum @@ -139,6 +139,16 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zncdatadev/operator-go v0.11.2 h1:/3ti+26D9w38gZV2eQLIz62mPe45em3Ej8iePoSj/04= github.com/zncdatadev/operator-go v0.11.2/go.mod h1:Thc0Jo5LuXnwrb73shfI63PKlxC+7cGq7SClzo3Y5qI= +github.com/zncdatadev/operator-go v0.11.3-0.20241119024050-350d91b7a332 h1:KzD7yCE09cm7caFGk6/LWIJQ5rKNFWTxB7zESmmALpw= +github.com/zncdatadev/operator-go v0.11.3-0.20241119024050-350d91b7a332/go.mod h1:9QGIaH5gTDgpv0kftcGkBGqCIj7cboC5ZMES9fZy4XI= +github.com/zncdatadev/operator-go v0.11.3-0.20241120032430-105a1d2e2060 h1:2gdqCUJBUEJTQF6tnUZDO6bbyUbwl73fb6ad5Iuey7M= +github.com/zncdatadev/operator-go v0.11.3-0.20241120032430-105a1d2e2060/go.mod h1:9QGIaH5gTDgpv0kftcGkBGqCIj7cboC5ZMES9fZy4XI= +github.com/zncdatadev/operator-go v0.11.3-0.20241120055227-8133bdd0fd2f h1:vogJH3uptcKfk/5+1PFrSF0AfOQl5zU31haXMROa808= +github.com/zncdatadev/operator-go v0.11.3-0.20241120055227-8133bdd0fd2f/go.mod h1:9QGIaH5gTDgpv0kftcGkBGqCIj7cboC5ZMES9fZy4XI= +github.com/zncdatadev/operator-go v0.11.3-0.20241120070414-6959122bcbb4 h1:Yv9jB/MvkA9lTal5I8If2PQW7cOXctw2GyFmOC3II3Y= +github.com/zncdatadev/operator-go v0.11.3-0.20241120070414-6959122bcbb4/go.mod h1:9QGIaH5gTDgpv0kftcGkBGqCIj7cboC5ZMES9fZy4XI= +github.com/zncdatadev/operator-go v0.11.3-0.20241120074847-158caee1e00a h1:gbWkhuxGaWBbNMESJOMO7d0UMiljHpVNKq1LypjfClI= +github.com/zncdatadev/operator-go v0.11.3-0.20241120074847-158caee1e00a/go.mod h1:9QGIaH5gTDgpv0kftcGkBGqCIj7cboC5ZMES9fZy4XI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= diff --git a/internal/controller/configmap.go b/internal/controller/configmap.go index 2f157e3..e177f71 100644 --- a/internal/controller/configmap.go +++ b/internal/controller/configmap.go @@ -20,9 +20,6 @@ var _ builder.ConfigBuilder = &ConfigMapBuilder{} type ConfigMapBuilder struct { builder.ConfigMapBuilder - ClusterName string - RoleName string - RolegroupName string ClusterConfig *hivev1alpha1.ClusterConfigSpec RoleGroupConfig *hivev1alpha1.ConfigSpec @@ -33,19 +30,19 @@ func NewConfigMapBuilder( name string, clusterConfig *hivev1alpha1.ClusterConfigSpec, roleGroupConfig *hivev1alpha1.ConfigSpec, - option builder.Option, + options ...builder.Option, ) *ConfigMapBuilder { + opts := builder.Options{} + for _, o := range options { + o(&opts) + } return &ConfigMapBuilder{ ConfigMapBuilder: *builder.NewConfigMapBuilder( client, name, - option.Labels, - option.Annotations, + options..., ), - ClusterName: option.ClusterName, - RoleName: option.RoleName, - RolegroupName: option.RoleGroupName, ClusterConfig: clusterConfig, RoleGroupConfig: roleGroupConfig, } @@ -80,20 +77,20 @@ func (b *ConfigMapBuilder) Build(ctx context.Context) (ctrlclient.Object, error) } func (b *ConfigMapBuilder) addVectorConfig(ctx context.Context) error { - if b.RoleGroupConfig != nil && b.RoleGroupConfig.Logging != nil && b.RoleGroupConfig.Logging.EnableVectorAgent { + if b.RoleGroupConfig != nil && b.RoleGroupConfig.Logging != nil && *b.RoleGroupConfig.Logging.EnableVectorAgent { vectorConfig, err := productlogging.MakeVectorYaml( ctx, b.Client.Client, b.Client.GetOwnerNamespace(), b.ClusterName, b.RoleName, - b.RolegroupName, + b.RoleGroupName, b.ClusterConfig.VectorAggregatorConfigMapName, ) if err != nil { return err } - b.AddItem(builder.VectorConfigFile, vectorConfig) + b.AddItem(builder.VectorConfigFileName, vectorConfig) } return nil } @@ -184,25 +181,19 @@ func (b *ConfigMapBuilder) addLog4j2() error { func NewConfigMapReconciler( client *client.Client, clusterConfig *hivev1alpha1.ClusterConfigSpec, - options reconciler.RoleGroupInfo, - spec hivev1alpha1.RoleGroupSpec, + info reconciler.RoleGroupInfo, + config *hivev1alpha1.ConfigSpec, + options ...builder.Option, ) *reconciler.GenericResourceReconciler[*ConfigMapBuilder] { cmBuilder := NewConfigMapBuilder( client, - options.GetFullName(), + info.GetFullName(), clusterConfig, - spec.Config, - builder.Option{ - ClusterName: options.GetClusterName(), - RoleName: options.GetRoleName(), - RoleGroupName: options.GetGroupName(), - Labels: options.GetLabels(), - Annotations: options.GetAnnotations(), - }, + config, + options..., ) return reconciler.NewGenericResourceReconciler[*ConfigMapBuilder]( client, - options.GetFullName(), cmBuilder, ) } diff --git a/internal/controller/deployment.go b/internal/controller/deployment.go index f1e1e84..8673158 100644 --- a/internal/controller/deployment.go +++ b/internal/controller/deployment.go @@ -4,8 +4,8 @@ import ( "context" "path" "strings" - "time" + commonsv1alpha1 "github.com/zncdatadev/operator-go/pkg/apis/commons/v1alpha1" "github.com/zncdatadev/operator-go/pkg/builder" client "github.com/zncdatadev/operator-go/pkg/client" "github.com/zncdatadev/operator-go/pkg/constants" @@ -48,33 +48,36 @@ var _ builder.DeploymentBuilder = &DeploymentBuilder{} type DeploymentBuilder struct { builder.Deployment - ClusterName string - RoleName string - ClusterConfig *hivev1alpha1.ClusterConfigSpec - RoleGroupConfig *hivev1alpha1.ConfigSpec + ClusterConfig *hivev1alpha1.ClusterConfigSpec } func NewDeploymentBuilder( client *client.Client, name string, clusterConfig *hivev1alpha1.ClusterConfigSpec, - roleGroupConfig *hivev1alpha1.ConfigSpec, replicas *int32, image *util.Image, - options builder.WorkloadOptions, + overrides *commonsv1alpha1.OverridesSpec, + roleGroupConfig *commonsv1alpha1.RoleGroupConfigSpec, + options ...builder.Option, ) *DeploymentBuilder { + + opts := builder.Options{} + for _, o := range options { + o(&opts) + } + return &DeploymentBuilder{ Deployment: *builder.NewDeployment( client, name, replicas, image, - options, + overrides, + roleGroupConfig, + options..., ), - RoleName: options.RoleName, - ClusterName: options.ClusterName, - ClusterConfig: clusterConfig, - RoleGroupConfig: roleGroupConfig, + ClusterConfig: clusterConfig, } } @@ -114,7 +117,7 @@ func (b *DeploymentBuilder) Build(ctx context.Context) (ctrlclient.Object, error } func (b *DeploymentBuilder) setupVector(obj *appv1.Deployment) error { - if b.RoleGroupConfig != nil && b.RoleGroupConfig.Logging != nil && b.RoleGroupConfig.Logging.EnableVectorAgent { + if b.RoleGroupConfig != nil && b.RoleGroupConfig.Logging != nil && *b.RoleGroupConfig.Logging.EnableVectorAgent { vector := builder.NewVectorDecorator( obj, b.GetImage(), @@ -350,49 +353,26 @@ func NewDeploymentReconciler( clusterConfig *hivev1alpha1.ClusterConfigSpec, ports []corev1.ContainerPort, image *util.Image, + replicas *int32, stopped bool, - spec *hivev1alpha1.RoleGroupSpec, + overrides *commonsv1alpha1.OverridesSpec, + roleGroupConfig *commonsv1alpha1.RoleGroupConfigSpec, + options ...builder.Option, ) (*reconciler.Deployment, error) { - options := builder.WorkloadOptions{ - Option: builder.Option{ - ClusterName: roleGroupInfo.ClusterName, - RoleName: roleGroupInfo.RoleName, - RoleGroupName: roleGroupInfo.RoleGroupName, - Labels: roleGroupInfo.GetLabels(), - Annotations: roleGroupInfo.GetAnnotations(), - }, - // PodOverrides: spec.PodOverrides, - EnvOverrides: spec.EnvOverrides, - CliOverrides: spec.CliOverrides, - } - - if spec.Config != nil { - if spec.Config.GracefulShutdownTimeout != nil { - if gracefulShutdownTimeout, err := time.ParseDuration(*spec.Config.GracefulShutdownTimeout); err != nil { - return nil, err - } else { - options.TerminationGracePeriod = &gracefulShutdownTimeout - } - - } - - options.Affinity = spec.Config.Affinity - options.Resource = spec.Config.Resources - } b := NewDeploymentBuilder( client, roleGroupInfo.GetFullName(), clusterConfig, - spec.Config, - &spec.Replicas, + replicas, image, - options, + overrides, + roleGroupConfig, + options..., ) return reconciler.NewDeployment( client, - roleGroupInfo.GetFullName(), b, stopped, ), nil diff --git a/internal/controller/metastore.go b/internal/controller/metastore.go index a816bf5..e917986 100644 --- a/internal/controller/metastore.go +++ b/internal/controller/metastore.go @@ -3,9 +3,9 @@ package controller import ( "context" + commonsv1alpha1 "github.com/zncdatadev/operator-go/pkg/apis/commons/v1alpha1" "github.com/zncdatadev/operator-go/pkg/builder" "github.com/zncdatadev/operator-go/pkg/client" - "github.com/zncdatadev/operator-go/pkg/constants" "github.com/zncdatadev/operator-go/pkg/reconciler" "github.com/zncdatadev/operator-go/pkg/util" @@ -42,16 +42,28 @@ func NewNodeRoleReconciler( func (r *RoleReconciler) RegisterResources(ctx context.Context) error { for name, roleGroup := range r.Spec.RoleGroups { - mergedRolgGroup := roleGroup.DeepCopy() - r.MergeRoleGroupSpec(mergedRolgGroup) - info := reconciler.RoleGroupInfo{ RoleInfo: r.RoleInfo, RoleGroupName: name, } - reconcilers, err := r.GetImageResourceWithRoleGroup(ctx, info, mergedRolgGroup) + mergedConfig, err := util.MergeObject(r.Spec.Config, roleGroup.Config) + if err != nil { + return err + } + mergedOverrides, err := util.MergeObject(r.Spec.OverridesSpec, roleGroup.OverridesSpec) + if err != nil { + return err + } + + reconcilers, err := r.GetImageResourceWithRoleGroup( + ctx, + info, + mergedConfig, + mergedOverrides, + &roleGroup.Replicas, + ) if err != nil { return err } @@ -63,23 +75,46 @@ func (r *RoleReconciler) RegisterResources(ctx context.Context) error { return nil } -func (r *RoleReconciler) GetImageResourceWithRoleGroup(ctx context.Context, info reconciler.RoleGroupInfo, spec *hivev1alpha1.RoleGroupSpec) ([]reconciler.Reconciler, error) { +func (r *RoleReconciler) GetImageResourceWithRoleGroup( + ctx context.Context, + info reconciler.RoleGroupInfo, + config *hivev1alpha1.ConfigSpec, + overrides *commonsv1alpha1.OverridesSpec, + replicas *int32, +) ([]reconciler.Reconciler, error) { + + options := func(o *builder.Options) { + o.ClusterName = info.ClusterName + o.RoleName = info.RoleName + o.RoleGroupName = info.RoleGroupName + o.Labels = info.GetLabels() + o.Annotations = info.GetAnnotations() + } cm := NewConfigMapReconciler( r.Client, r.ClusterConfig, info, - *spec, + config, + options, ) + var commonsRoleGroupConfig *commonsv1alpha1.RoleGroupConfigSpec + if config != nil { + commonsRoleGroupConfig = config.RoleGroupConfigSpec + } + deployment, err := NewDeploymentReconciler( r.Client, info, r.ClusterConfig, ContainerPort, r.Image, - r.ClusterStopped, - spec, + replicas, + r.ClusterStopped(), + overrides, + commonsRoleGroupConfig, + options, ) if err != nil { return nil, err @@ -89,13 +124,13 @@ func (r *RoleReconciler) GetImageResourceWithRoleGroup(ctx context.Context, info r.Client, info.GetFullName(), ContainerPort, - func(sbo *builder.ServiceBuilderOption) { - sbo.Labels = info.GetLabels() - sbo.Annotations = info.GetAnnotations() - sbo.ClusterName = r.ClusterInfo.ClusterName - sbo.RoleName = r.RoleInfo.RoleName - sbo.RoleGroupName = info.RoleGroupName - sbo.ListenerClass = constants.ListenerClass(r.ClusterConfig.ListenerClass) + func(o *builder.ServiceBuilderOptions) { + o.ClusterName = info.ClusterName + o.RoleName = info.RoleName + o.RoleGroupName = info.RoleGroupName + o.Annotations = info.GetAnnotations() + o.Labels = info.GetLabels() + }, ) return []reconciler.Reconciler{cm, deployment, svc}, nil diff --git a/internal/controller/metastore_controller.go b/internal/controller/metastore_controller.go index 74d0b3d..317dbfd 100644 --- a/internal/controller/metastore_controller.go +++ b/internal/controller/metastore_controller.go @@ -39,15 +39,15 @@ type HiveMetastoreReconciler struct { Scheme *runtime.Scheme } -// +kubebuilder:rbac:groups=zncdata.dev,resources=hivemetastores,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=zncdata.dev,resources=hivemetastores/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=zncdata.dev,resources=hivemetastores/finalizers,verbs=update +// +kubebuilder:rbac:groups=kubedoop.dev,resources=hivemetastores,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=kubedoop.dev,resources=hivemetastores/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=kubedoop.dev,resources=hivemetastores/finalizers,verbs=update // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch -// +kubebuilder:rbac:groups=s3.zncdata.dev,resources=s3connections,verbs=get;list;watch -// +kubebuilder:rbac:groups=s3.zncdata.dev,resources=s3buckets,verbs=get;list;watch +// +kubebuilder:rbac:groups=s3.kubedoop.dev,resources=s3connections,verbs=get;list;watch +// +kubebuilder:rbac:groups=s3.kubedoop.dev,resources=s3buckets,verbs=get;list;watch // +kubebuilder:rbac:groups=policy,resources=poddisruptionbudgets,verbs=get;list;watch;create;update;patch;delete func (r *HiveMetastoreReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { diff --git a/test/e2e/default/00-hive.yaml b/test/e2e/default/00-hive.yaml index 9ebf1fa..1725547 100644 --- a/test/e2e/default/00-hive.yaml +++ b/test/e2e/default/00-hive.yaml @@ -8,7 +8,7 @@ stringData: username: hive password: hive --- -apiVersion: zncdata.dev/v1alpha1 +apiVersion: kubedoop.dev/v1alpha1 kind: HiveMetastore metadata: name: hive-derby diff --git a/test/e2e/default/02-hive-pg.yaml b/test/e2e/default/02-hive-pg.yaml index 8fd803b..5649d9e 100644 --- a/test/e2e/default/02-hive-pg.yaml +++ b/test/e2e/default/02-hive-pg.yaml @@ -8,7 +8,7 @@ stringData: username: hive password: hive --- -apiVersion: zncdata.dev/v1alpha1 +apiVersion: kubedoop.dev/v1alpha1 kind: HiveMetastore metadata: name: hive-pg diff --git a/test/e2e/kind-config.yaml b/test/e2e/kind-config.yaml index 2bd73fd..ad1eb9c 100644 --- a/test/e2e/kind-config.yaml +++ b/test/e2e/kind-config.yaml @@ -9,10 +9,3 @@ nodes: nodeRegistration: kubeletExtraArgs: node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 18080 - protocol: TCP - - containerPort: 443 - hostPort: 18443 - protocol: TCP diff --git a/test/e2e/pdb/hive-assert.yaml b/test/e2e/pdb/hive-assert.yaml index 7302180..39c2fc0 100644 --- a/test/e2e/pdb/hive-assert.yaml +++ b/test/e2e/pdb/hive-assert.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: hive-vector-metastore-default + name: hive-pdb-metastore-default status: availableReplicas: 1 readyReplicas: 1 @@ -10,17 +10,17 @@ status: apiVersion: v1 kind: ConfigMap metadata: - name: hive-vector-metastore-default + name: hive-pdb-metastore-default --- apiVersion: v1 kind: Service metadata: - name: hive-vector-metastore-default + name: hive-pdb-metastore-default --- # pdb apiVersion: policy/v1 kind: PodDisruptionBudget metadata: - name: hive-vector-metastore + name: hive-pdb-metastore spec: maxUnavailable: 2 diff --git a/test/e2e/pdb/hive.yaml b/test/e2e/pdb/hive.yaml index f2d8d56..c2a3268 100644 --- a/test/e2e/pdb/hive.yaml +++ b/test/e2e/pdb/hive.yaml @@ -8,10 +8,10 @@ stringData: username: hive password: hive --- -apiVersion: zncdata.dev/v1alpha1 +apiVersion: kubedoop.dev/v1alpha1 kind: HiveMetastore metadata: - name: hive-vector + name: hive-pdb spec: clusterConfig: database: diff --git a/test/e2e/vector/hive.yaml b/test/e2e/vector/hive.yaml index 2036c7d..9f57ec9 100644 --- a/test/e2e/vector/hive.yaml +++ b/test/e2e/vector/hive.yaml @@ -8,7 +8,7 @@ stringData: username: hive password: hive --- -apiVersion: zncdata.dev/v1alpha1 +apiVersion: kubedoop.dev/v1alpha1 kind: HiveMetastore metadata: name: hive-vector diff --git a/test/e2e/vector/vector-aggregator.yaml b/test/e2e/vector/vector-aggregator.yaml index d7e31d9..b28912b 100644 --- a/test/e2e/vector/vector-aggregator.yaml +++ b/test/e2e/vector/vector-aggregator.yaml @@ -1,55 +1,3 @@ -apiVersion: v1 -kind: Pod -metadata: - name: elasticsearch - labels: - app: elasticsearch -spec: - containers: - - name: es - image: elasticsearch:8.15.3 - env: - - name: discovery.type - value: "single-node" - - name: bootstrap.memory_lock - value: "true" - - name: ES_JAVA_OPTS - value: "-Xms512m -Xmx512m" - - name: transport.host - value: "127.0.0.1" - - name: xpack.security.enabled - value: "false" - ports: - - containerPort: 9200 - name: http - - name: kibana - image: kibana:8.15.3 - env: - - name: ELASTICSEARCH_HOSTS - value: "http://localhost:9200" - - name: i18n.locale - value: "zh-CN" - - name: xpack.security.enabled - value: "false" - ports: - - containerPort: 5601 - name: kibana ---- -## create svc for elasticsearch -apiVersion: v1 -kind: Service -metadata: - name: elasticsearch -spec: - ports: - - name: http - port: 9200 - protocol: TCP - targetPort: 9200 - selector: - app: elasticsearch - type: ClusterIP - --- apiVersion: v1 kind: ConfigMap @@ -68,18 +16,6 @@ data: - vector encoding: codec: "json" - essink: - type: elasticsearch - inputs: - - vector - api_version: auto - compression: none - doc_type: _doc - endpoints: - - http://elasticsearch:9200 - mode: bulk - # query: - # X-Powered-By: Vector sources: vector: address: 0.0.0.0:6000