chore: stub out post-registry-login

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-12 02:39:51 -05:00
parent ec538ce1c5
commit 65d840e4bc
3 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
SUBCOMMANDS = subcommands/initialize subcommands/report subcommands/set
TRIGGERS = triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/report
TRIGGERS = triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/post-registry-login triggers/report
BUILD = commands subcommands triggers
PLUGIN_NAME = scheduler-k3s

View File

@@ -32,6 +32,11 @@ func main() {
case "post-delete":
appName := flag.Arg(0)
err = scheduler_k3s.TriggerPostDelete(appName)
case "post-registry-login":
server := flag.Arg(0)
username := flag.Arg(1)
password := flag.Arg(2)
err = scheduler_k3s.TriggerPostRegistryLogin(server, username, password)
case "report":
appName := flag.Arg(0)
err = scheduler_k3s.ReportSingleApp(appName, "", "")

View File

@@ -49,3 +49,11 @@ func TriggerPostDelete(appName string) error {
return propertyErr
}
// TriggerPostRegistryLogin updates the `/etc/rancher/k3s/registries.yaml` to include
// auth information for the registry
func TriggerPostRegistryLogin(server string, username string, password string) error {
// todo: setup auth
// todo: auth against all nodes in cluster
return nil
}