mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-28 09:44:08 -04:00
cli: remove old migration steps and id-file references (#2440)
* Remove old migration steps and id-file references * Update codeowners file --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
9e1a0c06bf
commit
ab8a17e535
14 changed files with 95 additions and 581 deletions
|
@ -11,8 +11,6 @@ import (
|
|||
"fmt"
|
||||
|
||||
"dario.cat/mergo"
|
||||
"github.com/edgelesssys/constellation/v2/cli/internal/clusterid"
|
||||
"github.com/edgelesssys/constellation/v2/internal/config"
|
||||
"github.com/edgelesssys/constellation/v2/internal/file"
|
||||
)
|
||||
|
||||
|
@ -44,31 +42,6 @@ func New() *State {
|
|||
}
|
||||
}
|
||||
|
||||
// NewFromIDFile creates a new cluster state file from the given ID file and config.
|
||||
func NewFromIDFile(idFile clusterid.File, cfg *config.Config) *State {
|
||||
s := New().
|
||||
SetClusterValues(ClusterValues{
|
||||
OwnerID: idFile.OwnerID,
|
||||
ClusterID: idFile.ClusterID,
|
||||
MeasurementSalt: idFile.MeasurementSalt,
|
||||
}).
|
||||
SetInfrastructure(Infrastructure{
|
||||
UID: idFile.UID,
|
||||
ClusterEndpoint: idFile.IP,
|
||||
APIServerCertSANs: idFile.APIServerCertSANs,
|
||||
InitSecret: idFile.InitSecret,
|
||||
Name: clusterid.GetClusterName(cfg, idFile),
|
||||
})
|
||||
|
||||
if idFile.AttestationURL != "" {
|
||||
s.Infrastructure.Azure = &Azure{
|
||||
AttestationURL: idFile.AttestationURL,
|
||||
}
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
// SetInfrastructure sets the infrastructure state.
|
||||
func (s *State) SetInfrastructure(infrastructure Infrastructure) *State {
|
||||
s.Infrastructure = infrastructure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue