Merge branch 'master' into local-sudoer-without-pw

This commit is contained in:
az 2023-02-05 14:31:08 +01:00
commit ee1fe720f6
9 changed files with 4011 additions and 46 deletions

View file

@ -18,7 +18,7 @@ apply plugin: "kotlinx-serialization"
group = "org.domaindrivenarchitecture.provs"
version = "0.17.1-SNAPSHOT"
version = "0.18.1-SNAPSHOT"
repositories {
mavenCentral()

View file

@ -11,8 +11,8 @@ import java.io.FileWriter
* Returns DesktopConfig; data for config is read from specified file.
* 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")
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()) }

View file

@ -90,13 +90,17 @@ fun Prov.installK3s(k3sConfig: K3sConfig): ProvResult {
cmd("INSTALL_K3S_VERSION=$K3S_VERSION k3s-install.sh")
// metallb
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-namespace.yaml"))
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-0.10.2-manifest.yaml"))
applyK3sFileFromResourceTemplate(
File(k3sManualManifestsDir, "metallb-config.yaml"),
k3sConfigMap,
alternativeResourceName = File(metallbConfigResourceFileName)
)
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-0.13.7-native-manifest.yaml"))
repeatTaskUntilSuccess(6, 10) {
applyK3sFileFromResourceTemplate(
File(k3sManualManifestsDir, "metallb-config.yaml"),
k3sConfigMap,
alternativeResourceName = File(metallbConfigResourceFileName)
)
}
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-l2advertisement.yaml"))
// traefik
if (k3sConfig.isDualStack()) {

View file

@ -1,18 +1,19 @@
apiVersion: v1
kind: ConfigMap
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: public
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: public
protocol: layer2
addresses:
- ${node_ipv4}/32
- ${node_ipv6}/128
- name: private
protocol: layer2
addresses:
- ${loopback_ipv4}/32
- ${loopback_ipv6}/128
spec:
addresses:
- ${node_ipv4}/32
- ${node_ipv6}/128
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: private
namespace: metallb-system
spec:
addresses:
- ${loopback_ipv4}/32
- ${loopback_ipv6}/128

View file

@ -1,16 +1,17 @@
apiVersion: v1
kind: ConfigMap
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: public
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: public
protocol: layer2
addresses:
- ${node_ipv4}/32
- name: private
protocol: layer2
addresses:
- ${loopback_ipv4}/32
spec:
addresses:
- ${node_ipv4}/32
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: private
namespace: metallb-system
spec:
addresses:
- ${loopback_ipv4}/32

View file

@ -0,0 +1,9 @@
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: layer2
namespace: metallb-system
spec:
ipAddressPools:
- private
- public

View file

@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: metallb-system
labels:
app: metallb