Skip to content

Commit bc84ed2

Browse files
committed
Add version to bootstrap token description
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 6346dbb commit bc84ed2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func main() {
3636

3737
manager := manager.KubeBootstrapTokenManager{
3838
Opts: opts,
39+
Version: gitTag,
3940
}
4041

4142
manager.Init()

manager/manager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
type (
2525
KubeBootstrapTokenManager struct {
2626
Opts config.Opts
27+
Version string
2728

2829
ctx context.Context
2930
k8sClient *kubernetes.Clientset
@@ -256,7 +257,7 @@ func (m *KubeBootstrapTokenManager) updateTokenData(resource *corev1.Secret, tok
256257
resource.StringData = map[string]string{}
257258
}
258259

259-
resource.StringData["description"] = "desc"
260+
resource.StringData["description"] = fmt.Sprintf("Token maintained by kube-bootstrap-token-manager/%s", m.Version)
260261
resource.StringData["token-id"] = token.Id()
261262
resource.StringData["token-secret"] = token.Secret()
262263
if token.ExpirationTime() != nil {

0 commit comments

Comments
 (0)