kubernetes module: add featureGates option

This commit is contained in:
Jaka Hudoklin 2017-09-01 12:14:00 +02:00 committed by Robin Gloster
parent f10138bd32
commit 74f99525e0

View File

@ -194,6 +194,12 @@ in {
type = types.path;
};
featureGates = mkOption {
description = "List set of feature gates";
default = [];
type = types.listOf types.str;
};
apiserver = {
enable = mkOption {
description = "Whether to enable Kubernetes apiserver.";
@ -201,6 +207,12 @@ in {
type = types.bool;
};
featureGates = mkOption {
description = "List set of feature gates";
default = cfg.featureGates;
type = types.listOf types.str;
};
address = mkOption {
description = "Kubernetes apiserver listening address.";
default = "127.0.0.1";
@ -389,6 +401,12 @@ in {
type = types.bool;
};
featureGates = mkOption {
description = "List set of feature gates";
default = cfg.featureGates;
type = types.listOf types.str;
};
address = mkOption {
description = "Kubernetes scheduler listening address.";
default = "127.0.0.1";
@ -423,6 +441,12 @@ in {
type = types.bool;
};
featureGates = mkOption {
description = "List set of feature gates";
default = cfg.featureGates;
type = types.listOf types.str;
};
address = mkOption {
description = "Kubernetes controller manager listening address.";
default = "127.0.0.1";
@ -475,6 +499,12 @@ in {
type = types.bool;
};
featureGates = mkOption {
description = "List set of feature gates";
default = cfg.featureGates;
type = types.listOf types.str;
};
registerNode = mkOption {
description = "Whether to auto register kubelet with API server.";
default = true;
@ -635,6 +665,12 @@ in {
type = types.bool;
};
featureGates = mkOption {
description = "List set of feature gates";
default = cfg.featureGates;
type = types.listOf types.str;
};
address = mkOption {
description = "Kubernetes proxy listening address.";
default = "0.0.0.0";
@ -775,6 +811,8 @@ in {
--hairpin-mode=hairpin-veth \
${optionalString (cfg.kubelet.nodeIp != null)
"--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"} \
${cfg.kubelet.extraOpts}
'';
@ -860,6 +898,8 @@ in {
${optionalString cfg.verbose "--v=6"} \
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
--storage-backend=${cfg.apiserver.storageBackend} \
${optionalString (cfg.kubelet.featureGates != [])
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.kubelet.featureGates}"} \
${cfg.apiserver.extraOpts}
'';
WorkingDirectory = cfg.dataDir;
@ -886,6 +926,8 @@ in {
--kubeconfig=${mkKubeConfig "kube-scheduler" cfg.scheduler.kubeconfig} \
${optionalString cfg.verbose "--v=6"} \
${optionalString cfg.verbose "--log-flush-frequency=1s"} \
${optionalString (cfg.scheduler.featureGates != [])
"--feature-gates=${concatMapStringsSep "," (feature: "${feature}=true") cfg.scheduler.featureGates}"} \
${cfg.scheduler.extraOpts}
'';
WorkingDirectory = cfg.dataDir;
@ -920,6 +962,8 @@ in {
${optionalString (cfg.clusterCidr!=null)
"--cluster-cidr=${cfg.clusterCidr}"} \
--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 "--log-flush-frequency=1s"} \
${cfg.controllerManager.extraOpts}
@ -945,6 +989,8 @@ in {
ExecStart = ''${cfg.package}/bin/kube-proxy \
--kubeconfig=${mkKubeConfig "kube-proxy" cfg.proxy.kubeconfig} \
--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 "--log-flush-frequency=1s"} \
${optionalString (cfg.clusterCidr!=null)