diff --git a/experimental/addons/hbase-operator/.template.cue.swn b/experimental/addons/hbase-operator/.template.cue.swn new file mode 100644 index 00000000..7109c230 Binary files /dev/null and b/experimental/addons/hbase-operator/.template.cue.swn differ diff --git a/experimental/addons/hbase-operator/README.md b/experimental/addons/hbase-operator/README.md new file mode 100644 index 00000000..d1be89be --- /dev/null +++ b/experimental/addons/hbase-operator/README.md @@ -0,0 +1 @@ +#will be filled at the end diff --git a/experimental/addons/hbase-operator/definations/hbse-cluster.cue b/experimental/addons/hbase-operator/definations/hbse-cluster.cue new file mode 100644 index 00000000..d527442f --- /dev/null +++ b/experimental/addons/hbase-operator/definations/hbse-cluster.cue @@ -0,0 +1,63 @@ +"hbase-cluster": { + alias: "" + annotations: {} + attributes: workload: type: "autodetects.core.oam.dev" + description: "hbase-cluster component" + labels: {} + type: "component" +} + +template: { + output: { + kind: "HBASECluster" + apiVersion: "hbase.stackable.tech/v1alpha1" + metadata: { + name: context.name + } + spec: { + image: parameter.image + config: parameter.config + hdfsConfigMapName: *null | string + zookeeperConfigMapName: *null | string + masters: parameter.masters + regionServers: parameter.regionServers + restServers: parameter.restServers + + } + } + parameter: { + //+usage=The Hive metastore image to use. + image: { + //+usage=Overwrite the docker image. Specify the full docker image name, e.g. `docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0 + custom: *null | string + //+usage=Version of the product, e.g. `1.4.1`. + productVersion: *null | string + //+usage=Pull policy used when pulling the Images. + pullPolicy: *"IfNotPresent" | string + //+usage=Image pull secrets to pull images from a private registry. + pullSecrets: *null | [...] + //+usage=Name of the docker repo, e.g. `docker.stackable.tech/stackable. + repo: *null | string + //+usage=Stackable version of the product, e.g. 2.1.0. + stackableVersion: *null | string + } + //+usage=General Hive metastore cluster settings. + config: { + + + hbaseOpts: *null | string + hbaseRootdir: *null | string + + } + master: { + roleGroups: *{} | {...} +} + + regionServers: { + roleGroups: *{} | {...} +} + restServers: { + roleGroups: *{} | {...} +} + + diff --git a/experimental/addons/hbase-operator/definations/zookeeperznode.cue b/experimental/addons/hbase-operator/definations/zookeeperznode.cue new file mode 100644 index 00000000..582d6d17 --- /dev/null +++ b/experimental/addons/hbase-operator/definations/zookeeperznode.cue @@ -0,0 +1,26 @@ +"zookeperznode-cluster": { + alias: "" + annotations: {} + attributes: workload: type: "autodetects.core.oam.dev" + description: "s3 bucket component" + labels: {} + type: "component" +} + +template: { + output: { + kind: "ZookeeperZnode" + apiVersion: "zookeeper.stackable.tech/v1alpha1" + metadata: { + name: context.name + } + spec: { + clusterRef: parameter.clusterRef + } + } + parameter: { + clusterRef: { + name: *null | string + } + + } diff --git a/experimental/addons/hbase-operator/metadata.yaml b/experimental/addons/hbase-operator/metadata.yaml new file mode 100644 index 00000000..a8c2564f --- /dev/null +++ b/experimental/addons/hbase-operator/metadata.yaml @@ -0,0 +1,13 @@ +name: hbase-operator +version: 1.0.0 +description: This addon adds hbase-operator to the kubevela to be used by across the application installed in kubevela. +icon: "" +url: "https://hbase.apache.org/" + +tags: +- hbase-operator + +invisible: false + +dependencies: + - name: fluxcd diff --git a/experimental/addons/hbase-operator/parameter.cue b/experimental/addons/hbase-operator/parameter.cue new file mode 100644 index 00000000..de0ae209 --- /dev/null +++ b/experimental/addons/hbase-operator/parameter.cue @@ -0,0 +1,11 @@ +// parameter.cue is used to store addon parameters. +// +// You can use these parameters in template.cue or in resources/ by 'parameter.myparam' +// +// For example, you can use parameters to allow the user to customize +// container images, ports, and etc. +parameter: { + // +usage=Custom parameter description + namespace: *"hbase-operator" | string + clusters?: [...string] +} diff --git a/experimental/addons/hbase-operator/template.cue b/experimental/addons/hbase-operator/template.cue new file mode 100644 index 00000000..5c7faf6e --- /dev/null +++ b/experimental/addons/hbase-operator/template.cue @@ -0,0 +1,95 @@ +package main +output: { + apiVersion: "core.oam.dev/v1beta1" + kind: "Application" + spec: { + components: [ + { + name: "ns-hbase-operator" + type: "k8s-objects" + properties: objects: [{ + kind: "Namespace" + apiVersion: "v1" + metadata: + name: parameter.namespace + }] + }, + { + name: "hbase-operator" + type: "helm" + properties: { + repoType: "helm" + url: "https://repo.stackable.tech/repository/helm-stable/stackable-stable" + chart: "hbase-operator" + version: "23.1.0" + } + }, + { + name: "zookeeper-operator" + type: "helm" + properties: { + repoType: "helm" + url: "https://repo.stackable.tech/repository/helm-stable/stackable-stable" + chart: "zookeeper-operator" + version: "23.1.0" + } + }, + { + name: "hdfs-operator" + type: "helm" + properties: { + repoType: "helm" + url: "https://repo.stackable.tech/repository/helm-stable/stackable-stable" + chart: "hdfs-operator" + version: "23.1.0" + } + }, + { + name: "commons-operator" + type: "helm" + properties: { + repoType: "helm" + url: "https://repo.stackable.tech/repository/helm-stable/stackable-stable" + chart: "commons-operator" + version: "23.1.0" + } + }, + { + name: "secret-operator" + type: "helm" + properties: { + repoType: "helm" + url: "https://repo.stackable.tech/repository/helm-stable/stackable-stable" + chart: "secret-operator" + version: "23.1.0" + } + }, + ] + policies: [ + { + type: "shared-resource" + name: "hbase-operator-ns" + properties: rules: [{ + selector: resourceTypes: ["Namespace"] + }] + }, + { + type: "topology" + name: "deploy-hbase-operator" + properties: { + namespace: parameter.namespace + if parameter.clusters != _|_ { + clusters: parameter.clusters + } + if parameter.clusters == _|_ { + clusterLabelSelector: {} + } + } + }, + ] + } +} + + + +