Skip to content

Commit 671c6c3

Browse files
authored
chore: Rename env-vars to be compatible with config-utils template (#700)
* rename env-vars to be compatible with config-utils template * changelog
1 parent 184d2cf commit 671c6c3

File tree

6 files changed

+22
-11
lines changed

6 files changed

+22
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@
1111
- `EOS_INTERVAL` (`--eos-interval`) to set the interval in which the operator checks if it is EoS.
1212
- `EOS_DISABLED` (`--eos-disabled`) to disable the EoS checker completely.
1313

14+
### Changed
15+
16+
- Changed env-vars to be consistent with config-utils in the entrypoint script ([#700]).
17+
1418
[#691]: https://github.com/stackabletech/hbase-operator/pull/691
1519
[#697]: https://github.com/stackabletech/hbase-operator/pull/697
20+
[#700]: https://github.com/stackabletech/hbase-operator/pull/700
1621

1722
## [25.7.0] - 2025-07-23
1823

docs/modules/hbase/pages/reference/discovery.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ Contains the needed information to connect to Zookeeper and use that to establis
4141
=== Kerberos
4242
In case Kerberos is enabled according to the xref:usage-guide/security.adoc[security documentation], the discovery ConfigMap also includes the information that clients must authenticate themselves using Kerberos.
4343

44-
If you want to use the discovery ConfigMap outside Stackable services, you need to substitute `${env.KERBEROS_REALM}` with your actual realm (e.g. by using `sed -i -e 's/${{env.KERBEROS_REALM}}/'"$KERBEROS_REALM/g" hbase-site.xml`).
44+
If you want to use the discovery ConfigMap outside Stackable services, you need to substitute `${env:KERBEROS_REALM}` with your actual realm (e.g. by using `sed -i -e 's/${{env:KERBEROS_REALM}}/'"$KERBEROS_REALM/g" hbase-site.xml`).
4545

46-
One example would be the property `hbase.master.kerberos.principal` being set to `hbase/hbase.default.svc.cluster.local@${env.KERBEROS_REALM}`.
46+
One example would be the property `hbase.master.kerberos.principal` being set to `hbase/hbase.default.svc.cluster.local@${env:KERBEROS_REALM}`.

rust/operator-binary/src/hbase_controller.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,15 +567,15 @@ fn build_rolegroup_config_map(
567567
);
568568
hbase_site_config.insert(
569569
"hbase.master.hostname".to_string(),
570-
"${HBASE_SERVICE_HOST}".to_string(),
570+
"${env:HBASE_SERVICE_HOST}".to_string(),
571571
);
572572
hbase_site_config.insert(
573573
"hbase.master.port".to_string(),
574-
"${HBASE_SERVICE_PORT}".to_string(),
574+
"${env:HBASE_SERVICE_PORT}".to_string(),
575575
);
576576
hbase_site_config.insert(
577577
"hbase.master.info.port".to_string(),
578-
"${HBASE_INFO_PORT}".to_string(),
578+
"${env:HBASE_INFO_PORT}".to_string(),
579579
);
580580
hbase_site_config.insert(
581581
"hbase.master.bound.info.port".to_string(),
@@ -593,15 +593,15 @@ fn build_rolegroup_config_map(
593593
);
594594
hbase_site_config.insert(
595595
"hbase.unsafe.regionserver.hostname".to_string(),
596-
"${HBASE_SERVICE_HOST}".to_string(),
596+
"${env:HBASE_SERVICE_HOST}".to_string(),
597597
);
598598
hbase_site_config.insert(
599599
"hbase.regionserver.port".to_string(),
600-
"${HBASE_SERVICE_PORT}".to_string(),
600+
"${env:HBASE_SERVICE_PORT}".to_string(),
601601
);
602602
hbase_site_config.insert(
603603
"hbase.regionserver.info.port".to_string(),
604-
"${HBASE_INFO_PORT}".to_string(),
604+
"${env:HBASE_INFO_PORT}".to_string(),
605605
);
606606
hbase_site_config.insert(
607607
"hbase.regionserver.bound.info.port".to_string(),

rust/operator-binary/src/kerberos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ fn principal_host_part(
289289
})?;
290290
let cluster_domain = &cluster_info.cluster_domain;
291291
Ok(format!(
292-
"{hbase_name}.{hbase_namespace}.svc.{cluster_domain}@${{env.KERBEROS_REALM}}"
292+
"{hbase_name}.{hbase_namespace}.svc.{cluster_domain}@${{env:KERBEROS_REALM}}"
293293
))
294294
}
295295

tests/templates/kuttl/kerberos/41-access-hbase.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ data:
9090
klist
9191

9292
export KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf)
93-
cat /stackable/conf/hbase_mount/hbase-site.xml | sed -e 's/${env.KERBEROS_REALM}/'"$KERBEROS_REALM/g" > /stackable/conf/hbase/hbase-site.xml
93+
# the hdfs discovery files are not written by the hbase operator and use
94+
# the dot notation, so they cannot use config-utils
9495
cat /stackable/conf/hdfs_mount/core-site.xml | sed -e 's/${env.KERBEROS_REALM}/'"$KERBEROS_REALM/g" > /stackable/conf/hbase/core-site.xml
9596
cat /stackable/conf/hdfs_mount/hdfs-site.xml | sed -e 's/${env.KERBEROS_REALM}/'"$KERBEROS_REALM/g" > /stackable/conf/hbase/hdfs-site.xml
97+
cp /stackable/conf/hbase_mount/hbase-site.xml /stackable/conf/hbase/hbase-site.xml
98+
config-utils template /stackable/conf/hbase/hbase-site.xml
9699

97100
cat > /tmp/hbase-script << 'EOF'
98101
disable 'test';

tests/templates/kuttl/opa/41-access-hbase.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,12 @@ data:
8787
klist -k /stackable/kerberos/keytab
8888

8989
export KERBEROS_REALM=$(grep -oP 'default_realm = \K.*' /stackable/kerberos/krb5.conf)
90-
cat /stackable/conf/hbase_mount/hbase-site.xml | sed -e 's/${env.KERBEROS_REALM}/'"$KERBEROS_REALM/g" > /stackable/conf/hbase/hbase-site.xml
90+
# the hdfs discovery files are not written by the hbase operator and use
91+
# the dot notation, so they cannot use config-utils
9192
cat /stackable/conf/hdfs_mount/core-site.xml | sed -e 's/${env.KERBEROS_REALM}/'"$KERBEROS_REALM/g" > /stackable/conf/hbase/core-site.xml
9293
cat /stackable/conf/hdfs_mount/hdfs-site.xml | sed -e 's/${env.KERBEROS_REALM}/'"$KERBEROS_REALM/g" > /stackable/conf/hbase/hdfs-site.xml
94+
cp /stackable/conf/hbase_mount/hbase-site.xml /stackable/conf/hbase/hbase-site.xml
95+
config-utils template /stackable/conf/hbase/hbase-site.xml
9396

9497
kdestroy; kinit -kt /stackable/kerberos/keytab admin/access-hbase.$NAMESPACE.svc.cluster.local; klist
9598

0 commit comments

Comments
 (0)