add dummy custom types for metallb
manage metallb ip address pool and l2advertisements in nix
This commit is contained in:
parent
b4d6a9f46d
commit
3124436b46
4 changed files with 29 additions and 13 deletions
|
@ -3,6 +3,7 @@
|
||||||
hosts: manager
|
hosts: manager
|
||||||
roles:
|
roles:
|
||||||
- {role: traefik, tags: traefik}
|
- {role: traefik, tags: traefik}
|
||||||
|
- {role: freshrss, tags: freshrss}
|
||||||
- {role: forgejo, tags: forgejo}
|
- {role: forgejo, tags: forgejo}
|
||||||
- {role: radicale, tags: radicale}
|
- {role: radicale, tags: radicale}
|
||||||
- {role: hedgedoc, tags: hedgedoc}
|
- {role: hedgedoc, tags: hedgedoc}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
apiVersion: metallb.io/v1beta1
|
|
||||||
kind: IPAddressPool
|
|
||||||
metadata:
|
|
||||||
name: main
|
|
||||||
namespace: metallb-system
|
|
||||||
spec:
|
|
||||||
addresses:
|
|
||||||
- 192.168.40.100-192.168.40.253
|
|
|
@ -1,5 +0,0 @@
|
||||||
apiVersion: metallb.io/v1beta1
|
|
||||||
kind: L2Advertisement
|
|
||||||
metadata:
|
|
||||||
name: main
|
|
||||||
namespace: metallb-system
|
|
|
@ -11,6 +11,26 @@
|
||||||
kubernetes = {
|
kubernetes = {
|
||||||
namespace = "kubenix";
|
namespace = "kubenix";
|
||||||
|
|
||||||
|
customTypes = {
|
||||||
|
# HACK: These are dummy custom types.
|
||||||
|
# This is needed, because the CRDs imported as a chart are not available as Nix modules
|
||||||
|
# There is no validation whatsoever on resources defined using these types!
|
||||||
|
# See: https://github.com/hall/kubenix/issues/34
|
||||||
|
ipaddresspool = {
|
||||||
|
attrName = "ipaddresspools";
|
||||||
|
group = "metallb.io";
|
||||||
|
version = "v1beta1";
|
||||||
|
kind = "IPAddressPool";
|
||||||
|
};
|
||||||
|
|
||||||
|
l2advertisement = {
|
||||||
|
attrName = "l2advertisements";
|
||||||
|
group = "metallb.io";
|
||||||
|
version = "v1beta1";
|
||||||
|
kind = "L2Advertisement";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
resources = {
|
resources = {
|
||||||
namespaces = {
|
namespaces = {
|
||||||
kubenix = { };
|
kubenix = { };
|
||||||
|
@ -70,11 +90,19 @@
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ipaddresspools.main = {
|
||||||
|
metadata.namespace = "metallb-system";
|
||||||
|
spec.addresses = [ "192.168.40.100-192.168.40.253" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
l2advertisements.main.metadata.namespace = "metallb-system";
|
||||||
};
|
};
|
||||||
|
|
||||||
helm.releases.metallb = {
|
helm.releases.metallb = {
|
||||||
chart = nixhelm.chartsDerivations.${system}.metallb.metallb;
|
chart = nixhelm.chartsDerivations.${system}.metallb.metallb;
|
||||||
namespace = "metallb-system";
|
namespace = "metallb-system";
|
||||||
|
includeCRDs = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue