Skip to content

Commit f6781ca

Browse files
adwk67nightkrmaltesanderNickLarsenNZ
authored
feat: HBase Listener integration (#639)
* output listener refs * add listener refs to config map * changelog * changed logging statement * integration test * changed listener class designation * update listener class docs * working tests * wip: experimental command * cleanup start command * added hostname/port to hbase-env.sh * wip: will move startup logic to hbase-entrypoint.sh * cleaned up/reverted previous wip * cleaned up/reverted previous wip II * correct callout * use pvcs for externally-reachable endpoints * added comment * docs * resolve listener-class across role-groups/role * regenerate nix * updated tokio and nix packages * added listener-relevant config settings * Try a different tack at reconfiguring hbase * formatting and partial clean-up * formatting and partial clean-up * replaced listener-class enum with string * tweak test cases * add generic properties for listener endpoints * write endpoints to hbase-site instead of dedicated config map * remove unused error defs * remove unused error def/function * fix some tests inline with 2.6.1, add UI port type * use listener service resolved in entrypoint script rather than passing through as as argument * updated env-vars based on patch changes * fix smoke test * fixed orphaned-resources test * fixed opa test * Update CHANGELOG.md Co-authored-by: Malte Sander <[email protected]> * Update docs/modules/hbase/pages/usage-guide/listenerclass.adoc Co-authored-by: Malte Sander <[email protected]> * review feedback * added constant * replace expects with snafu error * correct property usage to match latest image changes * provide bound address to match defaults used in patch * Update CHANGELOG.md Co-authored-by: Nick <[email protected]> * clarified error * removed unnecessary configs and added trouble-shooting doc page * renamed headless service * use ephemeral volumes for master/rs * fixed test * added missing pull policy directive --------- Co-authored-by: Natalie Klestrup Röijezon <[email protected]> Co-authored-by: Malte Sander <[email protected]> Co-authored-by: Nick <[email protected]>
1 parent 0664d80 commit f6781ca

39 files changed

+735
-213
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66

7+
- BREAKING: Add listener support for HBase ([#639]).
78
- Adds new telemetry CLI arguments and environment variables ([#652]).
89
- Use `--file-log-max-files` (or `FILE_LOG_MAX_FILES`) to limit the number of log files kept.
910
- Use `--file-log-rotation-period` (or `FILE_LOG_ROTATION_PERIOD`) to configure the frequency of rotation.
@@ -39,6 +40,7 @@
3940
- test: HBase 2.4.18 removed ([#659]):
4041
- Remove operator support for HBase 2.4 including the JMX exporter ([#672]).
4142

43+
[#639]: https://github.com/stackabletech/hbase-operator/pull/639
4244
[#640]: https://github.com/stackabletech/hbase-operator/pull/640
4345
[#645]: https://github.com/stackabletech/hbase-operator/pull/645
4446
[#647]: https://github.com/stackabletech/hbase-operator/pull/647

deploy/helm/hbase-operator/crds/crds.yaml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,6 @@ spec:
7373
hdfsConfigMapName:
7474
description: Name of the [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) for an HDFS cluster.
7575
type: string
76-
listenerClass:
77-
default: cluster-internal
78-
description: |-
79-
This field controls which type of Service the Operator creates for this HbaseCluster:
80-
81-
* cluster-internal: Use a ClusterIP service
82-
83-
* external-unstable: Use a NodePort service
84-
85-
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.
86-
enum:
87-
- cluster-internal
88-
- external-unstable
89-
type: string
9076
vectorAggregatorConfigMapName:
9177
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.
9278
nullable: true
@@ -210,6 +196,10 @@ spec:
210196
hbaseRootdir:
211197
nullable: true
212198
type: string
199+
listenerClass:
200+
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
201+
nullable: true
202+
type: string
213203
logging:
214204
default:
215205
containers: {}
@@ -460,6 +450,10 @@ spec:
460450
hbaseRootdir:
461451
nullable: true
462452
type: string
453+
listenerClass:
454+
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
455+
nullable: true
456+
type: string
463457
logging:
464458
default:
465459
containers: {}
@@ -691,6 +685,10 @@ spec:
691685
hbaseRootdir:
692686
nullable: true
693687
type: string
688+
listenerClass:
689+
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
690+
nullable: true
691+
type: string
694692
logging:
695693
default:
696694
containers: {}
@@ -969,6 +967,10 @@ spec:
969967
hbaseRootdir:
970968
nullable: true
971969
type: string
970+
listenerClass:
971+
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
972+
nullable: true
973+
type: string
972974
logging:
973975
default:
974976
containers: {}
@@ -1228,6 +1230,10 @@ spec:
12281230
hbaseRootdir:
12291231
nullable: true
12301232
type: string
1233+
listenerClass:
1234+
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
1235+
nullable: true
1236+
type: string
12311237
logging:
12321238
default:
12331239
containers: {}
@@ -1478,6 +1484,10 @@ spec:
14781484
hbaseRootdir:
14791485
nullable: true
14801486
type: string
1487+
listenerClass:
1488+
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose this rolegroup.
1489+
nullable: true
1490+
type: string
14811491
logging:
14821492
default:
14831493
containers: {}

deploy/helm/hbase-operator/templates/roles.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ rules:
7777
verbs:
7878
- create
7979
- patch
80+
- apiGroups:
81+
- listeners.stackable.tech
82+
resources:
83+
- listeners
84+
verbs:
85+
- get
8086
- apiGroups:
8187
- {{ include "operator.name" . }}.stackable.tech
8288
resources:

docs/modules/hbase/pages/usage-guide/listenerclass.adoc

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
= Service exposition with ListenerClasses
2+
:description: Configure HBase service exposure using ListenerClasses to control internal and external access for all roles.
23

3-
Apache HBase offers an API.
4-
The operator deploys a service called `<name>` (where `<name>` is the name of the HbaseCluster) through which HBase can be reached.
5-
6-
This service can have either the `cluster-internal` or `external-unstable` type.
7-
`external-stable` is not supported for HBase at the moment.
8-
Read more about the types in the xref:concepts:service-exposition.adoc[service exposition] documentation at platform level.
9-
10-
This is how the listener class is configured:
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`:
116

127
[source,yaml]
138
----
149
spec:
15-
clusterConfig:
16-
listenerClass: cluster-internal # <1>
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+
<property>
28+
<name>hbase.listener.endpoint</name>
29+
<value>172.19.0.3:32445</value>
30+
</property>
1731
----
18-
<1> The default `cluster-internal` setting.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
= Trouble-shooting
2+
:description: Tips and guidelines to help trouble-shoot problems with running HBase.
3+
4+
To add more useful information to stack-traces caused by RPC issues, xref:operators:overrides.adoc[podOverrides] can be used to replace the default Netty implementation:
5+
6+
[source,yaml]
7+
----
8+
masters:
9+
roleGroups:
10+
default:
11+
configOverrides:
12+
hbase-site.xml:
13+
hbase.rpc.client.impl: "org.apache.hadoop.hbase.ipc.BlockingRpcClient"
14+
regionServers:
15+
roleGroups:
16+
default:
17+
configOverrides:
18+
hbase-site.xml:
19+
hbase.rpc.client.impl: "org.apache.hadoop.hbase.ipc.BlockingRpcClient"
20+
----

docs/modules/hbase/partials/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
** xref:hbase:usage-guide/hbck2.adoc[]
1414
** xref:hbase:usage-guide/snapshot-export.adoc[]
1515
** xref:hbase:usage-guide/adls.adoc[]
16+
** xref:hbase:usage-guide/troubleshooting.adoc[]
1617
** xref:hbase:usage-guide/operations/index.adoc[]
1718
*** xref:hbase:usage-guide/operations/cluster-operations.adoc[]
1819
*** xref:hbase:usage-guide/operations/pod-placement.adoc[]

0 commit comments

Comments
 (0)