From d55642aa0bad49226ad6099e9800b7226f8b47f3 Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Fri, 15 Apr 2022 14:06:26 +0800 Subject: [PATCH] Fix node_initialization_template --- cmd/fake-kubelet/node.initialization.tpl | 8 ++++---- deploy.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/fake-kubelet/node.initialization.tpl b/cmd/fake-kubelet/node.initialization.tpl index 5ff32b6..992bc32 100644 --- a/cmd/fake-kubelet/node.initialization.tpl +++ b/cmd/fake-kubelet/node.initialization.tpl @@ -1,31 +1,31 @@ {{ with .status }} +addresses: {{ with .addresses }} {{ . | YAML }} {{ else }} -addresses: - address: {{ NodeIP }} type: InternalIP {{ end }} +allocatable: {{ with .allocatable }} {{ . | YAML }} {{ else }} -allocatable: cpu: 1k memory: 1Ti pods: 1M {{ end }} +capacity: {{ with .capacity }} {{ . | YAML }} {{ else }} -capacity: cpu: 1k memory: 1Ti pods: 1M {{ end }} +daemonEndpoints: {{ with .daemonEndpoints }} {{ . | YAML }} {{ else }} -daemonEndpoints: kubeletEndpoint: Port: 0 {{ end }} diff --git a/deploy.yaml b/deploy.yaml index 1da5187..866f2ab 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -178,33 +178,33 @@ data: type: NetworkUnavailable node_initialization_template: |- {{ with .status }} + addresses: {{ with .addresses }} {{ . | YAML }} {{ else }} - addresses: - address: {{ NodeIP }} type: InternalIP {{ end }} + allocatable: {{ with .allocatable }} {{ . | YAML }} {{ else }} - allocatable: cpu: 1k memory: 1Ti pods: 1M {{ end }} + capacity: {{ with .capacity }} {{ . | YAML }} {{ else }} - capacity: cpu: 1k memory: 1Ti pods: 1M {{ end }} + daemonEndpoints: {{ with .daemonEndpoints }} {{ . | YAML }} {{ else }} - daemonEndpoints: kubeletEndpoint: Port: 0 {{ end }}