[WIP]Support for VRRP keepalived for Ingress
Change-Id: I5a1ea545a01f59cd2213c375e42dcbca34bbad22
This commit is contained in:
parent
772b18afd9
commit
25c0aefe87
|
@ -0,0 +1,8 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../../../airshipctl/manifests/function/k8scontrol
|
||||
- ./replacements
|
||||
patchesStrategicMerge:
|
||||
- vrrp_keepalived_patch.yaml
|
|
@ -0,0 +1,2 @@
|
|||
resources:
|
||||
- networking.yaml
|
|
@ -0,0 +1,27 @@
|
|||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: ReplacementTransformer
|
||||
metadata:
|
||||
name: k8scontrol-networking-replacements
|
||||
annotations:
|
||||
config.kubernetes.io/function: |-
|
||||
container:
|
||||
image: quay.io/airshipit/replacement-transformer:latest
|
||||
replacements:
|
||||
- source:
|
||||
objref:
|
||||
kind: NetworkCatalogue
|
||||
name: networking
|
||||
fieldref: spec.kubernetes.ingressVIP
|
||||
target:
|
||||
objref:
|
||||
kind: KubeadmControlPlane
|
||||
fieldrefs: ["spec.kubeadmConfigSpec.files.0.ingressVIP"]
|
||||
- source:
|
||||
objref:
|
||||
kind: NetworkCatalogue
|
||||
name: networking
|
||||
fieldref: spec.kubernetes.ingressBond
|
||||
target:
|
||||
objref:
|
||||
kind: KubeadmControlPlane
|
||||
fieldrefs: ["spec.kubeadmConfigSpec.files.0.ingressBond"]
|
|
@ -0,0 +1,38 @@
|
|||
kind: KubeadmControlPlane
|
||||
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
|
||||
metadata:
|
||||
name: cluster-controlplane
|
||||
spec:
|
||||
kubeadmConfigSpec:
|
||||
files:
|
||||
- path: /etc/keepalived/keepalived.conf
|
||||
$patch: merge
|
||||
ingressVIP:
|
||||
ingressBond:
|
||||
content: |
|
||||
! Configuration File for keepalived
|
||||
global_defs {
|
||||
}
|
||||
vrrp_instance KUBERNETES {
|
||||
state BACKUP
|
||||
interface bond0.51
|
||||
virtual_router_id 124
|
||||
priority 101
|
||||
advert_int 1
|
||||
virtual_ipaddress {
|
||||
32.68.50.124
|
||||
}
|
||||
}
|
||||
vrrp_instance INGRESS {
|
||||
state BACKUP
|
||||
interface bond0.51
|
||||
virtual_router_id 125
|
||||
priority 101
|
||||
advert_int 1
|
||||
virtual_ipaddress {
|
||||
32.68.50.125
|
||||
}
|
||||
}
|
||||
preKubeadmCommands:
|
||||
- apt-get update && apt-get install -y bridge-utils keepalived ipset ipvsadm
|
||||
- systemctl enable --now keepalived
|
|
@ -13,6 +13,8 @@ spec:
|
|||
controlPlaneEndpoint:
|
||||
host: "10.23.25.102"
|
||||
apiserverCertSANs: "[10.23.25.102, 10.23.24.102]"
|
||||
ingressVIP: "10.23.25.102"
|
||||
ingressBond: bond51
|
||||
|
||||
ironic:
|
||||
provisioningIp: "10.23.24.102"
|
||||
|
|
Loading…
Reference in New Issue