Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snap)!: Remove secrets-config proxy snap options #4511

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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