Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: HBase Listener integration #639

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

### Added

- Added listener support for HBase ([#639]).

[#639]: https://github.com/stackabletech/hbase-operator/pull/639

## [25.3.0] - 2025-03-21

### Added
Expand Down
62 changes: 48 additions & 14 deletions deploy/helm/hbase-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,6 @@ spec:
hdfsConfigMapName:
description: Name of the [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) for an HDFS cluster.
type: string
listenerClass:
default: cluster-internal
description: |-
This field controls which type of Service the Operator creates for this HbaseCluster:

* cluster-internal: Use a ClusterIP service

* external-unstable: Use a NodePort service

This is a temporary solution with the goal to keep yaml manifests forward compatible. In the future, this setting will control which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change.
enum:
- cluster-internal
- external-unstable
type: string
vectorAggregatorConfigMapName:
description: Name of the Vector aggregator [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery). It must contain the key `ADDRESS` with the address of the Vector aggregator. Follow the [logging tutorial](https://docs.stackable.tech/home/nightly/tutorials/logging-vector-aggregator) to learn how to configure log aggregation with Vector.
nullable: true
Expand Down Expand Up @@ -210,6 +196,14 @@ spec:
hbaseRootdir:
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down Expand Up @@ -460,6 +454,14 @@ spec:
hbaseRootdir:
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down Expand Up @@ -691,6 +693,14 @@ spec:
hbaseRootdir:
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down Expand Up @@ -969,6 +979,14 @@ spec:
hbaseRootdir:
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down Expand Up @@ -1228,6 +1246,14 @@ spec:
hbaseRootdir:
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down Expand Up @@ -1478,6 +1504,14 @@ spec:
hbaseRootdir:
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down
6 changes: 6 additions & 0 deletions deploy/helm/hbase-operator/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ rules:
verbs:
- create
- patch
- apiGroups:
- listeners.stackable.tech
resources:
- listeners
verbs:
- get
- apiGroups:
- {{ include "operator.name" . }}.stackable.tech
resources:
Expand Down
39 changes: 29 additions & 10 deletions docs/modules/hbase/pages/usage-guide/listenerclass.adoc
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
= Service exposition with ListenerClasses
:description: Configure HBase service exposure using ListenerClasses to control internal and external access for all roles.

Apache HBase offers an API.
The operator deploys a service called `<name>` (where `<name>` is the name of the HbaseCluster) through which HBase can be reached.
The operator deploys a xref:listener-operator:listener.adoc[Listener] for each Master, Regionserver and Restserver pod.
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`:

This service can have either the `cluster-internal` or `external-unstable` type.
`external-stable` is not supported for HBase at the moment.
Read more about the types in the xref:concepts:service-exposition.adoc[service exposition] documentation at platform level.
[source,yaml]
----
spec:
masters:
config:
listenerClass: external-unstable # <1>
regionServers:
config:
listenerClass: external-unstable
restServers:
config:
listenerClass: external-unstable
----
<1> Specify one of `external-stable`, `external-unstable`, `cluster-internal` (the default setting is `cluster-internal`).
This can be set separately for all three roles.

This is how the listener class is configured:
Externally-reachable endpoints (i.e. where listener-class = `external-unstable` or `external-unstable`) are written to a ConfigMap called `<cluster-name>-ui-endpoints`, listing each rolegroup by replica:

[source,yaml]
----
spec:
clusterConfig:
listenerClass: cluster-internal # <1>
apiVersion: v1
data:
hbase.master-0.ui: 172.19.0.3:32353
hbase.master-1.ui: 172.19.0.5:31817
hbase.regionserver-0.ui: 172.19.0.3:31719
hbase.regionserver-1.ui: 172.19.0.5:30626
hbase.restserver-0.ui: 172.19.0.3:31790
hbase.restserver-1.ui: 172.19.0.5:32292
kind: ConfigMap
...
----
<1> The default `cluster-internal` setting.
Loading