Merge branch 'master' into local-sudoer-without-pw
This commit is contained in:
commit
ee1fe720f6
9 changed files with 4011 additions and 46 deletions
|
@ -18,7 +18,7 @@ apply plugin: "kotlinx-serialization"
|
||||||
|
|
||||||
|
|
||||||
group = "org.domaindrivenarchitecture.provs"
|
group = "org.domaindrivenarchitecture.provs"
|
||||||
version = "0.17.1-SNAPSHOT"
|
version = "0.18.1-SNAPSHOT"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
@ -11,8 +11,8 @@ import java.io.FileWriter
|
||||||
* Returns DesktopConfig; data for config is read from specified file.
|
* Returns DesktopConfig; data for config is read from specified file.
|
||||||
* Throws exceptions FileNotFoundException, SerializationException if file is not found resp. cannot be parsed.
|
* Throws exceptions FileNotFoundException, SerializationException if file is not found resp. cannot be parsed.
|
||||||
*/
|
*/
|
||||||
internal fun getConfig(filename: String = "desktop-config.yaml"): DesktopConfig = readFromFile(filename).yamlToType()
|
fun getConfig(filename: String = "desktop-config.yaml"): DesktopConfig = readFromFile(filename).yamlToType()
|
||||||
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
internal fun writeConfig(config: DesktopConfig, fileName: String = "desktop-config.yaml") = FileWriter(fileName).use { it.write(config.toYaml()) }
|
fun writeConfig(config: DesktopConfig, fileName: String = "desktop-config.yaml") = FileWriter(fileName).use { it.write(config.toYaml()) }
|
||||||
|
|
|
@ -90,13 +90,17 @@ fun Prov.installK3s(k3sConfig: K3sConfig): ProvResult {
|
||||||
cmd("INSTALL_K3S_VERSION=$K3S_VERSION k3s-install.sh")
|
cmd("INSTALL_K3S_VERSION=$K3S_VERSION k3s-install.sh")
|
||||||
|
|
||||||
// metallb
|
// metallb
|
||||||
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-namespace.yaml"))
|
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-0.13.7-native-manifest.yaml"))
|
||||||
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-0.10.2-manifest.yaml"))
|
|
||||||
|
repeatTaskUntilSuccess(6, 10) {
|
||||||
applyK3sFileFromResourceTemplate(
|
applyK3sFileFromResourceTemplate(
|
||||||
File(k3sManualManifestsDir, "metallb-config.yaml"),
|
File(k3sManualManifestsDir, "metallb-config.yaml"),
|
||||||
k3sConfigMap,
|
k3sConfigMap,
|
||||||
alternativeResourceName = File(metallbConfigResourceFileName)
|
alternativeResourceName = File(metallbConfigResourceFileName)
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-l2advertisement.yaml"))
|
||||||
|
|
||||||
// traefik
|
// traefik
|
||||||
if (k3sConfig.isDualStack()) {
|
if (k3sConfig.isDualStack()) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,18 +1,19 @@
|
||||||
apiVersion: v1
|
apiVersion: metallb.io/v1beta1
|
||||||
kind: ConfigMap
|
kind: IPAddressPool
|
||||||
metadata:
|
metadata:
|
||||||
|
name: public
|
||||||
namespace: metallb-system
|
namespace: metallb-system
|
||||||
name: config
|
spec:
|
||||||
data:
|
|
||||||
config: |
|
|
||||||
address-pools:
|
|
||||||
- name: public
|
|
||||||
protocol: layer2
|
|
||||||
addresses:
|
addresses:
|
||||||
- ${node_ipv4}/32
|
- ${node_ipv4}/32
|
||||||
- ${node_ipv6}/128
|
- ${node_ipv6}/128
|
||||||
- name: private
|
---
|
||||||
protocol: layer2
|
apiVersion: metallb.io/v1beta1
|
||||||
|
kind: IPAddressPool
|
||||||
|
metadata:
|
||||||
|
name: private
|
||||||
|
namespace: metallb-system
|
||||||
|
spec:
|
||||||
addresses:
|
addresses:
|
||||||
- ${loopback_ipv4}/32
|
- ${loopback_ipv4}/32
|
||||||
- ${loopback_ipv6}/128
|
- ${loopback_ipv6}/128
|
|
@ -1,16 +1,17 @@
|
||||||
apiVersion: v1
|
apiVersion: metallb.io/v1beta1
|
||||||
kind: ConfigMap
|
kind: IPAddressPool
|
||||||
metadata:
|
metadata:
|
||||||
|
name: public
|
||||||
namespace: metallb-system
|
namespace: metallb-system
|
||||||
name: config
|
spec:
|
||||||
data:
|
|
||||||
config: |
|
|
||||||
address-pools:
|
|
||||||
- name: public
|
|
||||||
protocol: layer2
|
|
||||||
addresses:
|
addresses:
|
||||||
- ${node_ipv4}/32
|
- ${node_ipv4}/32
|
||||||
- name: private
|
---
|
||||||
protocol: layer2
|
apiVersion: metallb.io/v1beta1
|
||||||
|
kind: IPAddressPool
|
||||||
|
metadata:
|
||||||
|
name: private
|
||||||
|
namespace: metallb-system
|
||||||
|
spec:
|
||||||
addresses:
|
addresses:
|
||||||
- ${loopback_ipv4}/32
|
- ${loopback_ipv4}/32
|
|
@ -0,0 +1,9 @@
|
||||||
|
apiVersion: metallb.io/v1beta1
|
||||||
|
kind: L2Advertisement
|
||||||
|
metadata:
|
||||||
|
name: layer2
|
||||||
|
namespace: metallb-system
|
||||||
|
spec:
|
||||||
|
ipAddressPools:
|
||||||
|
- private
|
||||||
|
- public
|
|
@ -1,6 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: metallb-system
|
|
||||||
labels:
|
|
||||||
app: metallb
|
|
Loading…
Reference in a new issue