Skip to content

Commit

Permalink
feat(snap)!: Remove secrets-config proxy snap options (#4511)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removing the support for the apps.secrets-config.proxy.* snap options

Signed-off-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
  • Loading branch information
farshidtz committed Apr 14, 2023
1 parent 3d8bdbb commit cc94d1f
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 67 deletions.
2 changes: 0 additions & 2 deletions snap/local/helper-go/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ const (
securityBootstrapperConsul = "security-consul-bootstrapper"
securityBootstrapperNginx = "security-bootstrapper-nginx"
securityFileTokenProvider = "security-file-token-provider"
secretsConfig = "secrets-config"
vault = "vault"
secretsConfigProcessor = "secrets-config-processor"
)

var (
Expand Down
10 changes: 0 additions & 10 deletions snap/local/helper-go/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,5 @@ func configure() {
log.Fatalf("Error unsetting snap option: %v", err)
}

if v, err := snapctl.Get("apps.secrets-config").Run(); err != nil {
log.Fatalf("Error reading snap option: %v", err)
} else if v != "" {
// Schedule the startup of the oneshot service to apply secrets config options
// once the depended services are ready (see snapcraft.yaml: apps.secrets-config-processor.after)
if err := snapctl.Start(snapService(secretsConfigProcessor)).Run(); err != nil {
log.Fatalf("Error starting service: %s", err)
}
}

log.Debug("End")
}
2 changes: 0 additions & 2 deletions snap/local/helper-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ func main() {
install()
case "configure": // snap configure hook
configure()
case "options": // apply snap options to apps
options()
default:
panic("Unknown subcommand: " + subCommand)
}
Expand Down
44 changes: 0 additions & 44 deletions snap/local/helper-go/options.go

This file was deleted.

9 changes: 0 additions & 9 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,6 @@ apps:
install-mode: disable
plugs: [network, network-bind]
stop-timeout: 10s
# this service should be started for processing secrets-config snap options and executing corresponding commands
secrets-config-processor:
after:
- vault
command: bin/helper-go options --app secrets-config
daemon: oneshot
install-mode: disable
start-timeout: 1m
plugs: [network]
# this service pushes common configuration source into Configuration Provider
core-common-config-bootstrapper:
after:
Expand Down

0 comments on commit cc94d1f

Please sign in to comment.