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
|
||||
applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-0.13.7-native-manifest.yaml"))
|
||||
applyK3sFileFromResourceTemplate(
|
||||
File(k3sManualManifestsDir, "metallb-config.yaml"),
|
||||
k3sConfigMap,
|
||||
alternativeResourceName = File(metallbConfigResourceFileName)
|
||||
)
|
||||
|
||||
repeatTaskUntilSuccess(6, 10) {
|
||||
applyK3sFileFromResourceTemplate(
|
||||
File(k3sManualManifestsDir, "metallb-config.yaml"),
|
||||
k3sConfigMap,
|
||||
alternativeResourceName = File(metallbConfigResourceFileName)
|
||||
)
|
||||
}
|
||||
|
||||
// traefik
|
||||
if (k3sConfig.isDualStack()) {
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue