├── tests ├── templates │ ├── .gitkeep │ └── kuttl │ │ ├── snapshot-export │ │ ├── 30_delete-snapshot.hbase │ │ ├── 30_restore-snapshot.hbase │ │ ├── 30-assert.yaml │ │ ├── 30_create-snapshot.hbase │ │ ├── 31-assert.yaml │ │ ├── 10-assert.yaml │ │ ├── 01-assert.yaml.j2 │ │ ├── 11-assert.yaml │ │ ├── 01-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 10-install-minio.yaml.j2 │ │ ├── 30-install-test-scripts-configmap.yaml │ │ ├── 31-run-tests.yaml.j2 │ │ ├── 12-assert.yaml │ │ ├── 20-assert.yaml │ │ ├── 00-rbac.yaml.j2 │ │ ├── 11-install-zookeeper.yaml.j2 │ │ ├── 12-install-hdfs.yaml.j2 │ │ ├── 20-install-hbase.yaml.j2 │ │ ├── 10_helm-bitnami-minio-values.yaml.j2 │ │ ├── 30_test-export.sh │ │ └── 31_test-snapshot-export-job.yaml │ │ ├── orphaned_resources │ │ ├── 04-assert.yaml │ │ ├── 04-remove-restserver.yaml │ │ ├── 00-assert.yaml.j2 │ │ ├── 05-change-regionserver-rolegroup.yaml │ │ ├── 00-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 01-assert.yaml │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 04-errors.yaml │ │ ├── 05-errors.yaml │ │ ├── 05-assert.yaml │ │ ├── 02-assert.yaml │ │ ├── 03-assert.yaml │ │ ├── 01-install-zookeeper.yaml.j2 │ │ ├── 02-install-hdfs.yaml.j2 │ │ └── 03-install-hbase.yaml.j2 │ │ ├── external-access │ │ ├── 10-listener-classes.yaml │ │ ├── 20-install-hbase.yaml │ │ ├── 00-assert.yaml.j2 │ │ ├── 01-assert.yaml │ │ ├── 00-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── listener-classes.yaml │ │ ├── 02-assert.yaml │ │ ├── 00-rbac.yaml.j2 │ │ ├── 01-install-zookeeper.yaml.j2 │ │ ├── 02-install-hdfs.yaml.j2 │ │ └── install-hbase.yaml.j2 │ │ ├── opa │ │ ├── 11-assert.yaml │ │ ├── 42-assert.yaml │ │ ├── 41-assert.yaml │ │ ├── 12-rego-rules.yaml.j2 │ │ ├── 00-assert.yaml.j2 │ │ ├── 10-assert.yaml │ │ ├── 00-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 01-assert.yaml.j2 │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 16-assert.yaml │ │ ├── 30-assert.yaml │ │ ├── 11-install-opa.yaml.j2 │ │ ├── 10-install-zk.yaml.j2 │ │ ├── 00-rbac.yaml.j2 │ │ ├── 42-test-rest-server.yaml │ │ └── 02-create-kerberos-secretclass.yaml.j2 │ │ ├── logging │ │ ├── 07-test-log-aggregation.yaml │ │ ├── 07-assert.yaml │ │ ├── 00-assert.yaml.j2 │ │ ├── 06-assert.yaml │ │ ├── 02-assert.yaml │ │ ├── 01-assert.yaml │ │ ├── 00-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 04-create-configmap-with-prepared-logs.yaml │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 01-install-hbase-vector-aggregator.yaml │ │ ├── 06-install-hbase-test-runner.yaml │ │ ├── 03-assert.yaml │ │ ├── 02-install-zookeeper.yaml.j2 │ │ ├── 05-assert.yaml │ │ ├── 03-install-hdfs.yaml.j2 │ │ └── test_log_aggregation.py │ │ ├── smoke │ │ ├── 60-test-phoenix.yaml │ │ ├── 00-limit-range.yaml │ │ ├── 01-assert.yaml.j2 │ │ ├── 50-test-hbase.yaml │ │ ├── 01-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 10-assert.yaml │ │ ├── 40-assert.yaml │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 60-assert.yaml │ │ ├── 50-assert.yaml │ │ ├── 80-assert.yaml │ │ ├── 20-assert.yaml │ │ ├── test_phoenix.sh │ │ ├── 31-assert.yaml │ │ ├── 40-install-hbase-test-runner.yaml │ │ ├── 10-install-zookeeper.yaml.j2 │ │ ├── 20-install-hdfs.yaml.j2 │ │ └── 30-assert.yaml │ │ ├── kerberos │ │ ├── 42-assert.yaml │ │ ├── 20-assert.yaml │ │ ├── 41-assert.yaml │ │ ├── 00-assert.yaml.j2 │ │ ├── 10-assert.yaml │ │ ├── 00-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 01-assert.yaml.j2 │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 40-grant-testuser-access.yaml │ │ ├── 11-assert.yaml │ │ ├── 30-assert.yaml │ │ ├── 00-rbac.yaml.j2 │ │ └── 10-install-zk.yaml.j2 │ │ ├── omid │ │ ├── 50-assert.yaml │ │ ├── 00-limit-range.yaml │ │ ├── 01-assert.yaml.j2 │ │ ├── 40-assert.yaml │ │ ├── 10-assert.yaml │ │ ├── 01-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 50-setup-example-tx-table.yaml │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 20-assert.yaml │ │ ├── 30-assert.yaml │ │ ├── 10-install-zookeeper.yaml.j2 │ │ ├── 30-install-hbase.yaml.j2 │ │ └── 20-install-hdfs.yaml.j2 │ │ ├── profiling │ │ ├── 05-assert.yaml │ │ ├── 05-run-profiler.yaml │ │ ├── 00-assert.yaml.j2 │ │ ├── 04-assert.yaml │ │ ├── 01-assert.yaml │ │ ├── 00-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 02-assert.yaml │ │ ├── 03-assert.yaml │ │ ├── 00-rbac.yaml.j2 │ │ ├── 01-install-zookeeper.yaml.j2 │ │ ├── 04-install-test-container.yaml │ │ ├── 02-install-hdfs.yaml.j2 │ │ └── 03-install-hbase.yaml.j2 │ │ ├── overrides │ │ ├── 00-limit-range.yaml │ │ ├── 01-assert.yaml.j2 │ │ ├── 10-assert.yaml │ │ ├── 01-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 20-assert.yaml │ │ ├── 10-install-zookeeper.yaml.j2 │ │ ├── 20-install-hdfs.yaml.j2 │ │ └── 30-assert.yaml.j2 │ │ ├── resources │ │ ├── 00-limit-range.yaml │ │ ├── 01-assert.yaml.j2 │ │ ├── 10-assert.yaml │ │ ├── 01-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 20-assert.yaml │ │ ├── 40-assert.yaml │ │ ├── 10-install-zookeeper.yaml.j2 │ │ └── 20-install-hdfs.yaml.j2 │ │ ├── shutdown │ │ ├── 00-limit-range.yaml │ │ ├── 01-assert.yaml.j2 │ │ ├── 01-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 10-assert.yaml │ │ ├── 50-test-hbase.yaml │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── count_regions.sh │ │ ├── 20-assert.yaml │ │ ├── 50-assert.yaml │ │ ├── 10-install-zookeeper.yaml.j2 │ │ ├── create_regions.sh │ │ ├── 20-install-hdfs.yaml.j2 │ │ └── 30-assert.yaml │ │ └── cluster-operation │ │ ├── 00-assert.yaml.j2 │ │ ├── 00-install-vector-aggregator-discovery-configmap.yaml.j2 │ │ ├── 01-assert.yaml │ │ ├── 00-patch-ns.yaml.j2 │ │ ├── 02-assert.yaml │ │ ├── 20-assert.yaml │ │ ├── 03-assert.yaml │ │ ├── 30-assert.yaml │ │ ├── 10-assert.yaml │ │ ├── 01-install-zookeeper.yaml.j2 │ │ ├── 02-install-hdfs.yaml.j2 │ │ ├── 03-install-hbase.yaml.j2 │ │ ├── 30-restart-hbase.yaml.j2 │ │ ├── 10-pause-hbase.yaml.j2 │ │ └── 20-stop-hbase.yaml.j2 ├── interu.yaml ├── release.yaml └── kuttl-test.yaml.jinja2 ├── rust └── operator-binary │ ├── src │ ├── config │ │ └── mod.rs │ ├── security │ │ └── mod.rs │ ├── operations │ │ ├── mod.rs │ │ └── graceful_shutdown.rs │ └── crd │ │ └── security.rs │ ├── build.rs │ └── Cargo.toml ├── docs ├── antora.yml ├── modules │ └── hbase │ │ ├── images │ │ ├── phoenix_tables.png │ │ └── phoenix_sqlline.png │ │ ├── examples │ │ ├── getting_started │ │ │ ├── test_getting_started_helm.sh │ │ │ ├── test_getting_started_stackablectl.sh │ │ │ ├── install_output.txt │ │ │ ├── zk.yaml │ │ │ ├── zk.yaml.j2 │ │ │ ├── install_output.txt.j2 │ │ │ ├── znode.yaml │ │ │ ├── hdfs.yaml │ │ │ ├── hdfs.yaml.j2 │ │ │ ├── hbase.yaml │ │ │ └── hbase.yaml.j2 │ │ └── usage-guide │ │ │ ├── snapshot-export-secret.yaml │ │ │ ├── hbase-regorules.yaml │ │ │ ├── hbck2-job.yaml │ │ │ ├── hbck2-job.yaml.j2 │ │ │ ├── snapshot-export-job.yaml │ │ │ └── snapshot-export-job.yaml.j2 │ │ ├── pages │ │ ├── reference │ │ │ ├── crds.adoc │ │ │ ├── index.adoc │ │ │ └── commandline-parameters.adoc │ │ ├── usage-guide │ │ │ ├── operations │ │ │ │ ├── cluster-operations.adoc │ │ │ │ ├── index.adoc │ │ │ │ └── pod-disruptions.adoc │ │ │ ├── index.adoc │ │ │ ├── logging.adoc │ │ │ ├── hbck2.adoc │ │ │ ├── listenerclass.adoc │ │ │ ├── compression.adoc │ │ │ ├── resource-requests.adoc │ │ │ └── monitoring.adoc │ │ ├── getting_started │ │ │ └── index.adoc │ │ └── troubleshooting │ │ │ └── index.adoc │ │ └── partials │ │ ├── supported-versions.adoc │ │ └── nav.adoc └── templating_vars.yaml ├── scripts ├── run_tests.sh ├── render_readme.sh ├── generate-manifests.sh └── docs_templating.sh ├── .gitattributes ├── deploy ├── helm │ ├── chart_testing.yaml │ ├── ct.yaml │ └── hbase-operator │ │ ├── templates │ │ ├── configmap.yaml │ │ ├── service.yaml │ │ ├── _maintenance.tpl │ │ ├── serviceaccount.yaml │ │ └── _telemetry.tpl │ │ ├── Chart.yaml │ │ ├── .helmignore │ │ ├── README.md │ │ └── values.yaml ├── stackable-operators-ns.yaml └── DO_NOT_EDIT.md ├── .actionlint.yaml ├── .github ├── actionlint.yaml ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── normal-issue.md │ ├── 01-normal-issue.md │ ├── new_version.md │ └── 02-bug_report.yml ├── workflows │ ├── general_daily_security.yml │ └── pr_pre-commit.yaml ├── PULL_REQUEST_TEMPLATE │ ├── pre-release-getting-started-script.md │ └── pre-release-rust-deps.md └── pull_request_template.md ├── rust-toolchain.toml ├── .readme ├── static │ └── borrowed │ │ ├── stackable_overview.png │ │ └── Icon_Stackable.svg ├── partials │ ├── borrowed │ │ ├── header.md.j2 │ │ ├── related_reading.md.j2 │ │ ├── overview_blurb.md.j2 │ │ ├── documentation.md.j2 │ │ └── links.md.j2 │ └── main.md.j2 └── README.md.j2 ├── nix ├── meta.json ├── README.md └── sources.json ├── .envrc.sample ├── .vscode ├── settings.json └── launch.json ├── .pylintrc ├── .gitignore ├── renovate.json ├── .dockerignore ├── .hadolint.yaml ├── rustfmt.toml ├── .yamllint.yaml ├── .markdownlint.yaml ├── Cargo.toml ├── crate-hashes.json ├── shell.nix └── deny.toml /tests/templates/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /rust/operator-binary/src/config/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod jvm; 2 | -------------------------------------------------------------------------------- /rust/operator-binary/src/security/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod opa; 2 | -------------------------------------------------------------------------------- /docs/antora.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: home 3 | version: "nightly" 4 | -------------------------------------------------------------------------------- /scripts/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ./scripts/run-tests "$@" 4 | -------------------------------------------------------------------------------- /rust/operator-binary/src/operations/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod graceful_shutdown; 2 | pub mod pdb; 3 | -------------------------------------------------------------------------------- /rust/operator-binary/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | built::write_built_file().unwrap(); 3 | } 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | nix/** linguist-generated 2 | Cargo.nix linguist-generated 3 | crate-hashes.json linguist-generated 4 | -------------------------------------------------------------------------------- /deploy/helm/chart_testing.yaml: -------------------------------------------------------------------------------- 1 | remote: origin 2 | target-branch: main 3 | chart-dirs: 4 | - deploy/helm 5 | all: true 6 | -------------------------------------------------------------------------------- /deploy/stackable-operators-ns.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: stackable-operators 6 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/30_delete-snapshot.hbase: -------------------------------------------------------------------------------- 1 | delete_snapshot 'snap'; 2 | 3 | list_snapshots; 4 | 5 | exit; 6 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/30_restore-snapshot.hbase: -------------------------------------------------------------------------------- 1 | restore_snapshot 'snap'; 2 | 3 | get 'test', 'r1' 4 | 5 | exit; 6 | -------------------------------------------------------------------------------- /.actionlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | self-hosted-runner: 3 | # Ubicloud machines we are using 4 | labels: 5 | - ubicloud-standard-8-arm 6 | -------------------------------------------------------------------------------- /.github/actionlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | self-hosted-runner: 3 | # Ubicloud machines we are using 4 | labels: 5 | - ubicloud-standard-8-arm 6 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT, this file is generated by operator-templating 2 | [toolchain] 3 | channel = "1.89.0" 4 | profile = "default" 5 | -------------------------------------------------------------------------------- /docs/modules/hbase/images/phoenix_tables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stackabletech/hbase-operator/HEAD/docs/modules/hbase/images/phoenix_tables.png -------------------------------------------------------------------------------- /.readme/static/borrowed/stackable_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stackabletech/hbase-operator/HEAD/.readme/static/borrowed/stackable_overview.png -------------------------------------------------------------------------------- /docs/modules/hbase/images/phoenix_sqlline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stackabletech/hbase-operator/HEAD/docs/modules/hbase/images/phoenix_sqlline.png -------------------------------------------------------------------------------- /nix/meta.json: -------------------------------------------------------------------------------- 1 | {"operator": {"name": "hbase-operator", "pretty_string": "Apache HBase", "product_string": "hbase", "url": "stackabletech/hbase-operator.git"}} 2 | -------------------------------------------------------------------------------- /.envrc.sample: -------------------------------------------------------------------------------- 1 | # vim: syntax=conf 2 | # 3 | # If you use direnv, you can autoload the nix shell: 4 | # You will need to allow the directory the first time. 5 | use nix 6 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/test_getting_started_helm.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$0")" 5 | ./getting_started.sh helm 6 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/04-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: remove-restserver 6 | timeout: 600 7 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/test_getting_started_stackablectl.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | set -euo pipefail 3 | 4 | cd "$(dirname "$0")" 5 | ./getting_started.sh stackablectl 6 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/reference/crds.adoc: -------------------------------------------------------------------------------- 1 | = CRD Reference 2 | 3 | Find all CRD reference for the Stackable Operator for Apache HBase at: {crd-docs-base-url}/hbase-operator/{crd-docs-version}. 4 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/30-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | --- 5 | apiVersion: v1 6 | kind: ConfigMap 7 | metadata: 8 | name: test-scripts 9 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/04-remove-restserver.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: test-hbase 6 | spec: 7 | restServers: null 8 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.rustfmt.overrideCommand": [ 3 | "rustfmt", 4 | "+nightly-2025-10-23", 5 | "--edition", 6 | "2024", 7 | "--" 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/usage-guide/snapshot-export-secret.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: s3-credentials 6 | data: 7 | access-key-id: myS3AccessKeyId 8 | secret-key: myS3SecretKey 9 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/10-listener-classes.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: | 6 | envsubst < listener-classes.yaml | kubectl apply -n $NAMESPACE -f - 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/11-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | commands: 6 | - script: kubectl -n $NAMESPACE rollout status daemonset opa-server-default --timeout 301s 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/07-test-log-aggregation.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: | 6 | kubectl cp ./test_log_aggregation.py $NAMESPACE/hbase-test-runner-0:/tmp 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/42-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | --- 5 | apiVersion: batch/v1 6 | kind: Job 7 | metadata: 8 | name: test-rest-server 9 | status: 10 | succeeded: 1 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/60-test-phoenix.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: kubectl cp --namespace=$NAMESPACE -c hbase ./test_phoenix.sh test-hbase-restserver-default-0:/tmp 6 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/42-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | --- 5 | apiVersion: batch/v1 6 | kind: Job 7 | metadata: 8 | name: test-rest-server 9 | status: 10 | succeeded: 1 11 | -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- 1 | [MESSAGES CONTROL] 2 | 3 | # These rules are for missing docstrings which doesn't matter much for most of our simple scripts 4 | disable=C0114,C0115,C0116 5 | 6 | [FORMAT] 7 | 8 | max-line-length=999 9 | indent-string=' ' 10 | -------------------------------------------------------------------------------- /.readme/partials/borrowed/header.md.j2: -------------------------------------------------------------------------------- 1 | 2 |

3 | Stackable Logo 4 |

5 | 6 |

{{title}}

7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: batch/v1 7 | kind: Job 8 | metadata: 9 | name: access-hdfs 10 | status: 11 | succeeded: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/41-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: batch/v1 7 | kind: Job 8 | metadata: 9 | name: access-hbase 10 | status: 11 | succeeded: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/30_create-snapshot.hbase: -------------------------------------------------------------------------------- 1 | create 'test', 'cf1'; 2 | put 'test', 'r1', 'cf1', 42; 3 | 4 | snapshot 'test', 'snap'; 5 | 6 | disable 'test'; 7 | drop 'test'; 8 | 9 | list_snapshots; 10 | 11 | exit; 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tests/_work/ 2 | debug/ 3 | target/ 4 | **/*.rs.bk 5 | 6 | .idea/ 7 | *.iws 8 | *.iml 9 | 10 | *.tgz 11 | 12 | result 13 | image.tar 14 | 15 | tilt_options.json 16 | 17 | .direnv/ 18 | .direnvrc 19 | .envrc 20 | 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/20-install-hbase.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | timeout: 600 5 | commands: 6 | - script: > 7 | envsubst < install-hbase.yaml | 8 | kubectl apply -n $NAMESPACE -f - 9 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/41-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: batch/v1 7 | kind: Job 8 | metadata: 9 | name: access-hbase 10 | status: 11 | succeeded: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/50-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | commands: 5 | - script: kubectl exec --namespace=$NAMESPACE omid-tso-server-0 -- bash -c "/stackable/omid-examples/run.sh basic" 6 | timeout: 240 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/05-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | commands: 6 | - script: >- 7 | kubectl exec -n $NAMESPACE test-runner-0 -- 8 | python /stackable/run-profiler.py 9 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/05-run-profiler.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | metadata: 5 | name: run-profiler 6 | commands: 7 | - script: |- 8 | kubectl cp run-profiler.py $NAMESPACE/test-runner-0:/stackable 9 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/12-rego-rules.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | # We need to replace $NAMESPACE (by KUTTL) 6 | - script: envsubst '$NAMESPACE' < 12-rego-rules.txt | kubectl apply -n $NAMESPACE -f - 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/07-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | commands: 5 | - script: >- 6 | kubectl exec --namespace=$NAMESPACE hbase-test-runner-0 -- 7 | python /tmp/test_log_aggregation.py -n $NAMESPACE 8 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/31-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: batch/v1 7 | kind: Job 8 | metadata: 9 | name: test-snapshot-export 10 | status: 11 | succeeded: 1 12 | -------------------------------------------------------------------------------- /.readme/partials/borrowed/related_reading.md.j2: -------------------------------------------------------------------------------- 1 | 2 | {%- if related_reading_links -%} 3 | ## Related Reading 4 | {% for (text, link) in related_reading_links %} 5 | * [{{text}}]({{link}}) 6 | {%- endfor %} 7 | {%- endif -%} 8 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/00-limit-range.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: LimitRange 4 | metadata: 5 | name: limit-request-ratio 6 | spec: 7 | limits: 8 | - type: "Container" 9 | maxLimitRequestRatio: 10 | cpu: 5 11 | memory: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/00-limit-range.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: LimitRange 4 | metadata: 5 | name: limit-request-ratio 6 | spec: 7 | limits: 8 | - type: "Container" 9 | maxLimitRequestRatio: 10 | cpu: 5 11 | memory: 1 12 | -------------------------------------------------------------------------------- /docs/templating_vars.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | helm: 3 | repo_name: sdp-charts 4 | repo_url: oci.stackable.tech 5 | versions: 6 | commons: 0.0.0-dev 7 | secret: 0.0.0-dev 8 | listener: 0.0.0-dev 9 | zookeeper: 0.0.0-dev 10 | hdfs: 0.0.0-dev 11 | hbase: 0.0.0-dev 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/40-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: omid-tso-server 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/00-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/00-limit-range.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: LimitRange 4 | metadata: 5 | name: limit-request-ratio 6 | spec: 7 | limits: 8 | - type: "Container" 9 | maxLimitRequestRatio: 10 | cpu: 5 11 | memory: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/00-limit-range.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: LimitRange 4 | metadata: 5 | name: limit-request-ratio 6 | spec: 7 | limits: 8 | - type: "Container" 9 | maxLimitRequestRatio: 10 | cpu: 5 11 | memory: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/00-limit-range.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: LimitRange 4 | metadata: 5 | name: limit-request-ratio 6 | spec: 7 | limits: 8 | - type: "Container" 9 | maxLimitRequestRatio: 10 | cpu: 5 11 | memory: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: Deployment 8 | metadata: 9 | name: minio 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/00-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/00-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/06-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: hbase-test-runner 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/00-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/04-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-runner 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/02-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-zk-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-zk-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: zookeeper-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/00-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/00-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: zookeeper-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/01-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: hbase-vector-aggregator 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/00-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-zk-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/01-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-zk-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-zk-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 5 | --- 6 | apiVersion: v1 7 | kind: ConfigMap 8 | metadata: 9 | name: vector-aggregator-discovery 10 | {% endif %} 11 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/usage-guide/hbase-regorules.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: hbase-regorules 6 | labels: 7 | opa.stackable.tech/bundle: "true" 8 | data: 9 | hdfs.rego: | 10 | package hbase 11 | 12 | default allow = true 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/01-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-zk-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/11-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-zk-server-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/install_output.txt: -------------------------------------------------------------------------------- 1 | Installed commons=0.0.0-dev operator 2 | Installed secret=0.0.0-dev operator 3 | Installed listener=0.0.0-dev operator 4 | Installed zookeeper=0.0.0-dev operator 5 | Installed hdfs=0.0.0-dev operator 6 | Installed hbase=0.0.0-dev operator 7 | -------------------------------------------------------------------------------- /deploy/helm/ct.yaml: -------------------------------------------------------------------------------- 1 | # This file is used for chart-testing (https://github.com/helm/chart-testing) 2 | # The name "ct.yaml" is not very self-descriptive but it is the default that chart-testing is looking for 3 | --- 4 | remote: origin 5 | target-branch: main 6 | chart-dirs: 7 | - deploy/helm 8 | all: true 9 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | data: 4 | {{ (.Files.Glob "configs/*").AsConfig | indent 2 }} 5 | kind: ConfigMap 6 | metadata: 7 | name: {{ include "operator.fullname" . }}-configmap 8 | labels: 9 | {{- include "operator.labels" . | nindent 4 }} 10 | -------------------------------------------------------------------------------- /docs/modules/hbase/partials/supported-versions.adoc: -------------------------------------------------------------------------------- 1 | // The version ranges supported by HBase-Operator 2 | // This is a separate file, since it is used by both the direct HBase-Operator documentation, and the overarching 3 | // Stackable Platform documentation. 4 | 5 | - 2.6.3 (LTS) 6 | - 2.6.2 (Deprecated) 7 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/zk.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: simple-zk 6 | spec: 7 | image: 8 | productVersion: 3.9.4 9 | servers: 10 | roleGroups: 11 | default: 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/50-test-hbase.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: kubectl cp --namespace=$NAMESPACE ./test-hbase.py hbase-test-runner-0:/tmp 6 | - script: kubectl cp --namespace=$NAMESPACE ./test_prometheus_metrics.py hbase-test-runner-0:/tmp 7 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/zk.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: simple-zk 6 | spec: 7 | image: 8 | productVersion: 3.9.4 9 | servers: 10 | roleGroups: 11 | default: 12 | replicas: 1 13 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/00-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/operations/cluster-operations.adoc: -------------------------------------------------------------------------------- 1 | = Cluster operation 2 | 3 | HBase installations can be configured with different cluster operations like pausing reconciliation or stopping the cluster. 4 | See xref:concepts:operations/cluster_operations.adoc[cluster operations] for more details. 5 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/00-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/00-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/01-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/05-change-regionserver-rolegroup.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: test-hbase 6 | spec: 7 | regionServers: 8 | roleGroups: 9 | default: null 10 | newrolegroup: 11 | replicas: 1 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/01-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/01-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/01-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/00-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/01-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-zk 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-zk-server-default 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/50-test-hbase.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: kubectl cp --namespace=$NAMESPACE ./create_regions.sh test-hbase-master-default-0:/tmp 6 | - script: kubectl cp --namespace=$NAMESPACE ./count_regions.sh test-hbase-master-default-0:/tmp 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-zk 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-zk-server-default 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/40-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: hbase-test-runner 6 | timeout: 300 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: hbase-test-runner 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/00-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/00-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/00-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/01-install-vector-aggregator-discovery-configmap.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: vector-aggregator-discovery 7 | data: 8 | ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/01-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-zk 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-zk-server-default 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/01-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-zk 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-zk-server-default 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/operations/index.adoc: -------------------------------------------------------------------------------- 1 | = Operations 2 | 3 | This section of the documentation is intended for the operations teams that maintain a Stackable Data Platform installation. 4 | 5 | See the xref:concepts:operations/index.adoc[concepts page on operations] for more details on production environment operations. 6 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/Chart.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v2 3 | name: hbase-operator 4 | version: "0.0.0-dev" 5 | appVersion: "0.0.0-dev" 6 | description: The Stackable Operator for Apache HBase 7 | home: https://github.com/stackabletech/hbase-operator 8 | maintainers: 9 | - name: Stackable 10 | url: https://www.stackable.tech 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/04-create-configmap-with-prepared-logs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: > 6 | kubectl create configmap prepared-logs 7 | --from-file=prepared-logs.log4j.xml 8 | --from-file=prepared-logs.log4j2.xml 9 | --namespace=$NAMESPACE 10 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "local>stackabletech/.github:renovate-config" 5 | ], 6 | "ignorePaths": [".github/workflows/build.yaml", ".github/workflows/general_daily_security.yml", ".github/workflows/integration-test.yml", ".github/workflows/pr_pre-commit.yaml"] 7 | } 8 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | {% if test_scenario['values']['kerberos-backend'] == 'mit' %} 6 | --- 7 | apiVersion: apps/v1 8 | kind: StatefulSet 9 | metadata: 10 | name: krb5-kdc 11 | status: 12 | readyReplicas: 1 13 | replicas: 1 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/01-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 300 5 | {% if test_scenario['values']['kerberos-backend'] == 'mit' %} 6 | --- 7 | apiVersion: apps/v1 8 | kind: StatefulSet 9 | metadata: 10 | name: krb5-kdc 11 | status: 12 | readyReplicas: 1 13 | replicas: 1 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/50-setup-example-tx-table.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: kubectl exec --namespace=$NAMESPACE test-hbase-master-default-0 -- bash -c "echo -e \"create 'MY_TX_TABLE', {NAME => 'MY_CF', VERSIONS => '2147483647', TTL => '2147483647'}\" | /stackable/hbase/bin/hbase shell" 6 | timeout: 240 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/10-install-minio.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: >- 6 | helm install minio oci://registry-1.docker.io/bitnamicharts/minio 7 | --version 14.6.9 8 | --values 10_helm-bitnami-minio-values.yaml 9 | --namespace $NAMESPACE 10 | timeout: 240 11 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/install_output.txt.j2: -------------------------------------------------------------------------------- 1 | Installed commons={{ versions.commons }} operator 2 | Installed secret={{ versions.secret }} operator 3 | Installed listener={{ versions.listener }} operator 4 | Installed zookeeper={{ versions.zookeeper }} operator 5 | Installed hdfs={{ versions.hdfs }} operator 6 | Installed hbase={{ versions.hbase }} operator 7 | -------------------------------------------------------------------------------- /.readme/partials/borrowed/overview_blurb.md.j2: -------------------------------------------------------------------------------- 1 | 2 | It is part of the Stackable Data Platform, a curated selection of the best open source data apps like Apache Kafka, Apache Druid, Trino or Apache Spark, [all](#other-operators) working together seamlessly. Based on Kubernetes, it runs everywhere – [on prem or in the cloud](#supported-platforms). 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | debug/ 2 | target/ 3 | **/*.rs.bk 4 | 5 | .idea/ 6 | *.iws 7 | 8 | Cargo.nix 9 | crate-hashes.json 10 | result 11 | image.tar 12 | 13 | # We do NOT want to ignore .git because we use the `built` crate to gather the current git commit hash at built time 14 | # This means we need the .git directory in our Docker image, it will be thrown away and won't be included in the final image 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/znode.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperZnode 4 | metadata: 5 | name: simple-hdfs-znode 6 | spec: 7 | clusterRef: 8 | name: simple-zk 9 | --- 10 | apiVersion: zookeeper.stackable.tech/v1alpha1 11 | kind: ZookeeperZnode 12 | metadata: 13 | name: simple-hbase-znode 14 | spec: 15 | clusterRef: 16 | name: simple-zk 17 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/00-patch-ns.yaml.j2: -------------------------------------------------------------------------------- 1 | {% if test_scenario['values']['openshift'] == 'true' %} 2 | # see https://github.com/stackabletech/issues/issues/566 3 | --- 4 | apiVersion: kuttl.dev/v1beta1 5 | kind: TestStep 6 | commands: 7 | - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' 8 | timeout: 120 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/60-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: test-phoenix-access 6 | commands: 7 | - script: kubectl exec --namespace=$NAMESPACE -c hbase test-hbase-restserver-default-0 -- chmod +x /tmp/test_phoenix.sh 8 | - script: kubectl exec --namespace=$NAMESPACE -c hbase test-hbase-restserver-default-0 -- /tmp/test_phoenix.sh 9 | timeout: 480 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/count_regions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Count the number of regions on server 1. 4 | # It should contain all 15 regions after region server 0 has been restarted. 5 | # 6 | set -euo 'pipefail' 7 | set -x 8 | 9 | REGION_COUNT_ON_1=$(echo "list_regions 't1'" | /stackable/hbase/bin/hbase shell --noninteractive | grep -c test-hbase-regionserver-default-1) 10 | 11 | test "${REGION_COUNT_ON_1}" -eq 15 12 | -------------------------------------------------------------------------------- /scripts/render_readme.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | # Check if jinja2 is there 5 | if ! command -v jinja2 &> /dev/null 6 | then 7 | echo "jinja2 could not be found. Use 'pip install jinja2-cli' to install it." 8 | exit 1 9 | fi 10 | 11 | SCRIPT_DIR=$(dirname "$0") 12 | cd "$SCRIPT_DIR/../.readme" 13 | jinja2 README.md.j2 -o ../README.md 14 | cd .. 15 | 16 | python3 scripts/ensure_one_trailing_newline.py README.md 17 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/50-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: test-hbase 6 | commands: 7 | - script: kubectl exec --namespace=$NAMESPACE hbase-test-runner-0 -- python /tmp/test-hbase.py http://test-hbase-restserver-default-headless:8080 8 | - script: kubectl exec --namespace=$NAMESPACE hbase-test-runner-0 -- python /tmp/test_prometheus_metrics.py $NAMESPACE 9 | timeout: 240 10 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/reference/index.adoc: -------------------------------------------------------------------------------- 1 | = Reference 2 | 3 | Consult the reference documentation section to find exhaustive information on: 4 | 5 | * Descriptions and default values of all properties in the CRDs used by this operator in the xref:reference/crds.adoc[]. 6 | * The properties in the xref:reference/discovery.adoc[]. 7 | * The xref:reference/commandline-parameters.adoc[] and xref:reference/environment-variables.adoc[] accepted by the operator. 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | blank_issues_enabled: true 3 | contact_links: 4 | - name: 🙋🏾 Question 5 | about: Use this to ask a question about this project 6 | url: https://github.com/orgs/stackabletech/discussions/new?category=q-a 7 | - name: 🚀 Feature Requests and other things 8 | about: Open an issue with your feature request or any other issue not covered elsewhere 9 | url: https://github.com/stackabletech/hbase-operator/issues/new 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/04-errors.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: StatefulSet 4 | metadata: 5 | name: test-hbase-restserver-default 6 | --- 7 | apiVersion: v1 8 | kind: Pod 9 | metadata: 10 | name: test-hbase-restserver-default-0 11 | --- 12 | apiVersion: v1 13 | kind: ConfigMap 14 | metadata: 15 | name: test-hbase-restserver-default 16 | --- 17 | apiVersion: v1 18 | kind: Service 19 | metadata: 20 | name: test-hbase-restserver-default 21 | -------------------------------------------------------------------------------- /.hadolint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ignored: 3 | # Warning: Use the -y switch to avoid manual input dnf install -y 4 | # https://github.com/hadolint/hadolint/wiki/DL3038 5 | # Reason: We set `assumeyes=True` in dnf.conf in our base image 6 | - DL3038 7 | 8 | # Warning: Specify version with dnf install -y - 9 | # https://github.com/hadolint/hadolint/wiki/DL3041 10 | # Reason: It's good advice, but we're not set up to pin versions just yet 11 | - DL3041 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/80-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: assert-hbck 6 | commands: 7 | # Run the hbck2 command and tests that the return code is zero (0) 8 | # This proves that the script is successfully starting the operation 9 | # not that the Hbase operation is successful. 10 | - script: kubectl exec --namespace=$NAMESPACE -c hbase test-hbase-restserver-default-0 -- hbck2 recoverUnknown 11 | timeout: 480 12 | -------------------------------------------------------------------------------- /deploy/DO_NOT_EDIT.md: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT 2 | 3 | These Helm charts and manifests are automatically generated. 4 | Please do not edit anything except for files explicitly mentioned below in this 5 | directory manually. 6 | 7 | The following files are ok to edit: 8 | 9 | - helm/hbase-operator/templates/roles.yaml 10 | - helm/hbase-operator/values.yaml 11 | 12 | The details are in-motion but check this repository for a few details: 13 | 14 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/05-errors.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: StatefulSet 4 | metadata: 5 | name: test-hbase-regionserver-default 6 | --- 7 | apiVersion: v1 8 | kind: Pod 9 | metadata: 10 | name: test-hbase-regionserver-default-0 11 | --- 12 | apiVersion: v1 13 | kind: ConfigMap 14 | metadata: 15 | name: test-hbase-regionserver-default 16 | --- 17 | apiVersion: v1 18 | kind: Service 19 | metadata: 20 | name: test-hbase-regionserver-default-listener 21 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | # This file includes unstable features, so you need to run "cargo +nightly fmt" to format your code. 2 | # It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nigthly formatter is prefered. 3 | 4 | # https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rustfmt-style-edition.html 5 | style_edition = "2024" 6 | imports_granularity = "Crate" 7 | group_imports = "StdExternalCrate" 8 | reorder_impl_items = true 9 | use_field_init_shorthand = true 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/40-grant-testuser-access.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: kubectl exec -n $NAMESPACE -it hbase-master-default-0 -c hbase -- bash -c 'klist -kt /stackable/kerberos/keytab && kinit -kt /stackable/kerberos/keytab hbase/hbase.'"$NAMESPACE"'.svc.cluster.local && klist' 6 | - script: kubectl exec -n $NAMESPACE -it hbase-master-default-0 -c hbase -- bash -c "echo -e \"grant 'testuser', 'C';\nexit;\" | bin/hbase shell" 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/30-install-test-scripts-configmap.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: | 6 | kubectl create configmap test-scripts \ 7 | --namespace $NAMESPACE \ 8 | --from-file=test-export.sh=30_test-export.sh \ 9 | --from-file=create-snapshot.hbase=30_create-snapshot.hbase \ 10 | --from-file=delete-snapshot.hbase=30_delete-snapshot.hbase \ 11 | --from-file=restore-snapshot.hbase=30_restore-snapshot.hbase 12 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/01-install-hbase-vector-aggregator.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: >- 6 | helm install hbase-vector-aggregator vector 7 | --namespace $NAMESPACE 8 | --version 0.45.0 9 | --repo https://helm.vector.dev 10 | --values hbase-vector-aggregator-values.yaml 11 | --- 12 | apiVersion: v1 13 | kind: ConfigMap 14 | metadata: 15 | name: hbase-vector-aggregator-discovery 16 | data: 17 | ADDRESS: hbase-vector-aggregator:6123 18 | -------------------------------------------------------------------------------- /.yamllint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | 4 | ignore: | 5 | deploy/helm/**/templates 6 | 7 | rules: 8 | line-length: disable 9 | truthy: 10 | check-keys: false 11 | comments: 12 | min-spaces-from-content: 1 # Needed due to https://github.com/adrienverge/yamllint/issues/443 13 | indentation: 14 | indent-sequences: consistent 15 | comments-indentation: disable # This is generally useless and interferes with commented example values 16 | braces: 17 | max-spaces-inside: 1 18 | max-spaces-inside-empty: 0 19 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "lldb", 6 | "request": "launch", 7 | "name": "Debug operator binary", 8 | "cargo": { 9 | "args": ["build"], 10 | "filter": { 11 | "name": "stackable-{[ operator.name }]", 12 | "kind": "bin" 13 | } 14 | }, 15 | "args": ["run"], 16 | "cwd": "${workspaceFolder}" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/hdfs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: simple-hdfs 6 | spec: 7 | image: 8 | productVersion: 3.4.2 9 | clusterConfig: 10 | dfsReplication: 1 11 | zookeeperConfigMapName: simple-hdfs-znode 12 | nameNodes: 13 | roleGroups: 14 | default: 15 | replicas: 2 16 | dataNodes: 17 | roleGroups: 18 | default: 19 | replicas: 1 20 | journalNodes: 21 | roleGroups: 22 | default: 23 | replicas: 1 24 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: simple-hdfs 6 | spec: 7 | image: 8 | productVersion: 3.4.2 9 | clusterConfig: 10 | dfsReplication: 1 11 | zookeeperConfigMapName: simple-hdfs-znode 12 | nameNodes: 13 | roleGroups: 14 | default: 15 | replicas: 2 16 | dataNodes: 17 | roleGroups: 18 | default: 19 | replicas: 1 20 | journalNodes: 21 | roleGroups: 22 | default: 23 | replicas: 1 24 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/31-run-tests.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | # Use the same HBase image in the test Job as in the HBase master StatefulSet 6 | - script: >- 7 | HBASE_IMAGE=$( 8 | kubectl get statefulsets.apps test-hbase-master-default 9 | --namespace $NAMESPACE 10 | --output=jsonpath='{.spec.template.spec.containers[?(.name=="hbase")].image}' 11 | ) 12 | envsubst < 31_test-snapshot-export-job.yaml | 13 | kubectl apply --namespace $NAMESPACE --filename - 14 | -------------------------------------------------------------------------------- /tests/interu.yaml: -------------------------------------------------------------------------------- 1 | runners: 2 | amd64: 3 | platform: aks-1.32 4 | ttl: 6h 5 | node-groups: 6 | - name: default 7 | arch: amd64 8 | size: medium 9 | disk-gb: 100 10 | nodes: 3 11 | 12 | profiles: 13 | # TODO (@Techassi): This will be enabled later 14 | # schedule: 15 | # strategy: use-runner 16 | # runner: amd64 17 | # options: 18 | # beku-parallelism: 2 19 | smoke-latest: 20 | strategy: use-runner 21 | runner: amd64 22 | options: 23 | beku-parallelism: 2 24 | beku-test-suite: smoke-latest 25 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/16-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 900 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/listener-classes.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: listeners.stackable.tech/v1alpha1 3 | kind: ListenerClass 4 | metadata: 5 | name: test-cluster-internal-$NAMESPACE 6 | spec: 7 | serviceType: ClusterIP 8 | --- 9 | apiVersion: listeners.stackable.tech/v1alpha1 10 | kind: ListenerClass 11 | metadata: 12 | name: test-external-stable-$NAMESPACE 13 | spec: 14 | serviceType: NodePort 15 | --- 16 | apiVersion: listeners.stackable.tech/v1alpha1 17 | kind: ListenerClass 18 | metadata: 19 | name: test-external-unstable-$NAMESPACE 20 | spec: 21 | serviceType: NodePort 22 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/11-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 900 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: hdfs-journalnode-default 18 | status: 19 | readyReplicas: 3 20 | replicas: 3 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: hdfs-datanode-default 26 | status: 27 | readyReplicas: 2 28 | replicas: 2 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/06-install-hbase-test-runner.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: StatefulSet 4 | metadata: 5 | name: hbase-test-runner 6 | labels: 7 | app: hbase-test-runner 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: hbase-test-runner 13 | template: 14 | metadata: 15 | labels: 16 | app: hbase-test-runner 17 | spec: 18 | containers: 19 | - name: hbase-test-runner 20 | image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev 21 | stdin: true 22 | tty: true 23 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/30-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: hbase-master-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: hbase-regionserver-default 18 | status: 19 | readyReplicas: 2 20 | replicas: 2 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: hbase-restserver-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/30-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: hbase-master-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: hbase-regionserver-default 18 | status: 19 | readyReplicas: 2 20 | replicas: 2 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: hbase-restserver-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/index.adoc: -------------------------------------------------------------------------------- 1 | = Usage guide 2 | 3 | Learn about xref:usage-guide/operations/cluster-operations.adoc[starting, stopping and pausing] your cluster. 4 | 5 | Learn about xref:usage-guide/operations/pod-placement.adoc[configuring where Pods are scheduled] and xref:usage-guide/resource-requests.adoc[how many CPU and memory resources] your Pods consume. 6 | 7 | You can observe what's happening with your HBase using xref:usage-guide/logging.adoc[logging] and xref:usage-guide/monitoring.adoc[monitoring]. 8 | 9 | Connect to HBase using xref:usage-guide/phoenix.adoc[Apache Phoenix]. 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/03-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/11-install-opa.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: opa.stackable.tech/v1alpha1 3 | kind: OpaCluster 4 | metadata: 5 | name: opa 6 | spec: 7 | image: 8 | {% if test_scenario['values']['opa'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['opa'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['opa'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['opa'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | servers: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | roleGroups: 19 | default: {} 20 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/02-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/03-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hbase-master-default 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hbase-regionserver-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hbase-restserver-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/02-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/12-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hdfs-namenode-default 10 | status: 11 | readyReplicas: 2 12 | replicas: 2 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hdfs-journalnode-default 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hdfs-datanode-default 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/05-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: change-regionserver-rolegroup 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hbase-regionserver-newrolegroup 12 | --- 13 | apiVersion: v1 14 | kind: Pod 15 | metadata: 16 | name: test-hbase-regionserver-newrolegroup-0 17 | --- 18 | apiVersion: v1 19 | kind: ConfigMap 20 | metadata: 21 | name: test-hbase-regionserver-newrolegroup 22 | --- 23 | apiVersion: v1 24 | kind: Service 25 | metadata: 26 | name: test-hbase-regionserver-newrolegroup-headless 27 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/40-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | skipLogOutput: true 6 | commands: 7 | - script: kubectl get cm -n $NAMESPACE test-hbase-master-default -o yaml | grep -- 'HBASE_HEAPSIZE="819m"' 8 | - script: kubectl get cm -n $NAMESPACE test-hbase-regionserver-resources-from-role -o yaml | grep -- 'HBASE_HEAPSIZE="819m"' 9 | - script: kubectl get cm -n $NAMESPACE test-hbase-regionserver-resources-from-role-group -o yaml | grep -- 'HBASE_HEAPSIZE="1638m"' 10 | - script: kubectl get cm -n $NAMESPACE test-hbase-restserver-default -o yaml | grep -- 'HBASE_HEAPSIZE="409m"' 11 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hdfs 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hdfs-namenode-default 12 | status: 13 | readyReplicas: 2 14 | replicas: 2 15 | --- 16 | apiVersion: apps/v1 17 | kind: StatefulSet 18 | metadata: 19 | name: test-hdfs-journalnode-default 20 | status: 21 | readyReplicas: 1 22 | replicas: 1 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hdfs-datanode-default 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hdfs 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hdfs-namenode-default 12 | status: 13 | readyReplicas: 2 14 | replicas: 2 15 | --- 16 | apiVersion: apps/v1 17 | kind: StatefulSet 18 | metadata: 19 | name: test-hdfs-journalnode-default 20 | status: 21 | readyReplicas: 1 22 | replicas: 1 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hdfs-datanode-default 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/.helmignore: -------------------------------------------------------------------------------- 1 | # ============= 2 | # This file is automatically generated from the templates in stackabletech/operator-templating 3 | # DON'T MANUALLY EDIT THIS FILE 4 | # ============= 5 | 6 | # Patterns to ignore when building packages. 7 | # This supports shell glob matching, relative path matching, and 8 | # negation (prefixed with !). Only one pattern per line. 9 | .DS_Store 10 | # Common VCS dirs 11 | .git/ 12 | .gitignore 13 | .bzr/ 14 | .bzrignore 15 | .hg/ 16 | .hgignore 17 | .svn/ 18 | # Common backup files 19 | *.swp 20 | *.bak 21 | *.tmp 22 | *.orig 23 | *~ 24 | # Various IDEs 25 | .project 26 | .idea/ 27 | *.tmproj 28 | .vscode/ 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/02-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hdfs 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hdfs-namenode-default 12 | status: 13 | readyReplicas: 2 14 | replicas: 2 15 | --- 16 | apiVersion: apps/v1 17 | kind: StatefulSet 18 | metadata: 19 | name: test-hdfs-journalnode-default 20 | status: 21 | readyReplicas: 1 22 | replicas: 1 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hdfs-datanode-default 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/02-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hdfs 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hdfs-namenode-default 12 | status: 13 | readyReplicas: 2 14 | replicas: 2 15 | --- 16 | apiVersion: apps/v1 17 | kind: StatefulSet 18 | metadata: 19 | name: test-hdfs-journalnode-default 20 | status: 21 | readyReplicas: 1 22 | replicas: 1 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hdfs-datanode-default 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/03-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hbase 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hbase-master-default 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | --- 16 | apiVersion: apps/v1 17 | kind: StatefulSet 18 | metadata: 19 | name: test-hbase-regionserver-default 20 | status: 21 | readyReplicas: 1 22 | replicas: 1 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hbase-restserver-default 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hbase 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hbase-master-default 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | --- 16 | apiVersion: apps/v1 17 | kind: StatefulSet 18 | metadata: 19 | name: test-hbase-regionserver-default 20 | status: 21 | readyReplicas: 1 22 | replicas: 1 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hbase-restserver-default 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/templates/service.yaml: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | apiVersion: v1 4 | kind: Service 5 | metadata: 6 | # Note(@sbernauer): We could also call the Service something like 7 | # "product-operator-conversion-webhook". However, in the future we will have more webhooks, and 8 | # it seems like an overkill to have a dedicated Service per webhook. 9 | name: {{ include "operator.fullname" . }} 10 | labels: 11 | {{- include "operator.labels" . | nindent 4 }} 12 | spec: 13 | selector: 14 | {{- include "operator.selectorLabels" . | nindent 6 }} 15 | ports: 16 | - name: conversion-webhook 17 | protocol: TCP 18 | port: 8443 19 | targetPort: 8443 20 | -------------------------------------------------------------------------------- /tests/release.yaml: -------------------------------------------------------------------------------- 1 | # Contains all operators required to run the test suite. 2 | --- 3 | releases: 4 | # Do not change the name of the release as it's referenced from run-tests 5 | tests: 6 | releaseDate: 1970-01-01 7 | description: Integration test 8 | products: 9 | commons: 10 | operatorVersion: 0.0.0-dev 11 | secret: 12 | operatorVersion: 0.0.0-dev 13 | listener: 14 | operatorVersion: 0.0.0-dev 15 | zookeeper: 16 | operatorVersion: 0.0.0-dev 17 | hdfs: 18 | operatorVersion: 0.0.0-dev 19 | hbase: 20 | operatorVersion: 0.0.0-dev 21 | opa: 22 | operatorVersion: 0.0.0-dev 23 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/test_phoenix.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Usage: test_phoenix.sh 3 | 4 | result=$(/stackable/phoenix/bin/psql.py /stackable/phoenix/examples/WEB_STAT.sql /stackable/phoenix/examples/WEB_STAT.csv /stackable/phoenix/examples/WEB_STAT_QUERIES.sql | grep 'EU') 5 | # expected: EU 150 6 | echo "Phoenix query result: $result" 7 | 8 | # split into elements 9 | IFS=" " read -r -a result <<< "$result" 10 | el0=${result[0]} 11 | el1=${result[1]} 12 | 13 | if [ "$el1" == '150' ]; then 14 | echo "[SUCCESS] Selected query result: $el0 -> $el1" 15 | else 16 | echo "[ERROR] Query failed!" 17 | exit 1 18 | fi 19 | 20 | echo "[SUCCESS] Phoenix test was successful!" 21 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/10-install-zk.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: zookeeper 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | clusterConfig: 10 | listenerClass: 'cluster-internal' 11 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/normal-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Normal issue 3 | about: This is just a normal empty issue with a simple checklist 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Issue checklist 11 | 12 | This is a simple checklist of things to bear in mind when creating a new issue. 13 | 14 | - [ ] Describe the use-case, as far is possible. For instance, using the pattern "As a XXXX, I would like XXXX to be able to do XXXX" helps to identify the feature as well as the problem it is intended to address. 15 | - [ ] Indicate an approximate level of importance and urgency. 16 | - [ ] Indicate if there is a known work-around until such time as the issue has been implemented. 17 | -------------------------------------------------------------------------------- /.readme/README.md.j2: -------------------------------------------------------------------------------- 1 | {%- set title="Stackable Operator for Apache HBase" -%} 2 | {%- set operator_name="hbase" -%} 3 | {%- set operator_docs_slug="hbase" -%} 4 | {%- set related_reading_links=[] -%} 5 | 6 | {% filter trim %} 7 | {%- include "partials/borrowed/header.md.j2" -%} 8 | {% endfilter %} 9 | 10 | {% filter trim %} 11 | {%- include "partials/borrowed/links.md.j2" -%} 12 | {% endfilter %} 13 | 14 | {% filter trim %} 15 | {%- include "partials/main.md.j2" -%} 16 | {% endfilter %} 17 | 18 | {% filter trim %} 19 | {%- include "partials/borrowed/footer.md.j2" -%} 20 | {% endfilter %} 21 | 22 | {% filter trim %} 23 | {%- include "partials/borrowed/related_reading.md.j2" -%} 24 | {% endfilter %} 25 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/31-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # This test checks if the containerdebug-state.json file is present and valid 3 | apiVersion: kuttl.dev/v1beta1 4 | kind: TestAssert 5 | timeout: 600 6 | commands: 7 | - script: kubectl exec -n $NAMESPACE --container hbase test-hbase-master-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status '"valid JSON"' 8 | - script: kubectl exec -n $NAMESPACE --container hbase test-hbase-regionserver-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status '"valid JSON"' 9 | - script: kubectl exec -n $NAMESPACE --container hbase test-hbase-restserver-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status '"valid JSON"' 10 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/20-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: stop-hbase 6 | timeout: 180 7 | commands: 8 | - script: kubectl -n $NAMESPACE wait --for=condition=stopped hbaseclusters.hbase.stackable.tech/test-hbase --timeout 181s 9 | --- 10 | apiVersion: apps/v1 11 | kind: StatefulSet 12 | metadata: 13 | name: test-hbase-master-default 14 | status: 15 | replicas: 0 16 | --- 17 | apiVersion: apps/v1 18 | kind: StatefulSet 19 | metadata: 20 | name: test-hbase-regionserver-default 21 | status: 22 | replicas: 0 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hbase-restserver-default 28 | status: 29 | replicas: 0 30 | -------------------------------------------------------------------------------- /.github/workflows/general_daily_security.yml: -------------------------------------------------------------------------------- 1 | # ============= 2 | # This file is automatically generated from the templates in stackabletech/operator-templating 3 | # DON'T MANUALLY EDIT THIS FILE 4 | # ============= 5 | --- 6 | name: Daily Security Audit 7 | 8 | on: 9 | schedule: 10 | - cron: '15 4 * * *' 11 | workflow_dispatch: 12 | 13 | permissions: {} 14 | 15 | jobs: 16 | audit: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 20 | with: 21 | persist-credentials: false 22 | - uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0 23 | with: 24 | token: ${{ secrets.GITHUB_TOKEN }} 25 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/00-rbac.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Role 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | metadata: 5 | name: test-role 6 | rules: 7 | {% if test_scenario['values']['openshift'] == "true" %} 8 | - apiGroups: ["security.openshift.io"] 9 | resources: ["securitycontextconstraints"] 10 | resourceNames: ["privileged"] 11 | verbs: ["use"] 12 | {% endif %} 13 | --- 14 | apiVersion: v1 15 | kind: ServiceAccount 16 | metadata: 17 | name: test-sa 18 | --- 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: test-rb 23 | subjects: 24 | - kind: ServiceAccount 25 | name: test-sa 26 | roleRef: 27 | kind: Role 28 | name: test-role 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/00-rbac.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Role 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | metadata: 5 | name: test-role 6 | rules: 7 | {% if test_scenario['values']['openshift'] == "true" %} 8 | - apiGroups: ["security.openshift.io"] 9 | resources: ["securitycontextconstraints"] 10 | resourceNames: ["privileged"] 11 | verbs: ["use"] 12 | {% endif %} 13 | --- 14 | apiVersion: v1 15 | kind: ServiceAccount 16 | metadata: 17 | name: test-sa 18 | --- 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: test-rb 23 | subjects: 24 | - kind: ServiceAccount 25 | name: test-sa 26 | roleRef: 27 | kind: Role 28 | name: test-role 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/00-rbac.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Role 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | metadata: 5 | name: test-role 6 | rules: 7 | {% if test_scenario['values']['openshift'] == "true" %} 8 | - apiGroups: ["security.openshift.io"] 9 | resources: ["securitycontextconstraints"] 10 | resourceNames: ["privileged"] 11 | verbs: ["use"] 12 | {% endif %} 13 | --- 14 | apiVersion: v1 15 | kind: ServiceAccount 16 | metadata: 17 | name: test-sa 18 | --- 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: test-rb 23 | subjects: 24 | - kind: ServiceAccount 25 | name: test-sa 26 | roleRef: 27 | kind: Role 28 | name: test-role 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/hbase.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: simple-hbase 6 | spec: 7 | image: 8 | productVersion: 2.6.3 9 | clusterConfig: 10 | hdfsConfigMapName: simple-hdfs 11 | zookeeperConfigMapName: simple-hbase-znode 12 | masters: 13 | roleGroups: 14 | default: 15 | replicas: 1 16 | regionServers: 17 | roleGroups: 18 | default: 19 | config: 20 | resources: 21 | cpu: 22 | min: 300m 23 | max: "3" 24 | memory: 25 | limit: 3Gi 26 | replicas: 1 27 | restServers: 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/getting_started/hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: simple-hbase 6 | spec: 7 | image: 8 | productVersion: 2.6.3 9 | clusterConfig: 10 | hdfsConfigMapName: simple-hdfs 11 | zookeeperConfigMapName: simple-hbase-znode 12 | masters: 13 | roleGroups: 14 | default: 15 | replicas: 1 16 | regionServers: 17 | roleGroups: 18 | default: 19 | config: 20 | resources: 21 | cpu: 22 | min: 300m 23 | max: "3" 24 | memory: 25 | limit: 3Gi 26 | replicas: 1 27 | restServers: 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/reference/commandline-parameters.adoc: -------------------------------------------------------------------------------- 1 | = Command Line Parameters 2 | 3 | This operator accepts the following command line parameters: 4 | 5 | == product-config 6 | 7 | *Default value*: `/etc/stackable/hbase-operator/config-spec/properties.yaml` 8 | 9 | *Required*: false 10 | 11 | *Multiple values:* false 12 | 13 | [source] 14 | ---- 15 | stackable-hbase-operator run --product-config /foo/bar/properties.yaml 16 | ---- 17 | 18 | == watch-namespace 19 | 20 | *Default value*: All namespaces 21 | 22 | *Required*: false 23 | 24 | *Multiple values:* false 25 | 26 | The operator **only** watches for resources in the provided namespace `test`: 27 | 28 | [source] 29 | ---- 30 | stackable-hbase-operator run --watch-namespace test 31 | ---- 32 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/00-rbac.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Role 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | metadata: 5 | name: test-role 6 | rules: 7 | {% if test_scenario['values']['openshift'] == "true" %} 8 | - apiGroups: ["security.openshift.io"] 9 | resources: ["securitycontextconstraints"] 10 | resourceNames: ["privileged"] 11 | verbs: ["use"] 12 | {% endif %} 13 | --- 14 | apiVersion: v1 15 | kind: ServiceAccount 16 | metadata: 17 | name: test-sa 18 | --- 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: test-rb 23 | subjects: 24 | - kind: ServiceAccount 25 | name: test-sa 26 | roleRef: 27 | kind: Role 28 | name: test-role 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/kerberos/10-install-zk.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: zookeeper 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | listenerClass: {{ test_scenario['values']['listener-class'] }} 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | servers: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 1 23 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/00-rbac.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Role 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | metadata: 5 | name: test-role 6 | rules: 7 | {% if test_scenario['values']['openshift'] == "true" %} 8 | - apiGroups: ["security.openshift.io"] 9 | resources: ["securitycontextconstraints"] 10 | resourceNames: ["privileged"] 11 | verbs: ["use"] 12 | {% endif %} 13 | --- 14 | apiVersion: v1 15 | kind: ServiceAccount 16 | metadata: 17 | name: test-sa 18 | --- 19 | kind: RoleBinding 20 | apiVersion: rbac.authorization.k8s.io/v1 21 | metadata: 22 | name: test-rb 23 | subjects: 24 | - kind: ServiceAccount 25 | name: test-sa 26 | roleRef: 27 | kind: Role 28 | name: test-role 29 | apiGroup: rbac.authorization.k8s.io 30 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/templates/_maintenance.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Create a list of maintenance related env vars. 3 | */}} 4 | {{- define "maintenance.envVars" -}} 5 | {{- with .Values.maintenance }} 6 | {{- if not .endOfSupportCheck.enabled }} 7 | - name: EOS_DISABLED 8 | value: "true" 9 | {{- end }} 10 | {{- if and .endOfSupportCheck.enabled .endOfSupportCheck.mode }} 11 | - name: EOS_CHECK_MODE 12 | value: {{ .endOfSupportCheck.mode }} 13 | {{ end }} 14 | {{- if and .endOfSupportCheck.enabled .endOfSupportCheck.interval }} 15 | - name: EOS_INTERVAL 16 | value: {{ .endOfSupportCheck.interval }} 17 | {{ end }} 18 | {{- if not .customResourceDefinitions.maintain }} 19 | - name: DISABLE_CRD_MAINTENANCE 20 | value: "true" 21 | {{- end }} 22 | {{- end }} 23 | {{- end }} 24 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/03-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | commands: 6 | - script: kubectl -n $NAMESPACE wait --for=condition=available hbaseclusters.hbase.stackable.tech/test-hbase --timeout 601s 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hbase-master-default 12 | status: 13 | readyReplicas: 1 14 | replicas: 1 15 | --- 16 | apiVersion: apps/v1 17 | kind: StatefulSet 18 | metadata: 19 | name: test-hbase-regionserver-default 20 | status: 21 | readyReplicas: 1 22 | replicas: 1 23 | --- 24 | apiVersion: apps/v1 25 | kind: StatefulSet 26 | metadata: 27 | name: test-hbase-restserver-default 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | -------------------------------------------------------------------------------- /nix/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Updating nix dependencies 7 | 8 | ## Run the following for an operator 9 | 10 | > [!NOTE] 11 | > We track the `master` branch of crate2nix as that is relatively up to date, but the releases are infrequent. 12 | 13 | ```shell 14 | niv update crate2nix 15 | niv update nixpkgs 16 | niv update beku.py -b X.Y.Z # Using the release tag 17 | ``` 18 | 19 | ### Test 20 | 21 | - Run make `regenerate-nix` to ensure crate2nix works 22 | - Run a smoke test to ensure beku.py works. 23 | - Run `make run-dev` to ensure nixpkgs are fine. 24 | 25 | ## Update operator-templating 26 | 27 | Do the same as above, but from `template/` 28 | -------------------------------------------------------------------------------- /.readme/partials/borrowed/documentation.md.j2: -------------------------------------------------------------------------------- 1 | 2 | ## Documentation 3 | 4 | The stable documentation for this operator can be found in our [Stackable Data Platform documentation](https://docs.stackable.tech/home/stable/{{operator_docs_slug}}). 5 | If you are interested in the most recent state of this repository, check out the [nightly docs](https://docs.stackable.tech/home/nightly/{{operator_docs_slug}}) instead. 6 | 7 | The documentation for all Stackable products can be found at [docs.stackable.tech](https://docs.stackable.tech). 8 | 9 | If you have a question about the Stackable Data Platform, contact us via our [homepage](https://stackable.tech/) or ask a public question in our [Discussions forum](https://github.com/orgs/stackabletech/discussions). 10 | -------------------------------------------------------------------------------- /.readme/partials/main.md.j2: -------------------------------------------------------------------------------- 1 | This is a Kubernetes operator to manage [Apache HBase](https://hbase.apache.org/) clusters. 2 | 3 | {% filter trim %} 4 | {%- include "partials/borrowed/overview_blurb.md.j2" -%} 5 | {% endfilter %} 6 | 7 | ## Installation 8 | 9 | You can install the operator using [stackablectl or helm](https://docs.stackable.tech/home/stable/{{operator_name}}/getting_started/installation). 10 | 11 | Read on to get started with it, or see it in action in one of our [demos](https://stackable.tech/en/demos/). 12 | 13 | ## Getting Started 14 | 15 | You can follow this [tutorial](https://docs.stackable.tech/home/stable/{{operator_name}}/getting_started/first_steps). 16 | 17 | {% filter trim %} 18 | {%- include "partials/borrowed/documentation.md.j2" -%} 19 | {% endfilter %} 20 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/40-install-hbase-test-runner.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: StatefulSet 4 | metadata: 5 | name: hbase-test-runner 6 | labels: 7 | app: hbase-test-runner 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: hbase-test-runner 13 | template: 14 | metadata: 15 | labels: 16 | app: hbase-test-runner 17 | spec: 18 | containers: 19 | - name: hbase-test-runner 20 | image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev 21 | stdin: true 22 | tty: true 23 | resources: 24 | requests: 25 | memory: "128Mi" 26 | cpu: "100m" 27 | limits: 28 | memory: "128Mi" 29 | cpu: "500m" 30 | -------------------------------------------------------------------------------- /.readme/partials/borrowed/links.md.j2: -------------------------------------------------------------------------------- 1 | 2 | [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/stackabletech/{{operator_name}}-operator/graphs/commit-activity) 3 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://docs.stackable.tech/home/stable/contributor/index.html) 4 | [![License OSL3.0](https://img.shields.io/badge/license-OSL3.0-green)](./LICENSE) 5 | 6 | [Documentation](https://docs.stackable.tech/home/stable/{{operator_docs_slug}}) {% if quickstart_link %}| [Quickstart]({{quickstart_link}}) {% endif %}| [Stackable Data Platform](https://stackable.tech/) | [Platform Docs](https://docs.stackable.tech/) | [Discussions](https://github.com/orgs/stackabletech/discussions) | [Discord](https://discord.gg/7kZ3BNnCAF) 7 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/30-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: restart-hbase 6 | timeout: 180 7 | commands: 8 | - script: kubectl -n $NAMESPACE wait --for=condition=available hbaseclusters.hbase.stackable.tech/test-hbase --timeout 181s 9 | --- 10 | apiVersion: apps/v1 11 | kind: StatefulSet 12 | metadata: 13 | name: test-hbase-master-default 14 | status: 15 | readyReplicas: 1 16 | replicas: 1 17 | --- 18 | apiVersion: apps/v1 19 | kind: StatefulSet 20 | metadata: 21 | name: test-hbase-regionserver-default 22 | status: 23 | readyReplicas: 1 24 | replicas: 1 25 | --- 26 | apiVersion: apps/v1 27 | kind: StatefulSet 28 | metadata: 29 | name: test-hbase-restserver-default 30 | status: 31 | readyReplicas: 1 32 | replicas: 1 33 | -------------------------------------------------------------------------------- /scripts/generate-manifests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # This script reads a Helm chart from deploy/helm/hbase-operator and 3 | # generates manifest files into deploy/manifestss 4 | set -e 5 | 6 | tmp=$(mktemp -d ./manifests-XXXXX) 7 | 8 | helm template --output-dir "$tmp" \ 9 | --include-crds \ 10 | --name-template hbase-operator \ 11 | deploy/helm/hbase-operator 12 | 13 | for file in "$tmp"/hbase-operator/*/*; do 14 | yq eval -i 'del(.. | select(has("app.kubernetes.io/managed-by")) | ."app.kubernetes.io/managed-by")' /dev/stdin < "$file" 15 | yq eval -i 'del(.. | select(has("helm.sh/chart")) | ."helm.sh/chart")' /dev/stdin < "$file" 16 | sed -i '/# Source: .*/d' "$file" 17 | done 18 | 19 | cp -r "$tmp"/hbase-operator/*/* deploy/manifests/ 20 | 21 | rm -rf "$tmp" 22 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/10-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: pause-hbase 6 | timeout: 180 7 | commands: 8 | - script: kubectl -n $NAMESPACE wait --for=condition=reconciliationPaused hbaseclusters.hbase.stackable.tech/test-hbase --timeout 181s 9 | --- 10 | apiVersion: apps/v1 11 | kind: StatefulSet 12 | metadata: 13 | name: test-hbase-master-default 14 | status: 15 | readyReplicas: 1 16 | replicas: 1 17 | --- 18 | apiVersion: apps/v1 19 | kind: StatefulSet 20 | metadata: 21 | name: test-hbase-regionserver-default 22 | status: 23 | readyReplicas: 1 24 | replicas: 1 25 | --- 26 | apiVersion: apps/v1 27 | kind: StatefulSet 28 | metadata: 29 | name: test-hbase-restserver-default 30 | status: 31 | readyReplicas: 1 32 | replicas: 1 33 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/50-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # This test works as follows: 3 | # - given 4 | # - an HBase cluster with two region servers (0 and 1) 5 | # - create a table + column familiy with 15 regions 6 | # - where region server 0 has some regions assigned to it 7 | # - restart server 0 (the region mover is triggerred by the shutdown) 8 | # - assert that server 1 now hosts all 15 regions 9 | apiVersion: kuttl.dev/v1beta1 10 | kind: TestAssert 11 | metadata: 12 | name: test-hbase 13 | commands: 14 | - script: kubectl exec --namespace=$NAMESPACE test-hbase-master-default-0 -- /tmp/create_regions.sh 15 | - script: kubectl delete --namespace=$NAMESPACE pod/test-hbase-regionserver-default-0 16 | - script: sleep 10 17 | - script: kubectl exec --namespace=$NAMESPACE test-hbase-master-default-0 -- /tmp/count_regions.sh 18 | timeout: 240 19 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/operations/pod-disruptions.adoc: -------------------------------------------------------------------------------- 1 | = Allowed Pod disruptions 2 | 3 | You can configure the permitted Pod disruptions for HBase nodes as described in xref:concepts:operations/pod_disruptions.adoc[]. 4 | 5 | Unless you configure something else or disable our PodDisruptionBudgets (PDBs), the default PDBs are configured as follows: 6 | 7 | == Master 8 | Only a single Master is allowed to be offline at any given time, regardless of the number of replicas or `roleGroups`. 9 | 10 | == RegionServer 11 | Only a single RegionServer is allowed to be offline at any given time, regardless of the number of replicas or `roleGroups`, to have as little data unavailable as possible at any given time. 12 | 13 | == RestServer 14 | Only a single RestServer is allowed to be offline at any given time, regardless of the number of replicas or `roleGroups`. 15 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/02-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 11 | clusterConfig: 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/01-normal-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Normal issue 3 | about: This is just a normal empty issue with a simple checklist 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Issue checklist 11 | 12 | This is a simple checklist of things to bear in mind when creating a new issue. 13 | 14 | - [ ] **Describe the use-case**: As far as possible, use the pattern "As a [type of user], I would like [feature/functionality] to be able to do [specific action]." This helps identify the feature and the problem it addresses. 15 | - [ ] **Indicate importance and urgency**: Use a scale (e.g., low, medium, high) to indicate the level of importance and urgency. 16 | - [ ] **Work-around**: If there is a known work-around, describe it briefly. 17 | - [ ] **Environment**: Describe the environment where the issue occurs (e.g., SDP version, K8S version, etc.). 18 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/10-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 11 | clusterConfig: 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/01-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 11 | clusterConfig: 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/10-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 11 | clusterConfig: 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/01-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 11 | clusterConfig: 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/01-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 11 | clusterConfig: 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/01-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 11 | clusterConfig: 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/11-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 12 | vectorAggregatorConfigMapName: vector-aggregator-discovery 13 | {% endif %} 14 | servers: 15 | config: 16 | gracefulShutdownTimeout: 1m 17 | logging: 18 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 19 | roleGroups: 20 | default: 21 | replicas: 1 22 | --- 23 | apiVersion: zookeeper.stackable.tech/v1alpha1 24 | kind: ZookeeperZnode 25 | metadata: 26 | name: test-znode 27 | spec: 28 | clusterRef: 29 | name: test-zk 30 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/logging.adoc: -------------------------------------------------------------------------------- 1 | = Log aggregation 2 | :description: The logs can be forwarded to a Vector log aggregator by providing a discovery ConfigMap for the aggregator and by enabling the log agent 3 | 4 | The logs can be forwarded to a Vector log aggregator by providing a discovery ConfigMap for the aggregator and by enabling the log agent: 5 | 6 | [source,yaml] 7 | ---- 8 | spec: 9 | clusterConfig: 10 | vectorAggregatorConfigMapName: vector-aggregator-discovery 11 | masters: 12 | config: 13 | logging: 14 | enableVectorAgent: true 15 | regionServers: 16 | config: 17 | logging: 18 | enableVectorAgent: true 19 | restServers: 20 | config: 21 | logging: 22 | enableVectorAgent: true 23 | ---- 24 | 25 | Further information on how to configure logging, can be found in xref:concepts:logging.adoc[]. 26 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/usage-guide/hbck2-job.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: batch/v1 3 | kind: Job 4 | metadata: 5 | name: hbck2-recover-unknown 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: hbck2 11 | image: oci.stackable.tech/sdp/hbase:2.6.3-stackable0.0.0-dev 12 | volumeMounts: 13 | - name: hbase-config 14 | mountPath: /stackable/conf 15 | env: 16 | - name: HBASE_CONF_DIR 17 | value: /stackable/conf 18 | - name: HADOOP_CONF_DIR 19 | value: /stackable/conf 20 | command: 21 | - hbck2 22 | args: 23 | - recoverUnknown 24 | volumes: 25 | - name: hbase-config 26 | projected: 27 | sources: 28 | - configMap: 29 | name: simple-hdfs 30 | - configMap: 31 | name: simple-hbase-master-default 32 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/usage-guide/hbck2-job.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: batch/v1 3 | kind: Job 4 | metadata: 5 | name: hbck2-recover-unknown 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: hbck2 11 | image: oci.stackable.tech/sdp/hbase:2.6.3-stackable{{ versions.hbase }} 12 | volumeMounts: 13 | - name: hbase-config 14 | mountPath: /stackable/conf 15 | env: 16 | - name: HBASE_CONF_DIR 17 | value: /stackable/conf 18 | - name: HADOOP_CONF_DIR 19 | value: /stackable/conf 20 | command: 21 | - hbck2 22 | args: 23 | - recoverUnknown 24 | volumes: 25 | - name: hbase-config 26 | projected: 27 | sources: 28 | - configMap: 29 | name: simple-hdfs 30 | - configMap: 31 | name: simple-hbase-master-default 32 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/30-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hbase 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hbase-master-default 12 | spec: 13 | template: 14 | spec: 15 | terminationGracePeriodSeconds: 60 16 | status: 17 | readyReplicas: 2 18 | replicas: 2 19 | --- 20 | apiVersion: apps/v1 21 | kind: StatefulSet 22 | metadata: 23 | name: test-hbase-regionserver-default 24 | spec: 25 | template: 26 | spec: 27 | terminationGracePeriodSeconds: 60 28 | status: 29 | readyReplicas: 1 30 | replicas: 1 31 | --- 32 | apiVersion: apps/v1 33 | kind: StatefulSet 34 | metadata: 35 | name: test-hbase-restserver-default 36 | spec: 37 | template: 38 | spec: 39 | terminationGracePeriodSeconds: 60 40 | status: 41 | readyReplicas: 1 42 | replicas: 1 43 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/10-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | listenerClass: "cluster-internal" 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | servers: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 1 23 | --- 24 | apiVersion: zookeeper.stackable.tech/v1alpha1 25 | kind: ZookeeperZnode 26 | metadata: 27 | name: test-znode 28 | spec: 29 | clusterRef: 30 | name: test-zk 31 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/getting_started/index.adoc: -------------------------------------------------------------------------------- 1 | = Getting started 2 | 3 | This guide gets you started with HBase using the Stackable operator. 4 | It guides you through the installation of the operator and its dependencies, setting up your first HBase cluster and verifying its operation. 5 | 6 | == Prerequisites 7 | 8 | To get started you need: 9 | 10 | * a Kubernetes cluster 11 | * kubectl 12 | * jq, a commandline JSON processor 13 | * optional: Helm 14 | 15 | Resource sizing depends on cluster type(s), usage and scope, but as a starting point we recommend a minimum of the following resources for this operator: 16 | 17 | * 0.2 cores (e.g. i5 or similar) 18 | * 256MB RAM 19 | 20 | == What's next 21 | 22 | The guide is divided into two steps: 23 | 24 | * xref:getting_started/installation.adoc[Installing the Operators]. 25 | * xref:getting_started/first_steps.adoc[Setting up the HBase cluster and verifying it works]. 26 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/10-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['zookeeper'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | listenerClass: {{ test_scenario['values']['listener-class'] }} 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | servers: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 1 23 | --- 24 | apiVersion: zookeeper.stackable.tech/v1alpha1 25 | kind: ZookeeperZnode 26 | metadata: 27 | name: test-znode 28 | spec: 29 | clusterRef: 30 | name: test-zk 31 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # All defaults or options can be checked here: 3 | # https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml 4 | 5 | # Default state for all rules 6 | default: true 7 | 8 | # MD013/line-length - Line length 9 | MD013: 10 | # Number of characters 11 | line_length: 9999 12 | # Number of characters for headings 13 | heading_line_length: 9999 14 | # Number of characters for code blocks 15 | code_block_line_length: 9999 16 | 17 | # MD033/no-inline-html 18 | MD033: 19 | allowed_elements: [h1, img, p] 20 | 21 | # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content 22 | MD024: 23 | # Only check sibling headings 24 | siblings_only: true 25 | 26 | # MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading 27 | MD041: false # Github issues and PRs already have titles, and H1 is enormous in the description box. 28 | -------------------------------------------------------------------------------- /rust/operator-binary/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "stackable-hbase-operator" 3 | description = "Stackable Operator for Apache HBase" 4 | version.workspace = true 5 | authors.workspace = true 6 | license.workspace = true 7 | edition.workspace = true 8 | repository.workspace = true 9 | publish = false 10 | 11 | [dependencies] 12 | product-config.workspace = true 13 | stackable-operator.workspace = true 14 | 15 | anyhow.workspace = true 16 | clap.workspace = true 17 | const_format.workspace = true 18 | fnv.workspace = true 19 | futures.workspace = true 20 | indoc.workspace = true 21 | serde.workspace = true 22 | serde_json.workspace = true 23 | shell-escape.workspace = true 24 | snafu.workspace = true 25 | strum.workspace = true 26 | tokio.workspace = true 27 | tracing.workspace = true 28 | 29 | [build-dependencies] 30 | built.workspace = true 31 | 32 | [dev-dependencies] 33 | rstest.workspace = true 34 | serde_yaml.workspace = true 35 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/04-install-test-container.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | metadata: 5 | name: install-test-container 6 | timeout: 300 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-runner 12 | labels: 13 | app: test-runner 14 | spec: 15 | replicas: 1 16 | selector: 17 | matchLabels: 18 | app: test-runner 19 | template: 20 | metadata: 21 | labels: 22 | app: test-runner 23 | spec: 24 | serviceAccountName: test-sa 25 | securityContext: 26 | fsGroup: 1000 27 | containers: 28 | - name: python 29 | image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev 30 | stdin: true 31 | tty: true 32 | resources: 33 | requests: 34 | memory: "128Mi" 35 | cpu: "512m" 36 | limits: 37 | memory: "128Mi" 38 | cpu: "1" 39 | -------------------------------------------------------------------------------- /rust/operator-binary/src/operations/graceful_shutdown.rs: -------------------------------------------------------------------------------- 1 | use snafu::{ResultExt, Snafu}; 2 | use stackable_operator::builder::pod::PodBuilder; 3 | 4 | use crate::crd::AnyServiceConfig; 5 | 6 | #[derive(Debug, Snafu)] 7 | pub enum Error { 8 | #[snafu(display("Failed to set terminationGracePeriod"))] 9 | SetTerminationGracePeriod { 10 | source: stackable_operator::builder::pod::Error, 11 | }, 12 | } 13 | 14 | pub fn add_graceful_shutdown_config( 15 | merged_config: &AnyServiceConfig, 16 | pod_builder: &mut PodBuilder, 17 | ) -> Result<(), Error> { 18 | // This must be always set by the merge mechanism, as we provide a default value, 19 | // users can not disable graceful shutdown. 20 | if let Some(graceful_shutdown_timeout) = merged_config.graceful_shutdown_timeout() { 21 | pod_builder 22 | .termination_grace_period(graceful_shutdown_timeout) 23 | .context(SetTerminationGracePeriodSnafu)?; 24 | } 25 | 26 | Ok(()) 27 | } 28 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/create_regions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Create a table with 15 regions and count the number of regions on server 0. 4 | # It should be more than 0. 5 | # 6 | set -x 7 | 8 | # We need to check if t1 exists first before creating the table. 9 | # The table might already be there if in a previous run, the final test 10 | # for regions on server 0 fails. 11 | # This can happen if Hbase didn't get to assign anything there yet and 12 | # so kuttl re-runs this test step. 13 | T1_EXISTS=$(echo "list" | /stackable/hbase/bin/hbase shell --noninteractive | grep -c t1) 14 | if [ "$T1_EXISTS" == "0" ]; then 15 | /stackable/hbase/bin/hbase shell --noninteractive <<'EOF' 16 | balance_switch false; 17 | create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}; 18 | EOF 19 | fi 20 | 21 | REGION_COUNT_ON_0=$(echo "list_regions 't1'" | /stackable/hbase/bin/hbase shell --noninteractive | grep -c test-hbase-regionserver-default-0) 22 | 23 | test "${REGION_COUNT_ON_0}" -ge 0 24 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Helm Chart for Stackable Operator for Apache HBase 3 | 4 | This Helm Chart can be used to install Custom Resource Definitions and the Operator for Apache HBase provided by Stackable. 5 | 6 | ## Requirements 7 | 8 | - Create a [Kubernetes Cluster](../Readme.md) 9 | - Install [Helm](https://helm.sh/docs/intro/install/) 10 | 11 | ## Install the Stackable Operator for Apache HBase 12 | 13 | ```bash 14 | # From the root of the operator repository 15 | make compile-chart 16 | 17 | helm install hbase-operator deploy/helm/hbase-operator 18 | ``` 19 | 20 | ## Usage of the CRDs 21 | 22 | The usage of this operator and its CRDs is described in the [documentation](https://docs.stackable.tech/hbase/index.html) 23 | 24 | The operator has example requests included in the [`/examples`](https://github.com/stackabletech/hbase-operator/tree/main/examples) directory. 25 | 26 | ## Links 27 | 28 | 29 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | {{ if .Values.serviceAccount.create -}} 3 | apiVersion: v1 4 | kind: ServiceAccount 5 | metadata: 6 | name: {{ include "operator.fullname" . }}-serviceaccount 7 | labels: 8 | {{- include "operator.labels" . | nindent 4 }} 9 | {{- with .Values.serviceAccount.annotations }} 10 | annotations: 11 | {{- toYaml . | nindent 4 }} 12 | {{- end }} 13 | --- 14 | apiVersion: rbac.authorization.k8s.io/v1 15 | # This cluster role binding allows anyone in the "manager" group to read secrets in any namespace. 16 | kind: ClusterRoleBinding 17 | metadata: 18 | name: {{ include "operator.fullname" . }}-clusterrolebinding 19 | labels: 20 | {{- include "operator.labels" . | nindent 4 }} 21 | subjects: 22 | - kind: ServiceAccount 23 | name: {{ include "operator.fullname" . }}-serviceaccount 24 | namespace: {{ .Release.Namespace }} 25 | roleRef: 26 | kind: ClusterRole 27 | name: {{ include "operator.fullname" . }}-clusterrole 28 | apiGroup: rbac.authorization.k8s.io 29 | {{- end }} 30 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/42-test-rest-server.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: batch/v1 3 | kind: Job 4 | metadata: 5 | name: test-rest-server 6 | spec: 7 | template: 8 | spec: 9 | serviceAccountName: test-sa 10 | containers: 11 | - name: test-rest-server 12 | image: oci.stackable.tech/sdp/testing-tools:0.2.0-stackable0.0.0-dev 13 | command: 14 | - /bin/bash 15 | - -c 16 | - | 17 | status_code=$(curl --write-out '%{http_code}' --silent --insecure --output /dev/null "https://hbase-restserver-default-headless:8080") 18 | 19 | if [[ "$status_code" -eq 401 ]] ; then 20 | echo "[PASS] Successfully got 401 as we did not authenticate" 21 | exit 0 22 | else 23 | echo "[FAIL] Expected the restserver to return a 401 as we did not authenticate" 24 | exit 1 25 | fi 26 | securityContext: 27 | fsGroup: 1000 28 | runAsGroup: 1000 29 | runAsUser: 1000 30 | restartPolicy: OnFailure 31 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/hbck2.adoc: -------------------------------------------------------------------------------- 1 | = Repairing a cluster with HBCK2 2 | :description: Use HBCK2 from hbase-operator-tools to repair HBase clusters. It helps fix issues like unknown RegionServers via the hbck2 script. 3 | :hbck2-github: https://github.com/apache/hbase-operator-tools/tree/master/hbase-hbck2 4 | :hbase-operator-tools-github: https://github.com/apache/hbase-operator-tools/ 5 | 6 | {hbck2-github}[HBCK2] is the repair tool for Apache HBase clusters. 7 | It is included in the {hbase-operator-tools-github}[hbase-operator-tools]. 8 | The hbase-operator-tools are installed in the Docker image provided by Stackable in the directory `/stackable/hbase-operator-tools/`. 9 | HBCK2 can be executed via the wrapper script `hbck2`. 10 | 11 | For instance, if you followed the xref:getting_started/first_steps.adoc[] then you have a cluster called `simple-hbase` running. 12 | Let us assume that the HBase user interface reports unknown RegionServers, then you can schedule the ServerCrashProcedure for these RegionServers by applying the following Job: 13 | 14 | [source,yaml] 15 | ---- 16 | include::example$usage-guide/hbck2-job.yaml[] 17 | ---- 18 | -------------------------------------------------------------------------------- /scripts/docs_templating.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | # Reads a file with variables to insert into templates, and templates all .*.j2 files 5 | # in the 'docs' directory. 6 | # 7 | # dependencies 8 | # pip install jinja2-cli 9 | 10 | docs_dir="$(dirname "$0")/../docs" 11 | templating_vars_file="$docs_dir/templating_vars.yaml" 12 | 13 | # Check if files need templating 14 | if [[ -z $(find "$docs_dir" -name '*.j2') ]]; 15 | then 16 | echo "No files need templating, exiting." 17 | exit 18 | fi 19 | 20 | # Check if jinja2 is there 21 | if ! command -v jinja2 &> /dev/null 22 | then 23 | echo "jinja2 could not be found. Use 'pip install jinja2-cli' to install it." 24 | exit 1 25 | fi 26 | 27 | # Check if templating vars file exists 28 | if [[ ! -f "$templating_vars_file" ]]; 29 | then 30 | echo "$templating_vars_file does not exist, cannot start templating." 31 | fi 32 | 33 | find "$docs_dir" -name '*.j2' | 34 | while read -r file 35 | do 36 | new_file_name=${file%.j2} # Remove .j2 suffix 37 | echo "templating $new_file_name" 38 | jinja2 "$file" "$templating_vars_file" -o "$new_file_name" 39 | done 40 | 41 | echo "done" 42 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/10-install-zookeeper.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: zookeeper.stackable.tech/v1alpha1 3 | kind: ZookeeperCluster 4 | metadata: 5 | name: test-zk 6 | spec: 7 | image: 8 | {% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | clusterConfig: 16 | listenerClass: cluster-internal 17 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 18 | vectorAggregatorConfigMapName: vector-aggregator-discovery 19 | {% endif %} 20 | servers: 21 | config: 22 | gracefulShutdownTimeout: 1m 23 | logging: 24 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 25 | roleGroups: 26 | default: 27 | replicas: 1 28 | --- 29 | apiVersion: zookeeper.stackable.tech/v1alpha1 30 | kind: ZookeeperZnode 31 | metadata: 32 | name: test-znode 33 | spec: 34 | clusterRef: 35 | name: test-zk 36 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/05-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hbase-master-automatic-log-config 10 | status: 11 | readyReplicas: 1 12 | replicas: 1 13 | --- 14 | apiVersion: apps/v1 15 | kind: StatefulSet 16 | metadata: 17 | name: test-hbase-master-custom-log-config 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hbase-regionserver-automatic-log-config 26 | status: 27 | readyReplicas: 1 28 | replicas: 1 29 | --- 30 | apiVersion: apps/v1 31 | kind: StatefulSet 32 | metadata: 33 | name: test-hbase-regionserver-custom-log-config 34 | status: 35 | readyReplicas: 1 36 | replicas: 1 37 | --- 38 | apiVersion: apps/v1 39 | kind: StatefulSet 40 | metadata: 41 | name: test-hbase-restserver-automatic-log-config 42 | status: 43 | readyReplicas: 1 44 | replicas: 1 45 | --- 46 | apiVersion: apps/v1 47 | kind: StatefulSet 48 | metadata: 49 | name: test-hbase-restserver-custom-log-config 50 | status: 51 | readyReplicas: 1 52 | replicas: 1 53 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Version 3 | about: Request support for a new product version 4 | title: "[NEW VERSION]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Which new version of Apache HBase should we support? 11 | 12 | Please specify the version, version range or version numbers to support, please also add these to the issue title 13 | 14 | ## Additional information 15 | 16 | If possible, provide a link to release notes/changelog 17 | 18 | ## Changes required 19 | 20 | Are there any upstream changes that we need to support? 21 | e.g. new features, changed features, deprecated features etc. 22 | 23 | ## Implementation checklist 24 | 25 | 29 | 30 | - [ ] Update the Docker image 31 | - [ ] Update documentation to include supported version(s) 32 | - [ ] Update and test getting started guide with updated version(s) 33 | - [ ] Update operator to support the new version (if needed) 34 | - [ ] Update integration tests to test use the new versions (in addition or replacing old versions 35 | - [ ] Update examples to use new versions 36 | -------------------------------------------------------------------------------- /tests/kuttl-test.yaml.jinja2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestSuite 4 | testDirs: 5 | {% for testcase in testinput.tests %} 6 | - ./tests/{{ testcase.name }} 7 | {% endfor %} 8 | 9 | startKIND: false 10 | suppress: ["events"] 11 | parallel: 2 12 | 13 | # The timeout (in seconds) is used when namespaces are created or 14 | # deleted, and, if not overridden, in TestSteps, TestAsserts, and 15 | # Commands. If not set, the timeout is 30 seconds by default. 16 | # 17 | # The deletion of a namespace can take a while until all resources, 18 | # especially PersistentVolumeClaims, are gracefully shut down. If the 19 | # timeout is reached in the meantime, even a successful test case is 20 | # considered a failure. 21 | # 22 | # For instance, the termination grace period of the Vector aggregator in 23 | # the logging tests is set to 60 seconds. If there are logs entries 24 | # which could not be forwarded yet to the external aggregator defined in 25 | # the VECTOR_AGGREGATOR environment variable, then the test aggregator 26 | # uses this period of time by trying to forward the events. In this 27 | # case, deleting a namespace with several Pods takes about 90 seconds. 28 | timeout: 300 29 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/03-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | zookeeperConfigMapName: test-znode 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | nameNodes: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 2 23 | dataNodes: 24 | config: 25 | gracefulShutdownTimeout: 1m 26 | logging: 27 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | journalNodes: 32 | config: 33 | gracefulShutdownTimeout: 1m 34 | logging: 35 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | -------------------------------------------------------------------------------- /rust/operator-binary/src/crd/security.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | use stackable_operator::{ 3 | commons::opa::OpaConfig, 4 | schemars::{self, JsonSchema}, 5 | }; 6 | 7 | #[derive(Clone, Debug, Deserialize, Eq, Hash, JsonSchema, PartialEq, Serialize)] 8 | #[serde(rename_all = "camelCase")] 9 | pub struct AuthenticationConfig { 10 | /// Name of the SecretClass providing the tls certificates for the WebUIs. 11 | #[serde(default = "default_tls_secret_class")] 12 | pub tls_secret_class: String, 13 | 14 | /// Kerberos configuration. 15 | pub kerberos: KerberosConfig, 16 | } 17 | 18 | fn default_tls_secret_class() -> String { 19 | "tls".to_string() 20 | } 21 | 22 | #[derive(Clone, Debug, Deserialize, Eq, Hash, JsonSchema, PartialEq, Serialize)] 23 | #[serde(rename_all = "camelCase")] 24 | pub struct KerberosConfig { 25 | /// Name of the SecretClass providing the keytab for the HBase services. 26 | pub secret_class: String, 27 | } 28 | #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] 29 | #[serde(rename_all = "camelCase")] 30 | pub struct AuthorizationConfig { 31 | // No doc - it's in the struct. 32 | pub opa: OpaConfig, 33 | } 34 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/20-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | zookeeperConfigMapName: test-znode 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | nameNodes: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 2 23 | dataNodes: 24 | config: 25 | gracefulShutdownTimeout: 1m 26 | logging: 27 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | journalNodes: 32 | config: 33 | gracefulShutdownTimeout: 1m 34 | logging: 35 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | -------------------------------------------------------------------------------- /tests/templates/kuttl/resources/20-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | zookeeperConfigMapName: test-znode 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | nameNodes: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 2 23 | dataNodes: 24 | config: 25 | gracefulShutdownTimeout: 1m 26 | logging: 27 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | journalNodes: 32 | config: 33 | gracefulShutdownTimeout: 1m 34 | logging: 35 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/pre-release-getting-started-script.md: -------------------------------------------------------------------------------- 1 | ## Check and Update Getting Started Script 2 | 3 | 7 | 8 | 11 | 12 | Part of 13 | 14 | > [!NOTE] 15 | > During a Stackable release we need to check (and optionally update) the 16 | > getting-started scripts to ensure they still work after product and operator 17 | > updates. 18 | 19 | ```shell 20 | # Some of the scripts are in a code/ subdirectory 21 | # pushd docs/modules/superset/examples/getting_started 22 | # pushd docs/modules/superset/examples/getting_started/code 23 | pushd $(fd -td getting_started | grep examples); cd code 2>/dev/null || true 24 | 25 | # Make a fresh cluster (~12 seconds) 26 | kind delete cluster && kind create cluster 27 | ./getting_started.sh stackablectl 28 | 29 | # Make a fresh cluster (~12 seconds) 30 | kind delete cluster && kind create cluster 31 | ./getting_started.sh helm 32 | 33 | popd 34 | ``` 35 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/02-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | zookeeperConfigMapName: test-znode 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | nameNodes: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 2 23 | dataNodes: 24 | config: 25 | gracefulShutdownTimeout: 1m 26 | logging: 27 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | journalNodes: 32 | config: 33 | gracefulShutdownTimeout: 1m 34 | logging: 35 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/02-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | zookeeperConfigMapName: test-znode 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | nameNodes: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 2 23 | dataNodes: 24 | config: 25 | gracefulShutdownTimeout: 1m 26 | logging: 27 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | journalNodes: 32 | config: 33 | gracefulShutdownTimeout: 1m 34 | logging: 35 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/12-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | zookeeperConfigMapName: test-znode 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | nameNodes: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | logging: 19 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 20 | roleGroups: 21 | default: 22 | replicas: 2 23 | dataNodes: 24 | config: 25 | gracefulShutdownTimeout: 1m 26 | logging: 27 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 28 | roleGroups: 29 | default: 30 | replicas: 1 31 | journalNodes: 32 | config: 33 | gracefulShutdownTimeout: 1m 34 | logging: 35 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/listenerclass.adoc: -------------------------------------------------------------------------------- 1 | = Service exposition with ListenerClasses 2 | :description: Configure HBase service exposure using ListenerClasses to control internal and external access for all roles. 3 | 4 | The operator deploys a xref:listener-operator:listener.adoc[Listener] for each Master, Regionserver and Restserver pod. 5 | They all default to only being accessible from within the Kubernetes cluster, but this can be changed by setting `.spec.{masters,regionServers,restServers}.config.listenerClass`: 6 | 7 | [source,yaml] 8 | ---- 9 | spec: 10 | masters: 11 | config: 12 | listenerClass: external-unstable # <1> 13 | regionServers: 14 | config: 15 | listenerClass: external-unstable 16 | restServers: 17 | config: 18 | listenerClass: external-unstable 19 | ---- 20 | <1> Specify one of `external-stable`, `external-unstable`, `cluster-internal` (the default setting is `cluster-internal`). 21 | This can be set separately for all roles. 22 | 23 | Listener endpoints are written to `hbase-site.xml` like this: 24 | 25 | [source,xml] 26 | ---- 27 | 28 | hbase.listener.endpoint 29 | 172.19.0.3:32445 30 | 31 | ---- 32 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/02-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | dfsReplication: 1 12 | zookeeperConfigMapName: test-znode 13 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 14 | vectorAggregatorConfigMapName: vector-aggregator-discovery 15 | {% endif %} 16 | nameNodes: 17 | config: 18 | gracefulShutdownTimeout: 1m 19 | logging: 20 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 21 | roleGroups: 22 | default: 23 | replicas: 2 24 | dataNodes: 25 | config: 26 | gracefulShutdownTimeout: 1m 27 | logging: 28 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 29 | roleGroups: 30 | default: 31 | replicas: 1 32 | journalNodes: 33 | config: 34 | gracefulShutdownTimeout: 1m 35 | logging: 36 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 37 | roleGroups: 38 | default: 39 | replicas: 1 40 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/02-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | dfsReplication: 1 12 | zookeeperConfigMapName: test-znode 13 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 14 | vectorAggregatorConfigMapName: vector-aggregator-discovery 15 | {% endif %} 16 | nameNodes: 17 | config: 18 | gracefulShutdownTimeout: 1m 19 | logging: 20 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 21 | roleGroups: 22 | default: 23 | replicas: 2 24 | dataNodes: 25 | config: 26 | gracefulShutdownTimeout: 1m 27 | logging: 28 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 29 | roleGroups: 30 | default: 31 | replicas: 1 32 | journalNodes: 33 | config: 34 | gracefulShutdownTimeout: 1m 35 | logging: 36 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 37 | roleGroups: 38 | default: 39 | replicas: 1 40 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/20-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 9 | pullPolicy: IfNotPresent 10 | clusterConfig: 11 | zookeeperConfigMapName: test-znode 12 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 13 | vectorAggregatorConfigMapName: vector-aggregator-discovery 14 | {% endif %} 15 | nameNodes: 16 | config: 17 | gracefulShutdownTimeout: 1m 18 | listenerClass: "cluster-internal" 19 | logging: 20 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 21 | roleGroups: 22 | default: 23 | replicas: 2 24 | dataNodes: 25 | config: 26 | gracefulShutdownTimeout: 1m 27 | listenerClass: "cluster-internal" 28 | logging: 29 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 30 | roleGroups: 31 | default: 32 | replicas: 1 33 | journalNodes: 34 | config: 35 | gracefulShutdownTimeout: 1m 36 | logging: 37 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 38 | roleGroups: 39 | default: 40 | replicas: 1 41 | -------------------------------------------------------------------------------- /tests/templates/kuttl/opa/02-create-kerberos-secretclass.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | commands: 5 | - script: | 6 | kubectl apply -n $NAMESPACE -f - < 0 }} 21 | roleGroups: 22 | default: 23 | replicas: 2 24 | dataNodes: 25 | config: 26 | gracefulShutdownTimeout: 1m 27 | listenerClass: {{ test_scenario['values']['listener-class'] }} 28 | logging: 29 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 30 | roleGroups: 31 | default: 32 | replicas: 1 33 | journalNodes: 34 | config: 35 | gracefulShutdownTimeout: 1m 36 | logging: 37 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 38 | roleGroups: 39 | default: 40 | replicas: 1 41 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["rust/operator-binary"] 3 | resolver = "2" 4 | 5 | [workspace.package] 6 | version = "0.0.0-dev" 7 | authors = ["Stackable GmbH "] 8 | license = "OSL-3.0" 9 | edition = "2021" 10 | repository = "https://github.com/stackabletech/hbase-operator" 11 | 12 | [workspace.dependencies] 13 | product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" } 14 | stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.100.1" } 15 | 16 | anyhow = "1.0" 17 | built = { version = "0.8", features = ["chrono", "git2"] } 18 | clap = "4.5" 19 | const_format = "0.2" 20 | fnv = "1.0" 21 | futures = { version = "0.3", features = ["compat"] } 22 | indoc = "2.0" 23 | rstest = "0.26" 24 | serde = { version = "1.0", features = ["derive"] } 25 | serde_json = "1.0" 26 | serde_yaml = "0.9" 27 | shell-escape = "0.1" 28 | snafu = "0.8" 29 | strum = { version = "0.27", features = ["derive"] } 30 | tokio = { version = "1.40", features = ["full"] } 31 | tracing = "0.1" 32 | 33 | # [patch."https://github.com/stackabletech/operator-rs.git"] 34 | # stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" } 35 | # stackable-operator = { path = "../operator-rs/crates/stackable-operator" } 36 | -------------------------------------------------------------------------------- /crate-hashes.json: -------------------------------------------------------------------------------- 1 | { 2 | "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#k8s-version@0.1.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", 3 | "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-operator-derive@0.3.1": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", 4 | "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-operator@0.100.1": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", 5 | "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-shared@0.0.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", 6 | "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-telemetry@0.6.1": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", 7 | "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-versioned-macros@0.8.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", 8 | "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-versioned@0.8.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", 9 | "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" 10 | } -------------------------------------------------------------------------------- /.github/workflows/pr_pre-commit.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: pre-commit 3 | 4 | on: 5 | pull_request: 6 | merge_group: 7 | 8 | env: 9 | CARGO_TERM_COLOR: always 10 | NIX_PKG_MANAGER_VERSION: "2.30.0" 11 | RUST_TOOLCHAIN_VERSION: "nightly-2025-10-23" 12 | HADOLINT_VERSION: "v2.14.0" 13 | PYTHON_VERSION: "3.14" 14 | JINJA2_CLI_VERSION: "0.8.2" 15 | 16 | jobs: 17 | pre-commit: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: Install host dependencies 21 | uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0 22 | with: 23 | packages: protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config apt-transport-https 24 | version: ubuntu-latest 25 | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 26 | with: 27 | persist-credentials: false 28 | submodules: recursive 29 | fetch-depth: 0 30 | - uses: stackabletech/actions/run-pre-commit@29bea1b451c0c2e994bd495969286f95bf49ed6a # v0.11.0 31 | with: 32 | python-version: ${{ env.PYTHON_VERSION }} 33 | rust: ${{ env.RUST_TOOLCHAIN_VERSION }} 34 | hadolint: ${{ env.HADOLINT_VERSION }} 35 | nix: ${{ env.NIX_PKG_MANAGER_VERSION }} 36 | nix-github-token: ${{ secrets.GITHUB_TOKEN }} 37 | jinja2-cli: ${{ env.JINJA2_CLI_VERSION }} 38 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/pre-release-rust-deps.md: -------------------------------------------------------------------------------- 1 | ## Bump Rust Dependencies for Stackable Release YY.M.X 2 | 3 | 7 | 8 | 11 | 12 | Part of 13 | 14 | > [!NOTE] 15 | > During a Stackable release we need to update various Rust dependencies before 16 | > entering the final release period to ensure we run the latest versions of 17 | > crates. These bumps also include previously updated and released crates from 18 | > the `operator-rs` repository. 19 | 20 | ### Tasks 21 | 22 | - [ ] Bump Rust Dependencies, see below for more details. 23 | - [ ] Add changelog entry stating which important crates were bumped (including the version). 24 | 25 | > [!NOTE] 26 | > The bumping / updating of Rust dependencies is done in multiple steps: 27 | > 28 | > 1. Update the minimum Version in the root `Cargo.toml` manifest. 29 | > 2. Run the `cargo update` command, which also updates the `Cargo.lock` file. 30 | > 3. Lastly, run `make regenerate-nix` to update the `Cargo.nix` file. 31 | 32 | ### Bump Rust Dependencies 33 | 34 | - [ ] Bump `stackable-operator` and friends 35 | - [ ] Bump `product-config` 36 | - [ ] Bump all other dependencies 37 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/compression.adoc: -------------------------------------------------------------------------------- 1 | = Compression support 2 | :hbase-docs-compression: https://hbase.apache.org/book.html#changing.compression 3 | :description: Stackable HBase supports GZip and Snappy compression. Learn to enable and use compression for column families via HBase Shell commands. 4 | 5 | Stackable images of Apache HBase support compressed column families. 6 | The following compression algorithms are supported for all HBase 2.4 versions: 7 | 8 | * GZip 9 | * Snappy 10 | 11 | Later versions of HBase might support a different set of compression algorithms. 12 | 13 | See the {hbase-docs-compression}[HBase documentation] for the details on how to enable compression for specific column families. 14 | 15 | Here is one example on how to use the HBase Shell to create a table with a single column family that uses the Snappy algorithm for compression: 16 | 17 | [source,text] 18 | ---- 19 | hbase:014:0> create 'COMPRESSION_TEST', {NAME => 'cf1', COMPRESSION => 'SNAPPY'} 20 | Created table COMPRESSION_TEST 21 | Took 1.1206 seconds 22 | => Hbase::Table - COMPRESSION_TEST 23 | hbase:015:0> put 'COMPRESSION_TEST', 'row_XYZ', 'cf1', 'abc123' 24 | Took 0.0087 seconds 25 | hbase:016:0> scan 'COMPRESSION_TEST' 26 | ROW COLUMN+CELL 27 | row_XYZ column=cf1:, timestamp=2023-10-20T10:46:03.509, value=abc123 28 | 1 row(s) 29 | Took 0.0047 seconds 30 | ---- 31 | -------------------------------------------------------------------------------- /docs/modules/hbase/partials/nav.adoc: -------------------------------------------------------------------------------- 1 | * xref:hbase:getting_started/index.adoc[] 2 | ** xref:hbase:getting_started/installation.adoc[] 3 | ** xref:hbase:getting_started/first_steps.adoc[] 4 | * xref:hbase:usage-guide/index.adoc[] 5 | ** xref:hbase:usage-guide/listenerclass.adoc[] 6 | ** xref:hbase:usage-guide/security.adoc[] 7 | ** xref:hbase:usage-guide/resource-requests.adoc[] 8 | ** xref:hbase:usage-guide/phoenix.adoc[] 9 | ** xref:hbase:usage-guide/compression.adoc[] 10 | ** xref:hbase:usage-guide/logging.adoc[] 11 | ** xref:hbase:usage-guide/monitoring.adoc[] 12 | ** xref:hbase:usage-guide/overrides.adoc[] 13 | ** xref:hbase:usage-guide/hbck2.adoc[] 14 | ** xref:hbase:usage-guide/snapshot-export.adoc[] 15 | ** xref:hbase:usage-guide/adls.adoc[] 16 | ** xref:hbase:usage-guide/operations/index.adoc[] 17 | *** xref:hbase:usage-guide/operations/cluster-operations.adoc[] 18 | *** xref:hbase:usage-guide/operations/pod-placement.adoc[] 19 | *** xref:hbase:usage-guide/operations/pod-disruptions.adoc[] 20 | *** xref:hbase:usage-guide/operations/graceful-shutdown.adoc[] 21 | * xref:hbase:reference/index.adoc[] 22 | ** xref:hbase:reference/crds.adoc[] 23 | *** {crd-docs}/hbase.stackable.tech/hbasecluster/v1alpha1/[HbaseCluster {external-link-icon}^] 24 | ** xref:hbase:reference/discovery.adoc[] 25 | ** xref:hbase:reference/commandline-parameters.adoc[] 26 | ** xref:hbase:reference/environment-variables.adoc[] 27 | * xref:hbase:troubleshooting/index.adoc[] 28 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/20-install-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: test-hbase 6 | spec: 7 | image: 8 | {% if test_scenario['values']['hbase'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['hbase'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['hbase'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['hbase'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | clusterConfig: 16 | hdfsConfigMapName: test-hdfs 17 | zookeeperConfigMapName: test-znode 18 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 19 | vectorAggregatorConfigMapName: vector-aggregator-discovery 20 | {% endif %} 21 | masters: 22 | config: 23 | gracefulShutdownTimeout: 1m 24 | logging: 25 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 26 | roleGroups: 27 | default: 28 | replicas: 1 29 | regionServers: 30 | config: 31 | gracefulShutdownTimeout: 1m 32 | logging: 33 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 34 | roleGroups: 35 | default: 36 | replicas: 1 37 | restServers: 38 | config: 39 | gracefulShutdownTimeout: 1m 40 | logging: 41 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 42 | roleGroups: 43 | default: 44 | replicas: 1 45 | -------------------------------------------------------------------------------- /tests/templates/kuttl/profiling/03-install-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: test-hbase 6 | spec: 7 | image: 8 | {% if test_scenario['values']['hbase'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['hbase'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['hbase'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['hbase'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | clusterConfig: 16 | hdfsConfigMapName: test-hdfs-namenode-default 17 | zookeeperConfigMapName: test-znode 18 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 19 | vectorAggregatorConfigMapName: vector-aggregator-discovery 20 | {% endif %} 21 | masters: 22 | config: 23 | gracefulShutdownTimeout: 1m 24 | logging: 25 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 26 | roleGroups: 27 | default: 28 | replicas: 1 29 | regionServers: 30 | config: 31 | gracefulShutdownTimeout: 1m 32 | logging: 33 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 34 | roleGroups: 35 | default: 36 | replicas: 1 37 | restServers: 38 | config: 39 | gracefulShutdownTimeout: 1m 40 | logging: 41 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 42 | roleGroups: 43 | default: 44 | replicas: 1 45 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/30-install-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: test-hbase 6 | spec: 7 | image: 8 | {% if test_scenario['values']['hbase'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['hbase'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['hbase'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['hbase'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | clusterConfig: 16 | hdfsConfigMapName: test-hdfs 17 | zookeeperConfigMapName: test-znode 18 | listenerClass: cluster-internal 19 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 20 | vectorAggregatorConfigMapName: vector-aggregator-discovery 21 | {% endif %} 22 | masters: 23 | config: 24 | gracefulShutdownTimeout: 1m 25 | logging: 26 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 27 | roleGroups: 28 | default: 29 | replicas: 2 30 | regionServers: 31 | config: 32 | gracefulShutdownTimeout: 1m 33 | logging: 34 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 35 | roleGroups: 36 | default: 37 | replicas: 1 38 | restServers: 39 | config: 40 | gracefulShutdownTimeout: 1m 41 | logging: 42 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 43 | roleGroups: 44 | default: 45 | replicas: 1 46 | -------------------------------------------------------------------------------- /tests/templates/kuttl/shutdown/30-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hbase 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hbase-master-default 12 | spec: 13 | template: 14 | spec: 15 | terminationGracePeriodSeconds: 60 16 | status: 17 | readyReplicas: 2 18 | replicas: 2 19 | --- 20 | apiVersion: apps/v1 21 | kind: StatefulSet 22 | metadata: 23 | name: test-hbase-regionserver-default 24 | spec: 25 | template: 26 | spec: 27 | terminationGracePeriodSeconds: 120 28 | status: 29 | readyReplicas: 2 30 | replicas: 2 31 | --- 32 | apiVersion: apps/v1 33 | kind: StatefulSet 34 | metadata: 35 | name: test-hbase-restserver-default 36 | spec: 37 | template: 38 | spec: 39 | terminationGracePeriodSeconds: 60 40 | status: 41 | readyReplicas: 2 42 | replicas: 2 43 | --- 44 | apiVersion: policy/v1 45 | kind: PodDisruptionBudget 46 | metadata: 47 | name: test-hbase-master 48 | status: 49 | expectedPods: 2 50 | currentHealthy: 2 51 | disruptionsAllowed: 1 52 | --- 53 | apiVersion: policy/v1 54 | kind: PodDisruptionBudget 55 | metadata: 56 | name: test-hbase-regionserver 57 | status: 58 | expectedPods: 2 59 | currentHealthy: 2 60 | disruptionsAllowed: 1 61 | --- 62 | apiVersion: policy/v1 63 | kind: PodDisruptionBudget 64 | metadata: 65 | name: test-hbase-restserver 66 | status: 67 | expectedPods: 2 68 | currentHealthy: 2 69 | disruptionsAllowed: 1 70 | -------------------------------------------------------------------------------- /tests/templates/kuttl/smoke/30-assert.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | metadata: 5 | name: install-hbase 6 | timeout: 600 7 | --- 8 | apiVersion: apps/v1 9 | kind: StatefulSet 10 | metadata: 11 | name: test-hbase-master-default 12 | spec: 13 | template: 14 | spec: 15 | terminationGracePeriodSeconds: 1200 16 | status: 17 | readyReplicas: 2 18 | replicas: 2 19 | --- 20 | apiVersion: apps/v1 21 | kind: StatefulSet 22 | metadata: 23 | name: test-hbase-regionserver-default 24 | spec: 25 | template: 26 | spec: 27 | terminationGracePeriodSeconds: 3600 28 | status: 29 | readyReplicas: 2 30 | replicas: 2 31 | --- 32 | apiVersion: apps/v1 33 | kind: StatefulSet 34 | metadata: 35 | name: test-hbase-restserver-default 36 | spec: 37 | template: 38 | spec: 39 | terminationGracePeriodSeconds: 300 40 | status: 41 | readyReplicas: 2 42 | replicas: 2 43 | --- 44 | apiVersion: policy/v1 45 | kind: PodDisruptionBudget 46 | metadata: 47 | name: test-hbase-master 48 | status: 49 | expectedPods: 2 50 | currentHealthy: 2 51 | disruptionsAllowed: 1 52 | --- 53 | apiVersion: policy/v1 54 | kind: PodDisruptionBudget 55 | metadata: 56 | name: test-hbase-regionserver 57 | status: 58 | expectedPods: 2 59 | currentHealthy: 2 60 | disruptionsAllowed: 1 61 | --- 62 | apiVersion: policy/v1 63 | kind: PodDisruptionBudget 64 | metadata: 65 | name: test-hbase-restserver 66 | status: 67 | expectedPods: 2 68 | currentHealthy: 2 69 | disruptionsAllowed: 1 70 | -------------------------------------------------------------------------------- /tests/templates/kuttl/orphaned_resources/03-install-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: test-hbase 6 | spec: 7 | image: 8 | {% if test_scenario['values']['hbase-latest'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['hbase-latest'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['hbase-latest'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['hbase-latest'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | clusterConfig: 16 | hdfsConfigMapName: test-hdfs-namenode-default 17 | zookeeperConfigMapName: test-znode 18 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 19 | vectorAggregatorConfigMapName: vector-aggregator-discovery 20 | {% endif %} 21 | masters: 22 | config: 23 | gracefulShutdownTimeout: 1m 24 | logging: 25 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 26 | roleGroups: 27 | default: 28 | replicas: 1 29 | regionServers: 30 | config: 31 | gracefulShutdownTimeout: 1m 32 | logging: 33 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 34 | roleGroups: 35 | default: 36 | replicas: 1 37 | restServers: 38 | config: 39 | gracefulShutdownTimeout: 1m 40 | logging: 41 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 42 | roleGroups: 43 | default: 44 | replicas: 1 45 | -------------------------------------------------------------------------------- /tests/templates/kuttl/omid/20-install-hdfs.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hdfs.stackable.tech/v1alpha1 3 | kind: HdfsCluster 4 | metadata: 5 | name: test-hdfs 6 | spec: 7 | image: 8 | {% if test_scenario['values']['hdfs-latest'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['hdfs-latest'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['hdfs-latest'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | clusterConfig: 16 | zookeeperConfigMapName: test-znode 17 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 18 | vectorAggregatorConfigMapName: vector-aggregator-discovery 19 | {% endif %} 20 | nameNodes: 21 | config: 22 | gracefulShutdownTimeout: 1m 23 | listenerClass: cluster-internal 24 | logging: 25 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 26 | roleGroups: 27 | default: 28 | replicas: 2 29 | dataNodes: 30 | config: 31 | gracefulShutdownTimeout: 1m 32 | listenerClass: cluster-internal 33 | logging: 34 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 35 | roleGroups: 36 | default: 37 | replicas: 1 38 | journalNodes: 39 | config: 40 | gracefulShutdownTimeout: 1m 41 | logging: 42 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 43 | roleGroups: 44 | default: 45 | replicas: 1 46 | -------------------------------------------------------------------------------- /tests/templates/kuttl/overrides/30-assert.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestAssert 4 | timeout: 600 5 | --- 6 | apiVersion: apps/v1 7 | kind: StatefulSet 8 | metadata: 9 | name: test-hbase-master-default 10 | spec: 11 | template: 12 | spec: 13 | containers: 14 | - name: hbase 15 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 16 | - name: vector 17 | {% endif %} 18 | status: 19 | readyReplicas: 1 20 | replicas: 1 21 | --- 22 | apiVersion: apps/v1 23 | kind: StatefulSet 24 | metadata: 25 | name: test-hbase-regionserver-resources-from-role 26 | spec: 27 | template: 28 | spec: 29 | containers: 30 | - name: hbase 31 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 32 | - name: vector 33 | {% endif %} 34 | status: 35 | readyReplicas: 1 36 | replicas: 1 37 | --- 38 | apiVersion: apps/v1 39 | kind: StatefulSet 40 | metadata: 41 | name: test-hbase-regionserver-resources-from-role-group 42 | spec: 43 | template: 44 | spec: 45 | containers: 46 | - name: hbase 47 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 48 | - name: vector 49 | {% endif %} 50 | status: 51 | readyReplicas: 1 52 | replicas: 1 53 | --- 54 | apiVersion: apps/v1 55 | kind: StatefulSet 56 | metadata: 57 | name: test-hbase-restserver-default 58 | spec: 59 | template: 60 | spec: 61 | containers: 62 | - name: hbase 63 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 64 | - name: vector 65 | {% endif %} 66 | status: 67 | readyReplicas: 1 68 | replicas: 1 69 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/usage-guide/snapshot-export-job.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: batch/v1 3 | kind: Job 4 | metadata: 5 | name: export-hbase-snapshot 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: hbase 11 | image: oci.stackable.tech/sdp/hbase:2.6.3-stackable0.0.0-dev 12 | volumeMounts: 13 | - name: hbase-config 14 | mountPath: /stackable/conf 15 | env: 16 | - name: HBASE_CONF_DIR 17 | value: /stackable/conf 18 | - name: HADOOP_CONF_DIR 19 | value: /stackable/conf 20 | - name: AWS_ENDPOINT 21 | value: https://s3endpoint:9000/ 22 | - name: AWS_SSL_ENABLED 23 | value: true 24 | - name: AWS_PATH_STYLE_ACCESS 25 | value: true 26 | - name: AWS_ACCESS_KEY_ID 27 | valueFrom: 28 | secretKeyRef: 29 | name: s3-credentials 30 | key: access-key-id 31 | - name: AWS_SECRET_KEY 32 | valueFrom: 33 | secretKeyRef: 34 | name: s3-credentials 35 | key: secret-key 36 | command: 37 | - export-snapshot-to-s3 38 | args: 39 | - --snapshot 40 | - my-snapshot 41 | - --copy-to 42 | - s3a://hbase/my-snapshot 43 | - --no-checksum-verify 44 | volumes: 45 | - name: hbase-config 46 | projected: 47 | sources: 48 | - configMap: 49 | name: simple-hdfs 50 | - configMap: 51 | name: simple-hbase-master-default 52 | restartPolicy: Never 53 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/10_helm-bitnami-minio-values.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | security: 4 | allowInsecureImages: true # needed starting with Chart version 14.9.0 if modifying images 5 | 6 | image: 7 | repository: bitnamilegacy/minio 8 | clientImage: 9 | repository: bitnamilegacy/minio-client 10 | defaultInitContainers: 11 | volumePermissions: # volumePermissions moved under defaultInitContainers starting with Chart version 17.0.0 12 | image: 13 | repository: bitnamilegacy/os-shell 14 | console: 15 | image: 16 | repository: bitnamilegacy/minio-object-browser 17 | 18 | # volumePermissions can be removed starting with Chart version 17.0.0, moved under defaultInitContainers 19 | volumePermissions: 20 | image: 21 | repository: bitnamilegacy/os-shell 22 | 23 | persistence: 24 | enabled: false # "false" means, that an emptyDir is used instead of a persistentVolumeClaim 25 | size: 64Mi 26 | 27 | provisioning: 28 | enabled: true 29 | buckets: 30 | - name: hbase 31 | users: 32 | - username: hbase 33 | password: hbasehbase 34 | policies: 35 | - readwrite 36 | - consoleAdmin 37 | - diagnostics 38 | extraCommands: 39 | - >- 40 | mc admin user svcacct add 41 | --access-key hbaseAccessKey 42 | --secret-key hbaseSecretKey 43 | provisioning hbase 44 | resources: 45 | requests: 46 | memory: 1Gi 47 | cpu: 512m 48 | limits: 49 | memory: 1Gi 50 | cpu: "1" 51 | 52 | resources: 53 | requests: 54 | memory: 1Gi 55 | cpu: 512m 56 | limits: 57 | memory: 1Gi 58 | cpu: "1" 59 | -------------------------------------------------------------------------------- /docs/modules/hbase/examples/usage-guide/snapshot-export-job.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: batch/v1 3 | kind: Job 4 | metadata: 5 | name: export-hbase-snapshot 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: hbase 11 | image: oci.stackable.tech/sdp/hbase:2.6.3-stackable{{ versions.hbase }} 12 | volumeMounts: 13 | - name: hbase-config 14 | mountPath: /stackable/conf 15 | env: 16 | - name: HBASE_CONF_DIR 17 | value: /stackable/conf 18 | - name: HADOOP_CONF_DIR 19 | value: /stackable/conf 20 | - name: AWS_ENDPOINT 21 | value: https://s3endpoint:9000/ 22 | - name: AWS_SSL_ENABLED 23 | value: true 24 | - name: AWS_PATH_STYLE_ACCESS 25 | value: true 26 | - name: AWS_ACCESS_KEY_ID 27 | valueFrom: 28 | secretKeyRef: 29 | name: s3-credentials 30 | key: access-key-id 31 | - name: AWS_SECRET_KEY 32 | valueFrom: 33 | secretKeyRef: 34 | name: s3-credentials 35 | key: secret-key 36 | command: 37 | - export-snapshot-to-s3 38 | args: 39 | - --snapshot 40 | - my-snapshot 41 | - --copy-to 42 | - s3a://hbase/my-snapshot 43 | - --no-checksum-verify 44 | volumes: 45 | - name: hbase-config 46 | projected: 47 | sources: 48 | - configMap: 49 | name: simple-hdfs 50 | - configMap: 51 | name: simple-hbase-master-default 52 | restartPolicy: Never 53 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/30_test-export.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | set -euxo pipefail 4 | 5 | export AWS_ACCESS_KEY_ID=hbaseAccessKey 6 | # Used by AWS bundle 1.12.367 via Hadoop 3.3.6 7 | export AWS_SECRET_KEY=hbaseSecretKey 8 | # Used by AWS bundle 2.24.6 via Hadoop 3.4.1 9 | export AWS_SECRET_ACCESS_KEY=hbaseSecretKey 10 | export AWS_ENDPOINT=http://minio:9000/ 11 | export AWS_SSL_ENABLED=false 12 | export AWS_PATH_STYLE_ACCESS=true 13 | 14 | # Create local snapshot 15 | hbase shell create-snapshot.hbase 2>&1 | \ 16 | grep '=> \["snap"\]' > /dev/null 17 | 18 | # Export local snapshot to S3 19 | # --no-checksum-verify is needed for HBase 2.6.1 until this is fixed: https://issues.apache.org/jira/browse/HBASE-28998 20 | export-snapshot-to-s3 \ 21 | --no-checksum-verify \ 22 | --snapshot snap \ 23 | --copy-to s3a://hbase/snap \ 24 | --overwrite 2>&1 | \ 25 | grep 'Export Completed: snap' > /dev/null 26 | 27 | # Delete local snapshot 28 | hbase shell delete-snapshot.hbase 2>&1 | \ 29 | grep '=> \[\]' > /dev/null 30 | 31 | # Import snapshot from S3 32 | # --no-checksum-verify is needed for HBase 2.6.1 until this is fixed: https://issues.apache.org/jira/browse/HBASE-28998 33 | export-snapshot-to-s3 \ 34 | --no-checksum-verify \ 35 | --snapshot snap \ 36 | --copy-from s3a://hbase/snap \ 37 | --copy-to hdfs://test-hdfs/hbase \ 38 | --overwrite 2>&1 | \ 39 | grep 'Export Completed: snap' > /dev/null 40 | 41 | # Restore imported snapshot 42 | hbase shell restore-snapshot.hbase 2>&1 | \ 43 | grep 'value=42' > /dev/null 44 | -------------------------------------------------------------------------------- /tests/templates/kuttl/logging/test_log_aggregation.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import requests 3 | 4 | 5 | def check_sent_events(): 6 | response = requests.post( 7 | "http://hbase-vector-aggregator:8686/graphql", 8 | json={ 9 | "query": """ 10 | { 11 | transforms(first:100) { 12 | nodes { 13 | componentId 14 | metrics { 15 | sentEventsTotal { 16 | sentEventsTotal 17 | } 18 | } 19 | } 20 | } 21 | } 22 | """ 23 | }, 24 | ) 25 | 26 | assert response.status_code == 200, ( 27 | "Cannot access the API of the vector aggregator." 28 | ) 29 | 30 | result = response.json() 31 | 32 | transforms = result["data"]["transforms"]["nodes"] 33 | for transform in transforms: 34 | sentEvents = transform["metrics"]["sentEventsTotal"] 35 | componentId = transform["componentId"] 36 | 37 | if componentId == "filteredInvalidEvents": 38 | assert sentEvents is None or sentEvents["sentEventsTotal"] == 0, ( 39 | "Invalid log events were sent." 40 | ) 41 | else: 42 | assert sentEvents is not None and sentEvents["sentEventsTotal"] > 0, ( 43 | f'No events were sent in "{componentId}".' 44 | ) 45 | 46 | 47 | if __name__ == "__main__": 48 | check_sent_events() 49 | print("Test successful!") 50 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | let 2 | self = import ./. {}; 3 | inherit (self) sources pkgs meta; 4 | 5 | beku = pkgs.callPackage (sources."beku.py" + "/beku.nix") {}; 6 | cargoDependencySetOfCrate = crate: [ crate ] ++ pkgs.lib.concatMap cargoDependencySetOfCrate (crate.dependencies ++ crate.buildDependencies); 7 | cargoDependencySet = pkgs.lib.unique (pkgs.lib.flatten (pkgs.lib.mapAttrsToList (crateName: crate: cargoDependencySetOfCrate crate.build) self.cargo.workspaceMembers)); 8 | in pkgs.mkShell rec { 9 | name = meta.operator.name; 10 | 11 | packages = with pkgs; [ 12 | ## cargo et-al 13 | rustup # this breaks pkg-config if it is in the nativeBuildInputs 14 | cargo-udeps 15 | 16 | ## Extra dependencies for use in a pure env (nix-shell --pure) 17 | ## These are mosuly useful for maintainers of this shell.nix 18 | ## to ensure all the dependencies are caught. 19 | # cacert 20 | # vim nvim nano 21 | ]; 22 | 23 | # derivation runtime dependencies 24 | buildInputs = pkgs.lib.concatMap (crate: crate.buildInputs) cargoDependencySet; 25 | 26 | # build time dependencies 27 | nativeBuildInputs = pkgs.lib.concatMap (crate: crate.nativeBuildInputs) cargoDependencySet ++ (with pkgs; [ 28 | beku 29 | docker 30 | gettext # for the proper envsubst 31 | git 32 | jq 33 | kind 34 | kubectl 35 | kubernetes-helm 36 | kuttl 37 | nix # this is implied, but needed in the pure env 38 | # tilt already defined in default.nix 39 | which 40 | yq-go 41 | ]); 42 | 43 | LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; 44 | BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.glibc.dev}/include -I${pkgs.clang}/resource-root/include"; 45 | } 46 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/resource-requests.adoc: -------------------------------------------------------------------------------- 1 | = Resource requests 2 | :description: Stackable managed HBase defaults to minimal resource requests. Adjust CPU and memory limits for production clusters to ensure proper performance. 3 | 4 | include::home:concepts:stackable_resource_requests.adoc[] 5 | 6 | If no resources are configured explicitly, the HBase operator uses following defaults: 7 | 8 | A minimal HA setup consisting of 2 masters, 2 regionservers and 2 restservers has the following https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/[resource requirements]: 9 | 10 | * `2700m` CPU request 11 | * `7800m` CPU limit 12 | * `5888m` memory request and limit 13 | 14 | Corresponding to the values above, the operator uses the following resource defaults: 15 | 16 | [source,yaml] 17 | ---- 18 | spec: 19 | masters: 20 | config: 21 | resources: 22 | cpu: 23 | min: 250m 24 | max: "1" 25 | memory: 26 | limit: 1Gi 27 | regionServers: 28 | config: 29 | resources: 30 | cpu: 31 | min: 250m 32 | max: "1" 33 | memory: 34 | limit: 1Gi 35 | restServers: 36 | config: 37 | resources: 38 | cpu: 39 | min: 100m 40 | max: 400m 41 | memory: 42 | limit: 512Mi 43 | ---- 44 | 45 | WARNING: The default values are _most likely_ not sufficient to run a proper cluster in production. 46 | You need to update them according to your requirements. 47 | 48 | For more details regarding Kubernetes CPU limits see: https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/[Assign CPU Resources to Containers and Pods]. 49 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/troubleshooting/index.adoc: -------------------------------------------------------------------------------- 1 | = Troubleshooting 2 | 3 | == HBase access with Kerberos authentication 4 | 5 | Currently, xref:zookeeper:index.adoc[Zookeeper] stacklets can only be secured using mutual TLS. 6 | This means, if an application tries to connect to HBase, it would contact Zookeeper to figure the correct HBase nodes to talk to. 7 | In a Java world, you would define a `Client` which would carry the Kerberos requirements. 8 | 9 | However, those requirements might be passed through and thus your client (e.g. xref:spark-k8s:usage-guide/operations/applications.adoc[SparkApplications]) would try to authenticate with Kerberos at the corresponding Zookeeper endpoint. 10 | This will result in a Kerberos ( authentication ) error. 11 | 12 | To prevent this, you can set a xref:concepts:overrides.adoc#jvm-argument-overrides[JVM argument] like this (again e.g. SparkApplications) in all Pods which would like to talk to HBase: 13 | 14 | [source,yaml] 15 | ---- 16 | jvmArgumentOverrides: 17 | add: 18 | - "-Dzookeeper.sasl.client=false" 19 | ---- 20 | 21 | 22 | == Additional stack-traces 23 | 24 | To add more useful information to stack-traces caused by RPC issues, the xref:concepts:overrides.adoc#config-overrides[Config overrides documentation] can be used to replace the default Netty implementation: 25 | 26 | [source,yaml] 27 | ---- 28 | masters: 29 | roleGroups: 30 | default: 31 | configOverrides: 32 | hbase-site.xml: 33 | hbase.rpc.client.impl: "org.apache.hadoop.hbase.ipc.BlockingRpcClient" 34 | regionServers: 35 | roleGroups: 36 | default: 37 | configOverrides: 38 | hbase-site.xml: 39 | hbase.rpc.client.impl: "org.apache.hadoop.hbase.ipc.BlockingRpcClient" 40 | ---- 41 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/03-install-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | metadata: 5 | name: install-hbase 6 | timeout: 360 7 | --- 8 | apiVersion: hbase.stackable.tech/v1alpha1 9 | kind: HbaseCluster 10 | metadata: 11 | name: test-hbase 12 | spec: 13 | image: 14 | {% if test_scenario['values']['hbase-latest'].find(",") > 0 %} 15 | custom: "{{ test_scenario['values']['hbase-latest'].split(',')[1] }}" 16 | productVersion: "{{ test_scenario['values']['hbase-latest'].split(',')[0] }}" 17 | {% else %} 18 | productVersion: "{{ test_scenario['values']['hbase-latest'] }}" 19 | {% endif %} 20 | pullPolicy: IfNotPresent 21 | clusterConfig: 22 | hdfsConfigMapName: test-hdfs 23 | zookeeperConfigMapName: test-znode 24 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 25 | vectorAggregatorConfigMapName: vector-aggregator-discovery 26 | {% endif %} 27 | masters: 28 | config: 29 | gracefulShutdownTimeout: 1m 30 | logging: 31 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 32 | listenerClass: external-stable 33 | roleGroups: 34 | default: 35 | replicas: 1 36 | regionServers: 37 | config: 38 | gracefulShutdownTimeout: 1m 39 | logging: 40 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 41 | listenerClass: external-stable 42 | roleGroups: 43 | default: 44 | replicas: 1 45 | restServers: 46 | config: 47 | gracefulShutdownTimeout: 1m 48 | logging: 49 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 50 | listenerClass: external-stable 51 | roleGroups: 52 | default: 53 | replicas: 1 54 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | *Please add a description here. This will become the commit message of the merge request later.* 4 | 5 | ## Definition of Done Checklist 6 | 7 | - Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant 8 | - Please make sure all these things are done and tick the boxes 9 | 10 | ### Author 11 | 12 | - [ ] Changes are OpenShift compatible 13 | - [ ] CRD changes approved 14 | - [ ] CRD documentation for all fields, following the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs/style-guide). 15 | - [ ] Helm chart can be installed and deployed operator works 16 | - [ ] Integration tests passed (for non trivial changes) 17 | - [ ] Changes need to be "offline" compatible 18 | - [ ] Links to generated (nightly) docs added 19 | - [ ] Release note snippet added 20 | 21 | ### Reviewer 22 | 23 | - [ ] Code contains useful comments 24 | - [ ] Code contains useful logging statements 25 | - [ ] (Integration-)Test cases added 26 | - [ ] Documentation added or updated. Follows the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs/style-guide). 27 | - [ ] Changelog updated 28 | - [ ] Cargo.toml only contains references to git tags (not specific commits or branches) 29 | 30 | ### Acceptance 31 | 32 | - [ ] Feature Tracker has been updated 33 | - [ ] Proper release label has been added 34 | - [ ] Links to generated (nightly) docs added 35 | - [ ] Release note snippet added 36 | - [ ] Add `type/deprecation` label & add to the [deprecation schedule](https://github.com/orgs/stackabletech/projects/44/views/1) 37 | - [ ] Add `type/experimental` label & add to the [experimental features tracker](https://github.com/orgs/stackabletech/projects/47) 38 | -------------------------------------------------------------------------------- /tests/templates/kuttl/snapshot-export/31_test-snapshot-export-job.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: batch/v1 3 | kind: Job 4 | metadata: 5 | name: test-snapshot-export 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: hbase 11 | image: ${HBASE_IMAGE} 12 | workingDir: /stackable/test 13 | command: 14 | - ./test-export.sh 15 | env: 16 | - name: HBASE_CONF_DIR 17 | value: /stackable/conf 18 | - name: HADOOP_CONF_DIR 19 | value: /stackable/conf 20 | volumeMounts: 21 | - name: test-scripts 22 | mountPath: /stackable/test 23 | - name: config 24 | mountPath: /stackable/conf 25 | # The script 'export-snapshot-to-s3' creates links to this folder from the exported snapshot 26 | # and will log an error if the folder is not found. This does not affect the test result but 27 | # it makes investigating other failure cases more tedious. 28 | # So basically this folder will shut up spurious error messages from this script. 29 | - name: libjars 30 | mountPath: /stackable/test/libjars 31 | volumes: 32 | - name: libjars 33 | emptyDir: 34 | sizeLimit: 10Mi 35 | - name: test-scripts 36 | configMap: 37 | name: test-scripts 38 | defaultMode: 0777 39 | - name: config 40 | projected: 41 | sources: 42 | - configMap: 43 | name: test-hbase-master-default 44 | - configMap: 45 | name: test-hdfs 46 | securityContext: 47 | fsGroup: 1000 48 | serviceAccountName: test-sa 49 | restartPolicy: OnFailure 50 | -------------------------------------------------------------------------------- /nix/sources.json: -------------------------------------------------------------------------------- 1 | { 2 | "beku.py": { 3 | "branch": "0.0.10", 4 | "description": "Test suite expander for Stackable Kuttl tests.", 5 | "homepage": null, 6 | "owner": "stackabletech", 7 | "repo": "beku.py", 8 | "rev": "fc75202a38529a4ac6776dd8a5dfee278d927f58", 9 | "sha256": "152yary0p11h87yabv74jnwkghsal7lx16az0qlzrzdrs6n5v8id", 10 | "type": "tarball", 11 | "url": "https://github.com/stackabletech/beku.py/archive/fc75202a38529a4ac6776dd8a5dfee278d927f58.tar.gz", 12 | "url_template": "https://github.com///archive/.tar.gz" 13 | }, 14 | "crate2nix": { 15 | "branch": "master", 16 | "description": "nix build file generator for rust crates", 17 | "homepage": "", 18 | "owner": "kolloch", 19 | "repo": "crate2nix", 20 | "rev": "be31feae9a82c225c0fd1bdf978565dc452a483a", 21 | "sha256": "14d0ymlrwk7dynv35qcw4xn0dylfpwjmf6f8znflbk2l6fk23l12", 22 | "type": "tarball", 23 | "url": "https://github.com/kolloch/crate2nix/archive/be31feae9a82c225c0fd1bdf978565dc452a483a.tar.gz", 24 | "url_template": "https://github.com///archive/.tar.gz" 25 | }, 26 | "nixpkgs": { 27 | "branch": "nixpkgs-unstable", 28 | "description": "Nix Packages collection", 29 | "homepage": "", 30 | "owner": "NixOS", 31 | "repo": "nixpkgs", 32 | "rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386", 33 | "sha256": "0h3gvjbrlkvxhbxpy01n603ixv0pjy19n9kf73rdkchdvqcn70j2", 34 | "type": "tarball", 35 | "url": "https://github.com/NixOS/nixpkgs/archive/a7fc11be66bdfb5cdde611ee5ce381c183da8386.tar.gz", 36 | "url_template": "https://github.com///archive/.tar.gz" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for hbase-operator. 2 | --- 3 | image: 4 | repository: oci.stackable.tech/sdp/hbase-operator 5 | pullPolicy: IfNotPresent 6 | pullSecrets: [] 7 | 8 | nameOverride: "" 9 | fullnameOverride: "" 10 | 11 | serviceAccount: 12 | # Specifies whether a service account should be created 13 | create: true 14 | # Annotations to add to the service account 15 | annotations: {} 16 | # The name of the service account to use. 17 | # If not set and create is true, a name is generated using the fullname template 18 | name: "" 19 | 20 | podAnnotations: {} 21 | 22 | # Provide additional labels which get attached to all deployed resources 23 | labels: 24 | stackable.tech/vendor: Stackable 25 | 26 | podSecurityContext: {} 27 | # fsGroup: 2000 28 | 29 | securityContext: {} 30 | # capabilities: 31 | # drop: 32 | # - ALL 33 | # readOnlyRootFilesystem: true 34 | # runAsNonRoot: true 35 | # runAsUser: 1000 36 | 37 | resources: 38 | limits: 39 | cpu: 100m 40 | memory: 128Mi 41 | requests: 42 | cpu: 100m 43 | memory: 128Mi 44 | 45 | nodeSelector: {} 46 | 47 | tolerations: [] 48 | 49 | affinity: {} 50 | 51 | # When running on a non-default Kubernetes cluster domain, the cluster domain can be configured here. 52 | # See the https://docs.stackable.tech/home/stable/guides/kubernetes-cluster-domain guide for details. 53 | # kubernetesClusterDomain: my-cluster.local 54 | 55 | # See all available options and detailed explanations about the concept here: 56 | # https://docs.stackable.tech/home/stable/concepts/telemetry/ 57 | telemetry: 58 | consoleLog: 59 | enabled: true 60 | fileLog: 61 | enabled: false 62 | rotationPeriod: hourly 63 | maxFiles: 6 64 | otelLogExporter: 65 | enabled: false 66 | otelTraceExporter: 67 | enabled: false 68 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/30-restart-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | metadata: 5 | name: install-hbase 6 | timeout: 180 7 | --- 8 | apiVersion: hbase.stackable.tech/v1alpha1 9 | kind: HbaseCluster 10 | metadata: 11 | name: test-hbase 12 | spec: 13 | image: 14 | {% if test_scenario['values']['hbase-latest'].find(",") > 0 %} 15 | custom: "{{ test_scenario['values']['hbase-latest'].split(',')[1] }}" 16 | productVersion: "{{ test_scenario['values']['hbase-latest'].split(',')[0] }}" 17 | {% else %} 18 | productVersion: "{{ test_scenario['values']['hbase-latest'] }}" 19 | {% endif %} 20 | pullPolicy: IfNotPresent 21 | clusterConfig: 22 | hdfsConfigMapName: test-hdfs 23 | zookeeperConfigMapName: test-znode 24 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 25 | vectorAggregatorConfigMapName: vector-aggregator-discovery 26 | {% endif %} 27 | clusterOperation: 28 | stopped: false 29 | reconciliationPaused: false 30 | masters: 31 | config: 32 | gracefulShutdownTimeout: 1m 33 | logging: 34 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 35 | listenerClass: external-stable 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | regionServers: 40 | config: 41 | gracefulShutdownTimeout: 1m 42 | logging: 43 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 44 | listenerClass: external-stable 45 | roleGroups: 46 | default: 47 | replicas: 1 48 | restServers: 49 | config: 50 | gracefulShutdownTimeout: 1m 51 | logging: 52 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 53 | listenerClass: external-stable 54 | roleGroups: 55 | default: 56 | replicas: 1 57 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/10-pause-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | metadata: 5 | name: pause-hbase 6 | timeout: 180 7 | --- 8 | apiVersion: hbase.stackable.tech/v1alpha1 9 | kind: HbaseCluster 10 | metadata: 11 | name: test-hbase 12 | spec: 13 | image: 14 | {% if test_scenario['values']['hbase-latest'].find(",") > 0 %} 15 | custom: "{{ test_scenario['values']['hbase-latest'].split(',')[1] }}" 16 | productVersion: "{{ test_scenario['values']['hbase-latest'].split(',')[0] }}" 17 | {% else %} 18 | productVersion: "{{ test_scenario['values']['hbase-latest'] }}" 19 | {% endif %} 20 | pullPolicy: IfNotPresent 21 | clusterConfig: 22 | hdfsConfigMapName: test-hdfs 23 | zookeeperConfigMapName: test-znode 24 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 25 | vectorAggregatorConfigMapName: vector-aggregator-discovery 26 | {% endif %} 27 | clusterOperation: 28 | stopped: false 29 | reconciliationPaused: true 30 | masters: 31 | config: 32 | gracefulShutdownTimeout: 1m 33 | logging: 34 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 35 | listenerClass: external-stable 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | regionServers: 40 | config: 41 | gracefulShutdownTimeout: 1m 42 | logging: 43 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 44 | listenerClass: external-stable 45 | roleGroups: 46 | default: 47 | replicas: 1 48 | restServers: 49 | config: 50 | gracefulShutdownTimeout: 1m 51 | logging: 52 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 53 | listenerClass: external-stable 54 | roleGroups: 55 | default: 56 | replicas: 2 # ignored because reconciliation is paused 57 | -------------------------------------------------------------------------------- /.readme/static/borrowed/Icon_Stackable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/templates/kuttl/cluster-operation/20-stop-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: kuttl.dev/v1beta1 3 | kind: TestStep 4 | metadata: 5 | name: stop-hbase 6 | timeout: 180 7 | --- 8 | apiVersion: hbase.stackable.tech/v1alpha1 9 | kind: HbaseCluster 10 | metadata: 11 | name: test-hbase 12 | spec: 13 | image: 14 | {% if test_scenario['values']['hbase-latest'].find(",") > 0 %} 15 | custom: "{{ test_scenario['values']['hbase-latest'].split(',')[1] }}" 16 | productVersion: "{{ test_scenario['values']['hbase-latest'].split(',')[0] }}" 17 | {% else %} 18 | productVersion: "{{ test_scenario['values']['hbase-latest'] }}" 19 | {% endif %} 20 | pullPolicy: IfNotPresent 21 | clusterConfig: 22 | hdfsConfigMapName: test-hdfs 23 | zookeeperConfigMapName: test-znode 24 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 25 | vectorAggregatorConfigMapName: vector-aggregator-discovery 26 | {% endif %} 27 | clusterOperation: 28 | stopped: true 29 | reconciliationPaused: false 30 | masters: 31 | config: 32 | gracefulShutdownTimeout: 1m 33 | logging: 34 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 35 | listenerClass: external-stable 36 | roleGroups: 37 | default: 38 | replicas: 1 39 | regionServers: 40 | config: 41 | gracefulShutdownTimeout: 1m 42 | logging: 43 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 44 | listenerClass: external-stable 45 | roleGroups: 46 | default: 47 | replicas: 1 48 | restServers: 49 | config: 50 | gracefulShutdownTimeout: 1m 51 | logging: 52 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 53 | listenerClass: external-stable 54 | roleGroups: 55 | default: 56 | replicas: 1 # set to 0 by the operator because cluster is stopped 57 | -------------------------------------------------------------------------------- /docs/modules/hbase/pages/usage-guide/monitoring.adoc: -------------------------------------------------------------------------------- 1 | = Monitoring 2 | :description: The managed HBase instances are automatically configured to export Prometheus metrics. 3 | 4 | The managed HBase instances are automatically configured to export Prometheus metrics. 5 | See xref:operators:monitoring.adoc[] for more details. 6 | 7 | Starting with HBase 2.6 the URL for Prometheus metrics has changed. 8 | This is because HBase offers now a built-in endpoint for this purpose. 9 | This endpoint is available from the `metrics` Services. 10 | For example, in the case of the master Service, the URL is `http://-master--metrics:16010/prometheus`. 11 | 12 | == Authentication when using TLS 13 | 14 | HBase exposes metrics through the same port as their web UI. Hence, when configuring HBase with TLS the metrics are also secured by TLS, 15 | and the clients scraping the metrics endpoint need to authenticate against it. This could for example be accomplished by utilizing mTLS 16 | between Kubernetes Pods with the xref:home:secret-operator:index.adoc[Secret Operator]. 17 | 18 | When using Prometheus `ServiceMonitor` for scraping, the `address` label needs relabeling to use the `headless` Service instead of the 19 | `metrics` Service. This is because by default Prometheus targets the Pod IPs as endpoints, but since the Pod IPs are not 20 | part of the certificate, the authentication will fail. Instead, the FQDN of the Pods, which can be added to the certificate, is used, but 21 | this FQDN is only available through the `headless` Service. 22 | 23 | A more detailed explanation can be found in the xref:home:nifi:usage_guide/monitoring.adoc[NiFi Operator Monitoring Docs] with a similar situation 24 | and an example of a Prometheus `ServiceMonitor` configured for TLS in the 25 | https://github.com/stackabletech/demos/blob/main/stacks/monitoring/prometheus-service-monitors.yaml[Monitoring Stack{external-link-icon}^]. 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/02-bug_report.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "🐛 Bug Report" 3 | description: "If something isn't working as expected 🤔." 4 | labels: ["type/bug"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible. 9 | 10 | - type: input 11 | attributes: 12 | label: Affected Stackable version 13 | description: Which version of the Stackable Operator do you see this bug in? 14 | 15 | # 16 | - type: input 17 | attributes: 18 | label: Affected Apache HBase version 19 | description: Which version of Apache HBase do you see this bug in? 20 | # 21 | 22 | - type: textarea 23 | attributes: 24 | label: Current and expected behavior 25 | description: A clear and concise description of what the operator is doing and what you would expect. 26 | validations: 27 | required: true 28 | 29 | - type: textarea 30 | attributes: 31 | label: Possible solution 32 | description: "If you have suggestions on a fix for the bug." 33 | 34 | - type: textarea 35 | attributes: 36 | label: Additional context 37 | description: "Add any other context about the problem here. Or a screenshot if applicable." 38 | 39 | - type: textarea 40 | attributes: 41 | label: Environment 42 | description: | 43 | What type of kubernetes cluster you are running against (k3s/eks/aks/gke/other) and any other information about your environment? 44 | placeholder: | 45 | Examples: 46 | Output of `kubectl version --short` 47 | 48 | - type: dropdown 49 | attributes: 50 | label: Would you like to work on fixing this bug? 51 | description: | 52 | **NOTE**: Let us know if you would like to submit a PR for this. We are more than happy to help you through the process. 53 | options: 54 | - "yes" 55 | - "no" 56 | - "maybe" 57 | -------------------------------------------------------------------------------- /tests/templates/kuttl/external-access/install-hbase.yaml.j2: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: hbase.stackable.tech/v1alpha1 3 | kind: HbaseCluster 4 | metadata: 5 | name: test-hbase 6 | spec: 7 | image: 8 | {% if test_scenario['values']['hbase'].find(",") > 0 %} 9 | custom: "{{ test_scenario['values']['hbase'].split(',')[1] }}" 10 | productVersion: "{{ test_scenario['values']['hbase'].split(',')[0] }}" 11 | {% else %} 12 | productVersion: "{{ test_scenario['values']['hbase'] }}" 13 | {% endif %} 14 | pullPolicy: IfNotPresent 15 | clusterConfig: 16 | hdfsConfigMapName: test-hdfs-namenode-default 17 | zookeeperConfigMapName: test-znode 18 | {% if lookup('env', 'VECTOR_AGGREGATOR') %} 19 | vectorAggregatorConfigMapName: vector-aggregator-discovery 20 | {% endif %} 21 | masters: 22 | config: 23 | gracefulShutdownTimeout: 1m 24 | logging: 25 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 26 | listenerClass: test-external-unstable-$NAMESPACE 27 | roleGroups: 28 | external-unstable: 29 | replicas: 2 30 | regionServers: 31 | config: 32 | gracefulShutdownTimeout: 1m 33 | logging: 34 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 35 | listenerClass: test-external-unstable-$NAMESPACE 36 | roleGroups: 37 | external-unstable: 38 | replicas: 1 39 | external-stable: 40 | replicas: 1 41 | config: 42 | listenerClass: test-external-stable-$NAMESPACE 43 | restServers: 44 | config: 45 | gracefulShutdownTimeout: 1m 46 | logging: 47 | enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} 48 | listenerClass: test-external-stable-$NAMESPACE 49 | roleGroups: 50 | external-stable: 51 | replicas: 1 52 | external-unstable: 53 | replicas: 1 54 | config: 55 | listenerClass: test-external-unstable-$NAMESPACE 56 | -------------------------------------------------------------------------------- /deploy/helm/hbase-operator/templates/_telemetry.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Create a list of telemetry related env vars. 3 | */}} 4 | {{- define "telemetry.envVars" -}} 5 | {{- with .Values.telemetry }} 6 | {{- if not .consoleLog.enabled }} 7 | - name: CONSOLE_LOG_DISABLED 8 | value: "true" 9 | {{- end }} 10 | {{- if and .consoleLog.enabled .consoleLog.level }} 11 | - name: CONSOLE_LOG_LEVEL 12 | value: {{ .consoleLog.level }} 13 | {{ end }} 14 | {{- if and .consoleLog.enabled .consoleLog.format }} 15 | - name: CONSOLE_LOG_FORMAT 16 | value: {{ .consoleLog.format }} 17 | {{ end }} 18 | {{- if .fileLog.enabled }} 19 | - name: FILE_LOG_DIRECTORY 20 | value: /stackable/logs/{{ include "operator.appname" $ }} 21 | {{- end }} 22 | {{- if and .fileLog.enabled .fileLog.level }} 23 | - name: FILE_LOG_LEVEL 24 | value: {{ .fileLog.level }} 25 | {{- end }} 26 | {{- if and .fileLog.enabled .fileLog.rotationPeriod }} 27 | - name: FILE_LOG_ROTATION_PERIOD 28 | value: {{ .fileLog.rotationPeriod }} 29 | {{- end }} 30 | {{- if and .fileLog.enabled .fileLog.maxFiles }} 31 | - name: FILE_LOG_MAX_FILES 32 | value: {{ quote .fileLog.maxFiles }} 33 | {{- end }} 34 | {{- if .otelLogExporter.enabled }} 35 | - name: OTEL_LOG_EXPORTER_ENABLED 36 | value: "true" 37 | {{- end }} 38 | {{- if and .otelLogExporter.enabled .otelLogExporter.level }} 39 | - name: OTEL_LOG_EXPORTER_LEVEL 40 | value: {{ .otelLogExporter.level }} 41 | {{- end }} 42 | {{- if and .otelLogExporter.enabled .otelLogExporter.endpoint }} 43 | - name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT 44 | value: {{ .otelLogExporter.endpoint }} 45 | {{- end }} 46 | {{- if .otelTraceExporter.enabled }} 47 | - name: OTEL_TRACE_EXPORTER_ENABLED 48 | value: "true" 49 | {{- end }} 50 | {{- if and .otelTraceExporter.enabled .otelTraceExporter.level }} 51 | - name: OTEL_TRACE_EXPORTER_LEVEL 52 | value: {{ .otelTraceExporter.level }} 53 | {{- end }} 54 | {{- if and .otelTraceExporter.enabled .otelTraceExporter.endpoint }} 55 | - name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT 56 | value: {{ .otelTraceExporter.endpoint }} 57 | {{- end }} 58 | {{- end }} 59 | {{- end }} 60 | -------------------------------------------------------------------------------- /deny.toml: -------------------------------------------------------------------------------- 1 | # This file is the source of truth for all our repos! 2 | # This includes repos not templated by operator-templating, please copy/paste the file for this repos. 3 | 4 | # TIP: Use "cargo deny check" to check if everything is fine 5 | 6 | [graph] 7 | targets = [ 8 | { triple = "x86_64-unknown-linux-gnu" }, 9 | { triple = "aarch64-unknown-linux-gnu" }, 10 | { triple = "x86_64-unknown-linux-musl" }, 11 | { triple = "aarch64-apple-darwin" }, 12 | { triple = "x86_64-apple-darwin" }, 13 | ] 14 | 15 | [advisories] 16 | yanked = "deny" 17 | ignore = [ 18 | # https://rustsec.org/advisories/RUSTSEC-2023-0071 19 | # "rsa" crate: Marvin Attack: potential key recovery through timing sidechannel 20 | # 21 | # No patch is yet available, however work is underway to migrate to a fully constant-time implementation 22 | # So we need to accept this, as of SDP 25.3 we are not using the rsa crate to create certificates used in production 23 | # setups. 24 | # 25 | # https://github.com/RustCrypto/RSA/issues/19 is the tracking issue 26 | "RUSTSEC-2023-0071", 27 | ] 28 | 29 | [bans] 30 | multiple-versions = "allow" 31 | 32 | [licenses] 33 | unused-allowed-license = "allow" 34 | confidence-threshold = 1.0 35 | allow = [ 36 | "Apache-2.0", 37 | "BSD-2-Clause", 38 | "BSD-3-Clause", 39 | "CC0-1.0", 40 | "ISC", 41 | "LicenseRef-ring", 42 | "LicenseRef-webpki", 43 | "MIT", 44 | "MPL-2.0", 45 | "OpenSSL", # Needed for the ring and/or aws-lc-sys crate. See https://github.com/stackabletech/operator-templating/pull/464 for details 46 | "Unicode-3.0", 47 | "Unicode-DFS-2016", 48 | "Zlib", 49 | "Unlicense", 50 | ] 51 | private = { ignore = true } 52 | 53 | [[licenses.clarify]] 54 | name = "ring" 55 | expression = "LicenseRef-ring" 56 | license-files = [ 57 | { path = "LICENSE", hash = 0xbd0eed23 }, 58 | ] 59 | 60 | [[licenses.clarify]] 61 | name = "webpki" 62 | expression = "LicenseRef-webpki" 63 | license-files = [ 64 | { path = "LICENSE", hash = 0x001c7e6c }, 65 | ] 66 | 67 | [sources] 68 | unknown-registry = "deny" 69 | unknown-git = "deny" 70 | 71 | [sources.allow-org] 72 | github = ["stackabletech"] 73 | --------------------------------------------------------------------------------