1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ // Package main contains the main function for the Liqo controller manager.
1516package main
1617
1718import (
@@ -72,6 +73,7 @@ import (
7273 liqoerrors "github.com/liqotech/liqo/pkg/utils/errors"
7374 "github.com/liqotech/liqo/pkg/utils/mapper"
7475 "github.com/liqotech/liqo/pkg/utils/restcfg"
76+ "github.com/liqotech/liqo/pkg/vkMachinery"
7577 "github.com/liqotech/liqo/pkg/vkMachinery/forge"
7678)
7779
@@ -96,6 +98,8 @@ func main() {
9698 var nodeExtraAnnotations , nodeExtraLabels argsutils.StringMap
9799 var kubeletCPURequests , kubeletCPULimits argsutils.Quantity
98100 var kubeletRAMRequests , kubeletRAMLimits argsutils.Quantity
101+ var kubeletMetricsAddress string
102+ var kubeletMetricsEnabled bool
99103
100104 webhookPort := flag .Uint ("webhook-port" , 9443 , "The port the webhook server binds to" )
101105 metricsAddr := flag .String ("metrics-address" , ":8080" , "The address the metric endpoint binds to" )
@@ -152,6 +156,8 @@ func main() {
152156 flag .Var (& kubeletCPULimits , "kubelet-cpu-limits" , "CPU limits assigned to the Virtual Kubelet Pod" )
153157 flag .Var (& kubeletRAMRequests , "kubelet-ram-requests" , "RAM requests assigned to the Virtual Kubelet Pod" )
154158 flag .Var (& kubeletRAMLimits , "kubelet-ram-limits" , "RAM limits assigned to the Virtual Kubelet Pod" )
159+ flag .StringVar (& kubeletMetricsAddress , "kubelet-metrics-address" , vkMachinery .MetricsAddress , "The address the kubelet metrics endpoint binds to" )
160+ flag .BoolVar (& kubeletMetricsEnabled , "kubelet-metrics-enabled" , false , "Enable the kubelet metrics endpoint" )
155161 flag .Var (& nodeExtraAnnotations , "node-extra-annotations" , "Extra annotations to add to the Virtual Node" )
156162 flag .Var (& nodeExtraLabels , "node-extra-labels" , "Extra labels to add to the Virtual Node" )
157163 kubeletIpamServer := flag .String ("kubelet-ipam-server" , "" ,
@@ -310,6 +316,8 @@ func main() {
310316 LimitsCPU : kubeletCPULimits .Quantity ,
311317 LimitsRAM : kubeletRAMLimits .Quantity ,
312318 IpamEndpoint : * kubeletIpamServer ,
319+ MetricsAddress : kubeletMetricsAddress ,
320+ MetricsEnabled : kubeletMetricsEnabled ,
313321 }
314322
315323 resourceOfferReconciler := resourceoffercontroller .NewResourceOfferController (
0 commit comments