Skip to content

Commit

Permalink
Merge pull request #416 from HANXP-1/hanxp
Browse files Browse the repository at this point in the history
 add  the version information of the node to kwok{{ Version }}
  • Loading branch information
k8s-ci-robot committed Mar 27, 2023
2 parents 7ce3d5b + f2c523d commit c491052
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pkg/kwok/controllers/controller.go
Expand Up @@ -32,6 +32,7 @@ import (
"sigs.k8s.io/yaml"

"sigs.k8s.io/kwok/pkg/apis/internalversion"
"sigs.k8s.io/kwok/pkg/consts"
)

var (
Expand All @@ -57,6 +58,9 @@ var (
}
return data, nil
},
"Version": func() string {
return consts.Version
},
}
)

Expand Down
8 changes: 4 additions & 4 deletions stages/node-fast.yaml
Expand Up @@ -66,10 +66,10 @@ spec:
nodeInfo:
architecture: {{ with .architecture }} {{ . }} {{ else }} "amd64" {{ end }}
bootID: {{ with .bootID }} {{ . }} {{ else }} "" {{ end }}
containerRuntimeVersion: {{ with .containerRuntimeVersion }} {{ . }} {{ else }} "" {{ end }}
kernelVersion: {{ with .kernelVersion }} {{ . }} {{ else }} "" {{ end }}
kubeProxyVersion: {{ with .kubeProxyVersion }} {{ . }} {{ else }} "fake" {{ end }}
kubeletVersion: {{ with .kubeletVersion }} {{ . }} {{ else }} "fake" {{ end }}
containerRuntimeVersion: {{ with .containerRuntimeVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }}
kernelVersion: {{ with .kernelVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }}
kubeProxyVersion: {{ with .kubeProxyVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }}
kubeletVersion: {{ with .kubeletVersion }} {{ . }} {{ else }} "kwok-{{ Version }}" {{ end }}
machineID: {{ with .machineID }} {{ . }} {{ else }} "" {{ end }}
operatingSystem: {{ with .operatingSystem }} {{ . }} {{ else }} "linux" {{ end }}
osImage: {{ with .osImage }} {{ . }} {{ else }} "" {{ end }}
Expand Down

0 comments on commit c491052

Please sign in to comment.