You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return"Something went wrong during registration :sweat_smile:, I've notified the nais device team for you."
52
+
return"Something went wrong during registration :sweat_smile:, I've notified the nais device team for you. (1)"
43
53
} else {
44
-
return"Successfully registered :partyparrot:"
54
+
c, err:=s.database.ReadControlPlanePeer(serial)
55
+
iferr!=nil {
56
+
return"Something went wrong during registration :sweat_smile:, I've notified the nais device team for you. (2)"
57
+
}
58
+
59
+
ec:=EnrollmentConfig{
60
+
ClientIP: c.IP,
61
+
PublicKey: c.PublicKey,
62
+
Endpoint: s.controlPlaneEndpoint,
63
+
APIServerIP: "10.255.240.1",
64
+
}
65
+
66
+
b, err:=json.Marshal(&ec)
67
+
iferr!=nil {
68
+
return"Something went wrong during registration :sweat_smile:, I've notified the nais device team for you. (3)"
69
+
}
70
+
71
+
token:=base64.StdEncoding.EncodeToString(b)
72
+
returnfmt.Sprintf("Successfully registered :partyparrot:, copy and paste this command on your command line: `sudo tee /usr/local/etc/nais-device/enrollment.token <<< '%s'`", token)
0 commit comments