Skip to content

Commit

Permalink
Merge pull request moby#48703 from thaJeztah/daemon_remove_configsSup…
Browse files Browse the repository at this point in the history
…ported

daemon: remove configsSupported, secretsSupported utilities
  • Loading branch information
thaJeztah authored Oct 23, 2024
2 parents a136eba + 77f9792 commit 9369a39
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 52 deletions.
8 changes: 0 additions & 8 deletions daemon/configs.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
package daemon // import "github.com/docker/docker/daemon"

import (
"context"

"github.com/containerd/log"
swarmtypes "github.com/docker/docker/api/types/swarm"
)

// SetContainerConfigReferences sets the container config references needed
func (daemon *Daemon) SetContainerConfigReferences(name string, refs []*swarmtypes.ConfigReference) error {
if !configsSupported() && len(refs) > 0 {
log.G(context.TODO()).Warn("configs are not supported on this platform")
return nil
}

c, err := daemon.GetContainer(name)
if err != nil {
return err
Expand Down
5 changes: 0 additions & 5 deletions daemon/configs_linux.go

This file was deleted.

7 changes: 0 additions & 7 deletions daemon/configs_unsupported.go

This file was deleted.

5 changes: 0 additions & 5 deletions daemon/configs_windows.go

This file was deleted.

10 changes: 0 additions & 10 deletions daemon/secrets.go
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
package daemon // import "github.com/docker/docker/daemon"

import (
"context"

"github.com/containerd/log"
swarmtypes "github.com/docker/docker/api/types/swarm"
)

// SetContainerSecretReferences sets the container secret references needed
func (daemon *Daemon) SetContainerSecretReferences(name string, refs []*swarmtypes.SecretReference) error {
if !secretsSupported() && len(refs) > 0 {
log.G(context.TODO()).Warn("secrets are not supported on this platform")
return nil
}

c, err := daemon.GetContainer(name)
if err != nil {
return err
}

c.SecretReferences = refs

return nil
}
5 changes: 0 additions & 5 deletions daemon/secrets_linux.go

This file was deleted.

7 changes: 0 additions & 7 deletions daemon/secrets_unsupported.go

This file was deleted.

5 changes: 0 additions & 5 deletions daemon/secrets_windows.go

This file was deleted.

0 comments on commit 9369a39

Please sign in to comment.