mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-17 13:40:22 -04:00
rewrote packages
keyservice joinservice upgrade-agent measurement-reader debugd disk-mapper rewrote joinservice main rewrote some unit tests rewrote upgrade-agent + some grpc functions rewrote measurement-reader rewrote debugd removed unused import removed forgotten zap reference in measurements reader rewrote disk-mapper + tests rewrote packages verify disk-mapper malicious join bootstrapper attestationconfigapi versionapi internal/cloud/azure disk-mapper tests image/upload/internal/cmd rewrote verify (WIP with loglevel increase) rewrote forgotten zap references in disk-mapper rewrote malicious join rewrote bootstrapper rewrote parts of internal/ rewrote attestationconfigapi (WIP) rewrote versionapi cli rewrote internal/cloud/azure rewrote disk-mapper tests (untested by me rn) rewrote image/upload/internal/cmd removed forgotten zap references in verify/cmd rewrote packages hack/oci-pin hack/qemu-metadata-api debugd/internal/debugd/deploy hack/bazel-deps-mirror cli/internal/cmd cli-k8s-compatibility rewrote hack/qemu-metadata-api/server rewrote debugd/internal/debugd/deploy rewrote hack/bazel-deps-mirror rewrote rest of hack/qemu-metadata-api rewrote forgotten zap references in joinservice server rewrote cli/internal/cmd rewrote cli-k8s-compatibility rewrote packages internal/staticupload e2d/internal/upgrade internal/constellation/helm internal/attestation/aws/snp internal/attestation/azure/trustedlaunch joinservice/internal/certcache/amkds some missed unit tests rewrote e2e/internal/upgrade rewrote internal/constellation/helm internal/attestation/aws/snp internal/attestation/azure/trustedlaunch joinservice/internal/certcache/amkds search and replace test logging over all left *_test.go
This commit is contained in:
parent
48d5a157dd
commit
f16ccf5679
158 changed files with 3400 additions and 1278 deletions
|
@ -23,7 +23,7 @@ import (
|
|||
|
||||
// runTerraformApply checks if changes to Terraform are required and applies them.
|
||||
func (a *applyCmd) runTerraformApply(cmd *cobra.Command, conf *config.Config, stateFile *state.State, upgradeDir string) error {
|
||||
a.log.Debugf("Checking if Terraform migrations are required")
|
||||
a.log.Debug("Checking if Terraform migrations are required")
|
||||
terraformClient, removeClient, err := a.newInfraApplier(cmd.Context())
|
||||
if err != nil {
|
||||
return fmt.Errorf("creating Terraform client: %w", err)
|
||||
|
@ -39,18 +39,18 @@ func (a *applyCmd) runTerraformApply(cmd *cobra.Command, conf *config.Config, st
|
|||
if changesRequired, err := a.planTerraformChanges(cmd, conf, terraformClient); err != nil {
|
||||
return fmt.Errorf("planning Terraform migrations: %w", err)
|
||||
} else if !changesRequired {
|
||||
a.log.Debugf("No changes to infrastructure required, skipping Terraform migrations")
|
||||
a.log.Debug("No changes to infrastructure required, skipping Terraform migrations")
|
||||
return nil
|
||||
}
|
||||
|
||||
a.log.Debugf("Apply new Terraform resources for infrastructure changes")
|
||||
a.log.Debug("Apply new Terraform resources for infrastructure changes")
|
||||
newInfraState, err := a.applyTerraformChanges(cmd, conf, terraformClient, upgradeDir, isNewCluster)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Merge the original state with the new infrastructure values
|
||||
a.log.Debugf("Updating state file with new infrastructure state")
|
||||
a.log.Debug("Updating state file with new infrastructure state")
|
||||
if _, err := stateFile.Merge(
|
||||
// temporary state with new infrastructure values
|
||||
state.New().SetInfrastructure(newInfraState),
|
||||
|
@ -68,7 +68,7 @@ func (a *applyCmd) runTerraformApply(cmd *cobra.Command, conf *config.Config, st
|
|||
// planTerraformChanges checks if any changes to the Terraform state are required.
|
||||
// If no state exists, this function will return true and the caller should create a new state.
|
||||
func (a *applyCmd) planTerraformChanges(cmd *cobra.Command, conf *config.Config, terraformClient cloudApplier) (bool, error) {
|
||||
a.log.Debugf("Planning Terraform changes")
|
||||
a.log.Debug("Planning Terraform changes")
|
||||
|
||||
// Check if there are any Terraform changes to apply
|
||||
|
||||
|
@ -76,7 +76,7 @@ func (a *applyCmd) planTerraformChanges(cmd *cobra.Command, conf *config.Config,
|
|||
//
|
||||
// var manualMigrations []terraform.StateMigration
|
||||
// for _, migration := range manualMigrations {
|
||||
// u.log.Debugf("Adding manual Terraform migration: %s", migration.DisplayName)
|
||||
// u.log.Debug("Adding manual Terraform migration: %s", migration.DisplayName)
|
||||
// u.infraApplier.AddManualStateMigration(migration)
|
||||
// }
|
||||
|
||||
|
@ -146,7 +146,7 @@ func (a *applyCmd) applyTerraformChangesWithMessage(
|
|||
return state.Infrastructure{}, errors.New(abortErrorMsg)
|
||||
}
|
||||
}
|
||||
a.log.Debugf("Applying Terraform changes")
|
||||
a.log.Debug("Applying Terraform changes")
|
||||
|
||||
a.spinner.Start(progressMsg, false)
|
||||
infraState, err := terraformClient.Apply(cmd.Context(), csp, attestation, rollbackBehavior)
|
||||
|
@ -186,7 +186,7 @@ func printCreateInfo(out io.Writer, conf *config.Config, log debugLog) error {
|
|||
}
|
||||
}
|
||||
if len(otherGroupNames) > 0 {
|
||||
log.Debugf("Creating %d additional node groups: %v", len(otherGroupNames), otherGroupNames)
|
||||
log.Debug("Creating %d additional node groups: %v", len(otherGroupNames), otherGroupNames)
|
||||
}
|
||||
|
||||
fmt.Fprintf(out, "The following Constellation cluster will be created:\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue