mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-27 14:37:17 +00:00
Refactor Openshift detection
This commit is contained in:
@@ -36,7 +36,7 @@ func startReloader(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
|
||||
// create the clientset
|
||||
clientset, err := kube.GetClient()
|
||||
clientset, err := kube.GetKubernetesClient()
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func TestMain(m *testing.M) {
|
||||
// Perform rolling upgrade on deploymentConfig and create env var upon updating the configmap
|
||||
func TestControllerUpdatingConfigmapShouldCreateEnvInDeploymentConfig(t *testing.T) {
|
||||
// Don't run test on non-openshift environment
|
||||
if !clients.IsOpenshift {
|
||||
if !kube.IsOpenshift {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ func doRollingUpgrade(config util.Config) {
|
||||
rollingUpgrade(clients, config, GetDaemonSetRollingUpgradeFuncs())
|
||||
rollingUpgrade(clients, config, GetStatefulSetRollingUpgradeFuncs())
|
||||
|
||||
if clients.IsOpenshift {
|
||||
if kube.IsOpenshift {
|
||||
rollingUpgrade(clients, config, GetDeploymentConfigRollingUpgradeFuncs())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user