Update metallb configs to use CRDs
This commit is contained in:
parent
48136fdc14
commit
4db72d4962
3 changed files with 40 additions and 35 deletions
|
@ -91,11 +91,14 @@ fun Prov.installK3s(k3sConfig: K3sConfig): ProvResult {
|
||||||
|
|
||||||
// metallb
|
// metallb
|
||||||
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-0.13.7-native-manifest.yaml"))
|
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-0.13.7-native-manifest.yaml"))
|
||||||
applyK3sFileFromResourceTemplate(
|
|
||||||
File(k3sManualManifestsDir, "metallb-config.yaml"),
|
repeatTaskUntilSuccess(6, 10) {
|
||||||
k3sConfigMap,
|
applyK3sFileFromResourceTemplate(
|
||||||
alternativeResourceName = File(metallbConfigResourceFileName)
|
File(k3sManualManifestsDir, "metallb-config.yaml"),
|
||||||
)
|
k3sConfigMap,
|
||||||
|
alternativeResourceName = File(metallbConfigResourceFileName)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// traefik
|
// traefik
|
||||||
if (k3sConfig.isDualStack()) {
|
if (k3sConfig.isDualStack()) {
|
||||||
|
|
|
@ -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:
|
addresses:
|
||||||
config: |
|
- ${node_ipv4}/32
|
||||||
address-pools:
|
- ${node_ipv6}/128
|
||||||
- name: public
|
---
|
||||||
protocol: layer2
|
apiVersion: metallb.io/v1beta1
|
||||||
addresses:
|
kind: IPAddressPool
|
||||||
- ${node_ipv4}/32
|
metadata:
|
||||||
- ${node_ipv6}/128
|
name: private
|
||||||
- name: private
|
namespace: metallb-system
|
||||||
protocol: layer2
|
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:
|
addresses:
|
||||||
config: |
|
- ${node_ipv4}/32
|
||||||
address-pools:
|
---
|
||||||
- name: public
|
apiVersion: metallb.io/v1beta1
|
||||||
protocol: layer2
|
kind: IPAddressPool
|
||||||
addresses:
|
metadata:
|
||||||
- ${node_ipv4}/32
|
name: private
|
||||||
- name: private
|
namespace: metallb-system
|
||||||
protocol: layer2
|
spec:
|
||||||
addresses:
|
addresses:
|
||||||
- ${loopback_ipv4}/32
|
- ${loopback_ipv4}/32
|
Loading…
Reference in a new issue