introduce certmgm & apple
parent
4c578bcf81
commit
5b3a4ea4ac
@ -0,0 +1,5 @@
|
||||
package org.domaindrivenarchitecture.provs.configuration.domain
|
||||
|
||||
typealias Ipv6 = String
|
||||
typealias Ipv4 = String
|
||||
typealias Fqdn = String
|
@ -1,6 +0,0 @@
|
||||
package org.domaindrivenarchitecture.provs.server.domain.k3s
|
||||
|
||||
typealias Ipv6 = String
|
||||
typealias Ipv4 = String
|
||||
typealias Fqdn = String
|
||||
typealias Reprovision = Boolean
|
@ -0,0 +1,5 @@
|
||||
package org.domaindrivenarchitecture.provs.server.domain
|
||||
|
||||
enum class CertmanagerEndpoint {
|
||||
STAGING, PROD
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package org.domaindrivenarchitecture.provs.server.domain.k3s
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import org.domaindrivenarchitecture.provs.server.domain.CertmanagerEndpoint
|
||||
|
||||
@Serializable
|
||||
data class Certmanager(
|
||||
val email: Email,
|
||||
val letsencryptEndpoint: CertmanagerEndpoint
|
||||
)
|
@ -1,14 +1,21 @@
|
||||
package org.domaindrivenarchitecture.provs.server.domain.k3s
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import org.domaindrivenarchitecture.provs.server.infrastructure.CertManagerEndPoint
|
||||
import org.domaindrivenarchitecture.provs.configuration.domain.Fqdn
|
||||
|
||||
@Serializable
|
||||
data class K3sConfig(
|
||||
val fqdn: Fqdn,
|
||||
val node: Node,
|
||||
val loopback: Loopback = Loopback(ipv4 = "192.168.5.1", ipv6 = "fc00::5:1"),
|
||||
val reprovision: Reprovision = false,
|
||||
val letsencryptEndpoint: CertManagerEndPoint = CertManagerEndPoint.STAGING
|
||||
val certmanager: Certmanager? = null,
|
||||
val apple: Apple? = null,
|
||||
val reprovision: Reprovision = false
|
||||
) {
|
||||
|
||||
// valid only if: apple != null >> certmanager != null
|
||||
|
||||
fun isDualStack(): Boolean {
|
||||
return node.ipv6 != null && loopback.ipv6 != null
|
||||
}
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package org.domaindrivenarchitecture.provs.server.domain.k3s
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import org.domaindrivenarchitecture.provs.configuration.domain.Ipv4
|
||||
import org.domaindrivenarchitecture.provs.configuration.domain.Ipv6
|
||||
|
||||
@Serializable
|
||||
data class Loopback(
|
||||
val ipv4: Ipv4,
|
||||
val ipv6: Ipv6?)
|
||||
val ipv6: Ipv6? = null)
|
@ -1,8 +1,10 @@
|
||||
package org.domaindrivenarchitecture.provs.server.domain.k3s
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import org.domaindrivenarchitecture.provs.configuration.domain.Ipv4
|
||||
import org.domaindrivenarchitecture.provs.configuration.domain.Ipv6
|
||||
|
||||
@Serializable
|
||||
data class Node(
|
||||
val ipv4: Ipv4,
|
||||
val ipv6: Ipv6?)
|
||||
val ipv6: Ipv6? = null)
|
||||
|
@ -0,0 +1,5 @@
|
||||
package org.domaindrivenarchitecture.provs.server.domain.k3s
|
||||
|
||||
typealias Reprovision = Boolean
|
||||
typealias Apple = Boolean
|
||||
typealias Email = String
|
@ -1,6 +1,9 @@
|
||||
fqdn: statistics.test.meissa-gmbh.de
|
||||
node:
|
||||
ipv4: 159.69.176.151
|
||||
ipv4: 162.55.164.138
|
||||
ipv6: 2a01:4f8:c010:672f::1
|
||||
reprovision: true
|
||||
letsencryptEndpoint: PROD
|
||||
certmanager:
|
||||
email: admin@meissa-gmbh.de
|
||||
letsencryptEndpoint: PROD
|
||||
apple: true
|
||||
reprovision: true
|
Loading…
Reference in New Issue