kubernetes module: add featureGates option
This commit is contained in:
parent
f10138bd32
commit
74f99525e0
@ -194,6 +194,12 @@ in {
|
|||||||
type = types.path;
|
type = types.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
featureGates = mkOption {
|
||||||
|
description = "List set of feature gates";
|
||||||
|
default = [];
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
|
||||||
apiserver = {
|
apiserver = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
description = "Whether to enable Kubernetes apiserver.";
|
description = "Whether to enable Kubernetes apiserver.";
|
||||||
@ -201,6 +207,12 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
featureGates = mkOption {
|
||||||
|
description = "List set of feature gates";
|
||||||
|
default = cfg.featureGates;
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
|
||||||
address = mkOption {
|
address = mkOption {
|
||||||
description = "Kubernetes apiserver listening address.";
|
description = "Kubernetes apiserver listening address.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
@ -389,6 +401,12 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
featureGates = mkOption {
|
||||||
|
description = "List set of feature gates";
|
||||||
|
default = cfg.featureGates;
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
|
||||||
address = mkOption {
|
address = mkOption {
|
||||||
description = "Kubernetes scheduler listening address.";
|
description = "Kubernetes scheduler listening address.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
@ -423,6 +441,12 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
featureGates = mkOption {
|
||||||
|
description = "List set of feature gates";
|
||||||
|
default = cfg.featureGates;
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
|
||||||
address = mkOption {
|
address = mkOption {
|
||||||
description = "Kubernetes controller manager listening address.";
|
description = "Kubernetes controller manager listening address.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
@ -475,6 +499,12 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
featureGates = mkOption {
|
||||||
|
description = "List set of feature gates";
|
||||||
|
default = cfg.featureGates;
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
|
||||||
registerNode = mkOption {
|
registerNode = mkOption {
|
||||||
description = "Whether to auto register kubelet with API server.";
|
description = "Whether to auto register kubelet with API server.";
|
||||||
default = true;
|
default = true;
|
||||||
@ -635,6 +665,12 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
featureGates = mkOption {
|
||||||
|
description = "List set of feature gates";
|
||||||
|
default = cfg.featureGates;
|
||||||
|
type = types.listOf types.str;
|
||||||
|
};
|
||||||
|
|
||||||
address = mkOption {
|
address = mkOption {
|
||||||
description = "Kubernetes proxy listening address.";
|
description = "Kubernetes proxy listening address.";
|
||||||
default = "0.0.0.0";
|
default = "0.0.0.0";
|
||||||
@ -775,6 +811,8 @@ in {
|
|||||||
--hairpin-mode=hairpin-veth \
|
--hairpin-mode=hairpin-veth \
|
||||||
${optionalString (cfg.kubelet.nodeIp != null)
|
${optionalString (cfg.kubelet.nodeIp != null)
|
||||||
"--node-ip=${cfg.kubelet.nodeIp}"} \
|
"--node-ip=${cfg.kubelet.nodeIp}"} \
|
||||||
|
${optionalString (cfg.kubelet.featureGates != [])
|
||||||
|
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.kubelet.featureGates}"} \
|
||||||
${optionalString cfg.verbose "--v=6 --log_flush_frequency=1s"} \
|
${optionalString cfg.verbose "--v=6 --log_flush_frequency=1s"} \
|
||||||
${cfg.kubelet.extraOpts}
|
${cfg.kubelet.extraOpts}
|
||||||
'';
|
'';
|
||||||
@ -860,6 +898,8 @@ in {
|
|||||||
${optionalString cfg.verbose "--v=6"} \
|
${optionalString cfg.verbose "--v=6"} \
|
||||||
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
||||||
--storage-backend=${cfg.apiserver.storageBackend} \
|
--storage-backend=${cfg.apiserver.storageBackend} \
|
||||||
|
${optionalString (cfg.kubelet.featureGates != [])
|
||||||
|
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.kubelet.featureGates}"} \
|
||||||
${cfg.apiserver.extraOpts}
|
${cfg.apiserver.extraOpts}
|
||||||
'';
|
'';
|
||||||
WorkingDirectory = cfg.dataDir;
|
WorkingDirectory = cfg.dataDir;
|
||||||
@ -886,6 +926,8 @@ in {
|
|||||||
--kubeconfig=${mkKubeConfig "kube-scheduler" cfg.scheduler.kubeconfig} \
|
--kubeconfig=${mkKubeConfig "kube-scheduler" cfg.scheduler.kubeconfig} \
|
||||||
${optionalString cfg.verbose "--v=6"} \
|
${optionalString cfg.verbose "--v=6"} \
|
||||||
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
||||||
|
${optionalString (cfg.scheduler.featureGates != [])
|
||||||
|
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.scheduler.featureGates}"} \
|
||||||
${cfg.scheduler.extraOpts}
|
${cfg.scheduler.extraOpts}
|
||||||
'';
|
'';
|
||||||
WorkingDirectory = cfg.dataDir;
|
WorkingDirectory = cfg.dataDir;
|
||||||
@ -920,6 +962,8 @@ in {
|
|||||||
${optionalString (cfg.clusterCidr!=null)
|
${optionalString (cfg.clusterCidr!=null)
|
||||||
"--cluster-cidr=${cfg.clusterCidr}"} \
|
"--cluster-cidr=${cfg.clusterCidr}"} \
|
||||||
--allocate-node-cidrs=true \
|
--allocate-node-cidrs=true \
|
||||||
|
${optionalString (cfg.controllerManager.featureGates != [])
|
||||||
|
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.controllerManager.featureGates}"} \
|
||||||
${optionalString cfg.verbose "--v=6"} \
|
${optionalString cfg.verbose "--v=6"} \
|
||||||
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
||||||
${cfg.controllerManager.extraOpts}
|
${cfg.controllerManager.extraOpts}
|
||||||
@ -945,6 +989,8 @@ in {
|
|||||||
ExecStart = ''${cfg.package}/bin/kube-proxy \
|
ExecStart = ''${cfg.package}/bin/kube-proxy \
|
||||||
--kubeconfig=${mkKubeConfig "kube-proxy" cfg.proxy.kubeconfig} \
|
--kubeconfig=${mkKubeConfig "kube-proxy" cfg.proxy.kubeconfig} \
|
||||||
--bind-address=${cfg.proxy.address} \
|
--bind-address=${cfg.proxy.address} \
|
||||||
|
${optionalString (cfg.proxy.featureGates != [])
|
||||||
|
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.proxy.featureGates}"} \
|
||||||
${optionalString cfg.verbose "--v=6"} \
|
${optionalString cfg.verbose "--v=6"} \
|
||||||
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
|
||||||
${optionalString (cfg.clusterCidr!=null)
|
${optionalString (cfg.clusterCidr!=null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user