mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-11 16:30:12 -04:00
cli: enable constellation apply
to create new clusters (#2549)
* Allow creation of Constellation clusters using `apply` command * Add auto-completion for `--skip-phases` flag * Deprecate create command * Replace all doc references to create command with apply --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
82b68df92a
commit
4c8ce55e5a
28 changed files with 989 additions and 636 deletions
|
@ -20,9 +20,7 @@ import (
|
|||
|
||||
"dario.cat/mergo"
|
||||
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
||||
"github.com/edgelesssys/constellation/v2/internal/constants"
|
||||
"github.com/edgelesssys/constellation/v2/internal/file"
|
||||
"github.com/edgelesssys/constellation/v2/internal/semver"
|
||||
"github.com/edgelesssys/constellation/v2/internal/validation"
|
||||
)
|
||||
|
||||
|
@ -557,24 +555,6 @@ func (s *State) Constraints() []*validation.Constraint {
|
|||
return []*validation.Constraint{}
|
||||
}
|
||||
|
||||
// Migrate migrates the state to the current version.
|
||||
// This is mostly done to pass the validation of the current version.
|
||||
// The infrastructure will be overwritten by the terraform outputs after the validation.
|
||||
func (s *State) Migrate() error {
|
||||
// In v2.13.0 the ClusterEndpoint and InClusterEndpoint fields were added.
|
||||
// So they are expected to be empty when upgrading to this version.
|
||||
// TODO(3u13r): Remove on main after v2.13.0 is released.
|
||||
if constants.BinaryVersion().MajorMinorEqual(semver.NewFromInt(2, 13, 0, "")) {
|
||||
if s.Infrastructure.InClusterEndpoint == "" {
|
||||
s.Infrastructure.InClusterEndpoint = s.Infrastructure.ClusterEndpoint
|
||||
}
|
||||
if s.Infrastructure.IPCidrNode == "" {
|
||||
s.Infrastructure.IPCidrNode = "192.168.2.1/32"
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// HexBytes is a byte slice that is marshalled to and from a hex string.
|
||||
type HexBytes []byte
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue