This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed
Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ var DestroyApplication = &cobra.Command{
5656 return err
5757 }
5858
59+ // Run destroy scripts from DNS plugins
60+ for _ , module := range system .Context .DNSModules {
61+ if module .GetConfig ().Type != "dns" {
62+ continue
63+ }
64+ moduleSettings := system .GetModuleSettings (module .GetConfig ().Name )
65+ if err := module .(system.DNSModule ).Destroy (moduleSettings ); err != nil {
66+ return err
67+ }
68+ }
69+
5970 return nil
6071 },
6172 })
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ var SetupServer = &cobra.Command{
261261 modules := system .Context .GetModulesInOrder ()
262262 event .MustFire ("setup.modules.pre-install" , event.M {"modules" : modules })
263263 for _ , module := range modules {
264- if module .GetConfig ().Type == "plugin" {
264+ if module .GetConfig ().Type == "plugin" || module . GetConfig (). Type == "dns" {
265265 continue
266266 }
267267 event .MustFire (
Original file line number Diff line number Diff line change @@ -24,10 +24,15 @@ type DomainSecurity struct {
2424 Authentication []DomainSecurityAuthentication `yaml:"authentication,omitempty"`
2525}
2626
27+ type DNSSettings struct {
28+ Provider string
29+ }
30+
2731type Domains struct {
2832 Domain string
2933 Expose []DomainExpose
3034 Security DomainSecurity `yaml:"security,omitempty"`
35+ DNS DNSSettings `yaml:"dns,omitempty"`
3136}
3237
3338type Registries struct {
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ type Module interface {
4646 GetConfig () ModuleConfig
4747 GetTemplates () * embed.FS
4848}
49+ type DNSModule interface {
50+ Destroy (moduleSettings interface {}) error
51+ }
4952
5053type PluginModule interface {
5154 Init (moduleSettings interface {})
You can’t perform that action at this time.
0 commit comments