Skip to content

Commit

Permalink
operator: pass all the registration fields on unauthenticated query
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
  • Loading branch information
fgiudici committed Aug 1, 2022
1 parent 846d313 commit 5f07c44
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/server/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,17 @@ func (i *InventoryServer) ServeHTTP(resp http.ResponseWriter, req *http.Request)
}

func (i *InventoryServer) unauthenticatedResponse(machineRegistration *elm.MachineRegistration, writer io.Writer) error {
mRRegistration := machineRegistration.Spec.Config.Elemental.Registration

return yaml.NewEncoder(writer).Encode(config.Config{
Elemental: config.Elemental{
Registration: config.Registration{
URL: machineRegistration.Status.RegistrationURL,
CACert: i.getRancherCACert(),
URL: machineRegistration.Status.RegistrationURL,
CACert: i.getRancherCACert(),
EmulateTPM: mRRegistration.EmulateTPM,
EmulatedTPMSeed: mRRegistration.EmulatedTPMSeed,
NoSMBIOS: mRRegistration.NoSMBIOS,
Labels: mRRegistration.Labels,
},
},
})
Expand Down

0 comments on commit 5f07c44

Please sign in to comment.