mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
constellation-lib: fix incorrect encoding and ordering of Init response (#2708)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
0512cfccd7
commit
d08e75bf9c
@ -8,6 +8,7 @@ package constellation
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
@ -121,17 +122,17 @@ func (a *Applier) Init(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return InitOutput{
|
return InitOutput{
|
||||||
ClusterID: string(doer.resp.OwnerId),
|
ClusterID: hex.EncodeToString(doer.resp.ClusterId),
|
||||||
OwnerID: string(doer.resp.ClusterId),
|
OwnerID: hex.EncodeToString(doer.resp.OwnerId),
|
||||||
Kubeconfig: kubeconfigBytes,
|
Kubeconfig: kubeconfigBytes,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// InitOutput contains the output of the init RPC.
|
// InitOutput contains the output of the init RPC.
|
||||||
type InitOutput struct {
|
type InitOutput struct {
|
||||||
// ClusterID is the ID of the cluster.
|
// ClusterID is the hex encoded ID of the cluster.
|
||||||
ClusterID string
|
ClusterID string
|
||||||
// OwnerID is the ID of the owner of the cluster.
|
// OwnerID is the hex encoded ID of the owner of the cluster.
|
||||||
OwnerID string
|
OwnerID string
|
||||||
// Kubeconfig is the kubeconfig for the cluster.
|
// Kubeconfig is the kubeconfig for the cluster.
|
||||||
Kubeconfig []byte
|
Kubeconfig []byte
|
||||||
|
Loading…
Reference in New Issue
Block a user