mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-07 06:22:17 -04:00
cli: annotate CoreDNS resources for Helm (#3236)
This commit is contained in:
parent
b872fbdfe8
commit
4fa9d85ea6
8 changed files with 81 additions and 0 deletions
|
@ -422,6 +422,9 @@ func (a *applyCmd) apply(
|
|||
|
||||
// Apply Helm Charts
|
||||
if !a.flags.skipPhases.contains(skipHelmPhase) {
|
||||
if err := a.applier.AnnotateCoreDNSResources(cmd.Context()); err != nil {
|
||||
return fmt.Errorf("annotating CoreDNS: %w", err)
|
||||
}
|
||||
if err := a.runHelmApply(cmd, conf, stateFile, upgradeDir); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -843,6 +846,7 @@ type applier interface {
|
|||
|
||||
// methods required to install/upgrade Helm charts
|
||||
|
||||
AnnotateCoreDNSResources(context.Context) error
|
||||
PrepareHelmCharts(
|
||||
flags helm.Options, state *state.State, serviceAccURI string, masterSecret uri.MasterSecret,
|
||||
) (helm.Applier, bool, error)
|
||||
|
|
|
@ -553,6 +553,7 @@ func (s *stubConstellApplier) Init(context.Context, atls.Validator, *state.State
|
|||
}
|
||||
|
||||
type helmApplier interface {
|
||||
AnnotateCoreDNSResources(context.Context) error
|
||||
PrepareHelmCharts(
|
||||
flags helm.Options, stateFile *state.State, serviceAccURI string, masterSecret uri.MasterSecret,
|
||||
) (
|
||||
|
|
|
@ -278,6 +278,10 @@ type stubHelmApplier struct {
|
|||
err error
|
||||
}
|
||||
|
||||
func (s stubHelmApplier) AnnotateCoreDNSResources(_ context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s stubHelmApplier) PrepareHelmCharts(
|
||||
_ helm.Options, _ *state.State, _ string, _ uri.MasterSecret,
|
||||
) (helm.Applier, bool, error) {
|
||||
|
|
|
@ -375,6 +375,10 @@ type mockApplier struct {
|
|||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *mockApplier) AnnotateCoreDNSResources(_ 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