fix: pull pass from env var

This commit is contained in:
Jose Diaz-Gonzalez committed 2024-01-23 03:00:27 -05:00
1 parent 27b82f77a3
commit 4650585ded
2 files changed
+4 -3

No files matched your search

+3 -1
View File
@@ -79,11 +79,13 @@ func TriggerPostDelete(appName string) error {
// TriggerPostRegistryLogin updates the `/etc/rancher/k3s/registries.yaml` to include
// auth information for the registry. Note that if the file does not exist, it won't be updated.
func TriggerPostRegistryLogin(server string, username string, password string) error {
func TriggerPostRegistryLogin(server string, username string) error {
if !common.FileExists("/usr/local/bin/k3s") {
return nil
}
password := os.Getenv("DOCKER_REGISTRY_PASS")
registry := registries.Registry{}
yamlFile, err := os.ReadFile(RegistryConfigPath)
if err != nil {