feat: setup cluster trigger authentication objects
This commit is contained in:
1 parent
6b74cd1d6b
commit
7c58bbf792
7 files changed
+151
-27
No files matched your search
@@ -75,6 +75,19 @@ func CommandAutoscalingAuthSet(appName string, trigger string, metadata map[stri
|
||||
return fmt.Errorf("Unable to delete property: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
if appName == "--global" {
|
||||
helmAgent, err := NewHelmAgent("keda", DeployLogPrinter)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to create helm agent: %w", err)
|
||||
}
|
||||
|
||||
releaseName := fmt.Sprintf("keda-cluster-trigger-authentications-%s", trigger)
|
||||
if err := helmAgent.UninstallChart(releaseName); err != nil {
|
||||
return fmt.Errorf("Unable to uninstall chart: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -83,6 +96,14 @@ func CommandAutoscalingAuthSet(appName string, trigger string, metadata map[stri
|
||||
return fmt.Errorf("Unable to set property: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
if appName == "--global" {
|
||||
err := applyKedaClusterTriggerAuthentications(context.Background(), trigger, metadata)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to install chart: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user