mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 14:26:23 -04:00
helm: fix kubeadm bugs caused by CoreDNS installation (#3353)
* helm: rename CoreDNS configmap * upgrade-agent: ignore CoreDNS preflight errors * fixup! helm: rename CoreDNS configmap
This commit is contained in:
parent
e077eaf02c
commit
8ef5ea2efe
10 changed files with 77 additions and 10 deletions
|
@ -428,6 +428,9 @@ func (a *applyCmd) apply(
|
|||
if err := a.runHelmApply(cmd, conf, stateFile, upgradeDir); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := a.applier.CleanupCoreDNSResources(cmd.Context()); err != nil {
|
||||
return fmt.Errorf("cleaning up CoreDNS: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Upgrade node image
|
||||
|
@ -847,6 +850,7 @@ type applier interface {
|
|||
// methods required to install/upgrade Helm charts
|
||||
|
||||
AnnotateCoreDNSResources(context.Context) error
|
||||
CleanupCoreDNSResources(context.Context) error
|
||||
PrepareHelmCharts(
|
||||
flags helm.Options, state *state.State, serviceAccURI string, masterSecret uri.MasterSecret,
|
||||
) (helm.Applier, bool, error)
|
||||
|
|
|
@ -554,6 +554,7 @@ func (s *stubConstellApplier) Init(context.Context, atls.Validator, *state.State
|
|||
|
||||
type helmApplier interface {
|
||||
AnnotateCoreDNSResources(context.Context) error
|
||||
CleanupCoreDNSResources(ctx context.Context) error
|
||||
PrepareHelmCharts(
|
||||
flags helm.Options, stateFile *state.State, serviceAccURI string, masterSecret uri.MasterSecret,
|
||||
) (
|
||||
|
|
|
@ -282,6 +282,10 @@ func (s stubHelmApplier) AnnotateCoreDNSResources(_ context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s stubHelmApplier) CleanupCoreDNSResources(_ context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s stubHelmApplier) PrepareHelmCharts(
|
||||
_ helm.Options, _ *state.State, _ string, _ uri.MasterSecret,
|
||||
) (helm.Applier, bool, error) {
|
||||
|
|
|
@ -379,6 +379,10 @@ func (m *mockApplier) AnnotateCoreDNSResources(_ context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *mockApplier) CleanupCoreDNSResources(_ context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *mockApplier) PrepareHelmCharts(
|
||||
helmOpts helm.Options, stateFile *state.State, str string, masterSecret uri.MasterSecret,
|
||||
) (helm.Applier, bool, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue