dotfiles/terranix/main/kubernetes/generated/metallb/metallb-system.DaemonSet.metallb-speaker.nix
magic_rb 03b54bd52b
Use helm2nix2terraform to create nix files from helm charts
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-04-07 13:24:08 +02:00

325 lines
9.3 KiB
Nix

{
apiVersion = "apps/v1";
kind = "DaemonSet";
metadata = {
labels = {
"app.kubernetes.io/component" = "speaker";
"app.kubernetes.io/instance" = "metallb";
"app.kubernetes.io/managed-by" = "Helm";
"app.kubernetes.io/name" = "metallb";
"app.kubernetes.io/version" = "v0.14.3";
"helm.sh/chart" = "metallb-0.14.3";
};
name = "metallb-speaker";
namespace = "metallb-system";
};
spec = {
selector = {
matchLabels = {
"app.kubernetes.io/component" = "speaker";
"app.kubernetes.io/instance" = "metallb";
"app.kubernetes.io/name" = "metallb";
};
};
template = {
metadata = {
labels = {
"app.kubernetes.io/component" = "speaker";
"app.kubernetes.io/instance" = "metallb";
"app.kubernetes.io/name" = "metallb";
};
};
spec = {
containers = [
{
args = ["--port=7472" "--log-level=info"];
env = [
{
name = "METALLB_NODE_NAME";
valueFrom = {fieldRef = {fieldPath = "spec.nodeName";};};
}
{
name = "METALLB_HOST";
valueFrom = {fieldRef = {fieldPath = "status.hostIP";};};
}
{
name = "METALLB_ML_BIND_ADDR";
valueFrom = {fieldRef = {fieldPath = "status.podIP";};};
}
{
name = "METALLB_ML_LABELS";
value = "app.kubernetes.io/name=metallb,app.kubernetes.io/component=speaker";
}
{
name = "METALLB_ML_BIND_PORT";
value = "7946";
}
{
name = "METALLB_ML_SECRET_KEY_PATH";
value = "/etc/ml_secret_key";
}
{
name = "FRR_CONFIG_FILE";
value = "/etc/frr_reloader/frr.conf";
}
{
name = "FRR_RELOADER_PID_FILE";
value = "/etc/frr_reloader/reloader.pid";
}
{
name = "METALLB_BGP_TYPE";
value = "frr";
}
];
image = "quay.io/metallb/speaker:v0.14.3";
livenessProbe = {
failureThreshold = 3;
httpGet = {
path = "/metrics";
port = "monitoring";
};
initialDelaySeconds = 10;
periodSeconds = 10;
successThreshold = 1;
timeoutSeconds = 1;
};
name = "speaker";
ports = [
{
containerPort = 7472;
name = "monitoring";
}
{
containerPort = 7946;
name = "memberlist-tcp";
protocol = "TCP";
}
{
containerPort = 7946;
name = "memberlist-udp";
protocol = "UDP";
}
];
readinessProbe = {
failureThreshold = 3;
httpGet = {
path = "/metrics";
port = "monitoring";
};
initialDelaySeconds = 10;
periodSeconds = 10;
successThreshold = 1;
timeoutSeconds = 1;
};
securityContext = {
allowPrivilegeEscalation = false;
capabilities = {
add = ["NET_RAW"];
drop = ["ALL"];
};
readOnlyRootFilesystem = true;
};
volumeMounts = [
{
mountPath = "/etc/ml_secret_key";
name = "memberlist";
}
{
mountPath = "/etc/frr_reloader";
name = "reloader";
}
{
mountPath = "/etc/metallb";
name = "metallb-excludel2";
}
];
}
{
command = ["/bin/sh" "-c" "/sbin/tini -- /usr/lib/frr/docker-start &\nattempts=0\nuntil [[ -f /etc/frr/frr.log || $attempts -eq 60 ]]; do\n sleep 1\n attempts=$(( $attempts + 1 ))\ndone\ntail -f /etc/frr/frr.log\n"];
env = [
{
name = "TINI_SUBREAPER";
value = "true";
}
];
image = "quay.io/frrouting/frr:8.5.2";
livenessProbe = {
failureThreshold = 3;
httpGet = {
path = "/livez";
port = 7473;
};
initialDelaySeconds = 10;
periodSeconds = 10;
successThreshold = 1;
timeoutSeconds = 1;
};
name = "frr";
securityContext = {capabilities = {add = ["NET_ADMIN" "NET_RAW" "SYS_ADMIN" "NET_BIND_SERVICE"];};};
startupProbe = {
failureThreshold = 30;
httpGet = {
path = "/livez";
port = 7473;
};
periodSeconds = 5;
};
volumeMounts = [
{
mountPath = "/var/run/frr";
name = "frr-sockets";
}
{
mountPath = "/etc/frr";
name = "frr-conf";
}
];
}
{
command = ["/etc/frr_reloader/frr-reloader.sh"];
image = "quay.io/frrouting/frr:8.5.2";
name = "reloader";
volumeMounts = [
{
mountPath = "/var/run/frr";
name = "frr-sockets";
}
{
mountPath = "/etc/frr";
name = "frr-conf";
}
{
mountPath = "/etc/frr_reloader";
name = "reloader";
}
];
}
{
args = ["--metrics-port=7473"];
command = ["/etc/frr_metrics/frr-metrics"];
image = "quay.io/frrouting/frr:8.5.2";
name = "frr-metrics";
ports = [
{
containerPort = 7473;
name = "monitoring";
}
];
volumeMounts = [
{
mountPath = "/var/run/frr";
name = "frr-sockets";
}
{
mountPath = "/etc/frr";
name = "frr-conf";
}
{
mountPath = "/etc/frr_metrics";
name = "metrics";
}
];
}
];
hostNetwork = true;
initContainers = [
{
command = ["/bin/sh" "-c" "cp -rLf /tmp/frr/* /etc/frr/"];
image = "quay.io/frrouting/frr:8.5.2";
name = "cp-frr-files";
securityContext = {
runAsGroup = 101;
runAsUser = 100;
};
volumeMounts = [
{
mountPath = "/tmp/frr";
name = "frr-startup";
}
{
mountPath = "/etc/frr";
name = "frr-conf";
}
];
}
{
command = ["/bin/sh" "-c" "cp -f /frr-reloader.sh /etc/frr_reloader/"];
image = "quay.io/metallb/speaker:v0.14.3";
name = "cp-reloader";
volumeMounts = [
{
mountPath = "/etc/frr_reloader";
name = "reloader";
}
];
}
{
command = ["/bin/sh" "-c" "cp -f /frr-metrics /etc/frr_metrics/"];
image = "quay.io/metallb/speaker:v0.14.3";
name = "cp-metrics";
volumeMounts = [
{
mountPath = "/etc/frr_metrics";
name = "metrics";
}
];
}
];
nodeSelector = {"kubernetes.io/os" = "linux";};
serviceAccountName = "metallb-speaker";
shareProcessNamespace = true;
terminationGracePeriodSeconds = 0;
tolerations = [
{
effect = "NoSchedule";
key = "node-role.kubernetes.io/master";
operator = "Exists";
}
{
effect = "NoSchedule";
key = "node-role.kubernetes.io/control-plane";
operator = "Exists";
}
];
volumes = [
{
name = "memberlist";
secret = {
defaultMode = 420;
secretName = "metallb-memberlist";
};
}
{
configMap = {
defaultMode = 256;
name = "metallb-excludel2";
};
name = "metallb-excludel2";
}
{
emptyDir = {};
name = "frr-sockets";
}
{
configMap = {name = "metallb-frr-startup";};
name = "frr-startup";
}
{
emptyDir = {};
name = "frr-conf";
}
{
emptyDir = {};
name = "reloader";
}
{
emptyDir = {};
name = "metrics";
}
];
};
};
updateStrategy = {type = "RollingUpdate";};
};
}