diff --git a/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/configuration/UsernamesConfiguration.java b/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/configuration/UsernamesConfiguration.java index 4eb86fd4b3..65f949d4c5 100644 --- a/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/configuration/UsernamesConfiguration.java +++ b/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/configuration/UsernamesConfiguration.java @@ -79,7 +79,8 @@ public enum Username { ONLINEFS("onlinefs"), ELASTIC("elastic"), FLYINGDUCK("flyingduck"), - KAGENT("kagent"); + KAGENT("kagent"), + MYSQL("mysql"); private final String _default; diff --git a/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/controllers/PKI.java b/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/controllers/PKI.java index 0c0d22bfb8..b51fe38612 100644 --- a/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/controllers/PKI.java +++ b/hopsworks-ca/src/main/java/io/hops/hopsworks/ca/controllers/PKI.java @@ -921,6 +921,10 @@ GeneralName[] getSanForUsername(String username) { return convertToGeneralNames(HopsworksService.FLYING_DUCK.domains(), true); case "kagent": return convertToGeneralNames(HopsworksService.DOCKER_REGISTRY.domains(), true); + case "mysql": + return convertToGeneralNames(mergeSets( + HopsworksService.MYSQL.domains(), + HopsworksService.RDRS.domains()), true); default: return EMTPY_GENERAL_NAMES; } diff --git a/hopsworks-ca/src/test/java/io/hops/hopsworks/ca/controllers/TestCertificateSigning.java b/hopsworks-ca/src/test/java/io/hops/hopsworks/ca/controllers/TestCertificateSigning.java index 21b42bb646..a3e79caf2f 100644 --- a/hopsworks-ca/src/test/java/io/hops/hopsworks/ca/controllers/TestCertificateSigning.java +++ b/hopsworks-ca/src/test/java/io/hops/hopsworks/ca/controllers/TestCertificateSigning.java @@ -533,12 +533,13 @@ public void testSANCertificateExtensionsBuilderDNSSAN() throws Exception { X509Certificate cert = converter.getCertificate(holder); Collection> sans = cert.getSubjectAlternativeNames(); - Assert.assertEquals(6, sans.size()); + Assert.assertEquals(7, sans.size()); // 2 is the code for SAN dnsName Assert.assertTrue(containsSAN(cert, "host1", 2)); Assert.assertTrue(containsSAN(cert, "namenode.service.consul", 2)); Assert.assertTrue(containsSAN(cert, "rpc.namenode.service.consul", 2)); Assert.assertTrue(containsSAN(cert, "http.namenode.service.consul", 2)); + Assert.assertTrue(containsSAN(cert, "monitoring.namenode.service.consul", 2)); Assert.assertTrue(containsSAN(cert, "sparkhistoryserver.service.consul", 2)); Assert.assertTrue(containsSAN(cert, "h0.hopsworks.ai", 2)); @@ -566,12 +567,13 @@ public void testSANCertificateExtensionsBuilderDNSSAN() throws Exception { cert = converter.getCertificate(holder); sans = cert.getSubjectAlternativeNames(); - Assert.assertEquals(6, sans.size()); + Assert.assertEquals(7, sans.size()); // 2 is the code for SAN dnsName Assert.assertTrue(containsSAN(cert, "host1", 2)); Assert.assertTrue(containsSAN(cert, "resourcemanager.service.consul", 2)); Assert.assertTrue(containsSAN(cert, "rpc.resourcemanager.service.consul", 2)); Assert.assertTrue(containsSAN(cert, "https.resourcemanager.service.consul", 2)); + Assert.assertTrue(containsSAN(cert, "monitoring.resourcemanager.service.consul", 2)); Assert.assertTrue(containsSAN(cert, "y0.hopsworks.ai", 2)); Assert.assertTrue(containsSAN(cert, "y1.hopsworks.ai", 2)); diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/HopsworksService.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/HopsworksService.java index 37c4f488c1..05c338c670 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/HopsworksService.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/HopsworksService.java @@ -28,6 +28,7 @@ import io.hops.hopsworks.servicediscovery.tags.NoTags; import io.hops.hopsworks.servicediscovery.tags.OpenSearchTags; import io.hops.hopsworks.servicediscovery.tags.PrometheusTags; +import io.hops.hopsworks.servicediscovery.tags.RdrsTags; import io.hops.hopsworks.servicediscovery.tags.ResourceManagerTags; import io.hops.hopsworks.servicediscovery.tags.ServiceTags; import io.hops.hopsworks.servicediscovery.tags.ZooKeeperTags; @@ -68,6 +69,7 @@ public class HopsworksService { OpenSearchTags.values()); public static final HopsworksService KAFKA = HopsworksService.of("kafka", KafkaTags.values()); + public static final HopsworksService RDRS = HopsworksService.of("rdrs", RdrsTags.values()); private final String name; private final T[] tags; diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/AirflowTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/AirflowTags.java index 4cb20971c4..fa0d0212a2 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/AirflowTags.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/AirflowTags.java @@ -16,7 +16,8 @@ package io.hops.hopsworks.servicediscovery.tags; public enum AirflowTags implements ServiceTags { - ui("ui"); + ui("ui"), + monitoring("monitoring"); private final String value; diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/GlassfishTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/GlassfishTags.java index 6ec173948e..b405419e26 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/GlassfishTags.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/GlassfishTags.java @@ -16,7 +16,8 @@ package io.hops.hopsworks.servicediscovery.tags; public enum GlassfishTags implements ServiceTags { - hopsworks("hopsworks"); + hopsworks("hopsworks"), + monitoring("monitoring"); private final String value; diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/HiveTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/HiveTags.java index a20b0dc12b..adab0128ad 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/HiveTags.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/HiveTags.java @@ -18,7 +18,8 @@ public enum HiveTags implements ServiceTags { hiveserver2_plain("hiveserver2-plain"), hiveserver2_tls("hiveserver2-tls"), - metastore("metastore"); + metastore("metastore"), + monitoring("monitoring"); private final String value; diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/KafkaTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/KafkaTags.java index b76795ce7d..c4fa37f406 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/KafkaTags.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/KafkaTags.java @@ -18,7 +18,8 @@ public enum KafkaTags implements ServiceTags { - broker("broker"); + broker("broker"), + monitoring("monitoring"); private final String value; diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/MysqlTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/MysqlTags.java index 3eee7de9d5..04150559b9 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/MysqlTags.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/MysqlTags.java @@ -16,7 +16,8 @@ package io.hops.hopsworks.servicediscovery.tags; public enum MysqlTags implements ServiceTags { - onlinefs("onlinefs"); + onlinefs("onlinefs"), + monitoring("monitoring"); private final String value; diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/NamenodeTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/NamenodeTags.java index 8866872271..d6d3ce059f 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/NamenodeTags.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/NamenodeTags.java @@ -17,7 +17,8 @@ public enum NamenodeTags implements ServiceTags { rpc("rpc"), - http("http"); + http("http"), + monitoring("monitoring"); private final String value; diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/RdrsTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/RdrsTags.java new file mode 100644 index 0000000000..62284a2578 --- /dev/null +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/RdrsTags.java @@ -0,0 +1,30 @@ +/* + * This file is part of Hopsworks + * Copyright (C) 2023, Hopsworks AB. All rights reserved + * + * Hopsworks is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later version. + * + * Hopsworks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this program. + * If not, see . + */ +package io.hops.hopsworks.servicediscovery.tags; + +public enum RdrsTags implements ServiceTags { + monitoring("monitoring"); + + private final String value; + + RdrsTags(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/ResourceManagerTags.java b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/ResourceManagerTags.java index de996688b2..2b9020bc8d 100644 --- a/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/ResourceManagerTags.java +++ b/hopsworks-service-discovery/src/main/java/io/hops/hopsworks/servicediscovery/tags/ResourceManagerTags.java @@ -17,7 +17,8 @@ public enum ResourceManagerTags implements ServiceTags { rpc("rpc"), - https("https"); + https("https"), + monitoring("monitoring"); private final String value; ResourceManagerTags(String value) {