Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
adapted namespaces for shoot cluster (gardener/issues/164)
Browse files Browse the repository at this point in the history
  • Loading branch information
DockToFuture committed Jun 8, 2018
1 parent 0ddfa02 commit b21b4bd
Show file tree
Hide file tree
Showing 310 changed files with 6,116 additions and 5,508 deletions.
14 changes: 7 additions & 7 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.10.1"
version = "kubernetes-1.10.3"

[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.10.1"
version = "kubernetes-1.10.3"

[[constraint]]
name = "github.com/gardener/gardener"
version = "^0.3.1"
version = "^0.5.1"
3 changes: 1 addition & 2 deletions cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"fmt"
"io/ioutil"
"os"
"strings"

clientset "github.com/gardener/gardener/pkg/client/garden/clientset/versioned"
"github.com/gardener/gardener/pkg/client/kubernetes"
Expand Down Expand Up @@ -81,7 +80,7 @@ func downloadTerraformFiles(option string) {
break
}
}
namespace = strings.Replace("shoot-"+shootList.Items[ind].Namespace+"-"+target.Target[2].Name, "-garden", "", 1)
namespace = shootList.Items[ind].Status.TechnicalID
fmt.Println(namespace)
seed, err := k8sGardenClient.GardenClientset().GardenV1beta1().Seeds().Get(*shootList.Items[ind].Spec.Cloud.Seed, metav1.GetOptions{})
checkError(err)
Expand Down
4 changes: 2 additions & 2 deletions cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ func getShoot(name string) {
for index, shoot := range shootList.Items {
if (name == "") && (shoot.Name == target.Target[2].Name) && (shoot.Namespace == target.Target[1].Name || *shoot.Spec.Cloud.Seed == target.Target[1].Name) {
ind = index
namespace = strings.Replace("shoot-"+shootList.Items[ind].Namespace+"-"+target.Target[2].Name, "-garden", "", 1)
namespace = shootList.Items[ind].Status.TechnicalID
break
}
if (name != "") && (shoot.Name == name) && (shoot.Namespace == target.Target[1].Name || *shoot.Spec.Cloud.Seed == target.Target[1].Name) {
ind = index
namespace = strings.Replace("shoot-"+shootList.Items[ind].Namespace+"-"+name, "-garden", "", 1)
namespace = shootList.Items[ind].Status.TechnicalID
break
}
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/miscellaneous.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ func getSeedNamespaceNameForShoot(shootName string) (namespaceSeed string) {
break
}
}
return strings.Replace("shoot-"+shootList.Items[ind].Namespace+"-"+shootName, "-garden", "", 1)
return shootList.Items[ind].Status.TechnicalID

}

// returns projectName for Shoot
Expand Down
3 changes: 2 additions & 1 deletion cmd/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ func targetShoot(name string) {
err = ioutil.WriteFile(pathSeed+"/kubeconfig.yaml", kubeSecret.Data["kubeconfig"], 0644)
checkError(err)
KUBECONFIG = pathSeed + "/kubeconfig.yaml"
namespace := strings.Replace("shoot-"+matchedShoots[0].Namespace+"-"+matchedShoots[0].Name, "-garden", "", 1)
namespace := matchedShoots[0].Status.TechnicalID

Client, err = clientToTarget("seed")
checkError(err)
kubeSecret, err = Client.CoreV1().Secrets(namespace).Get("kubecfg", metav1.GetOptions{})
Expand Down
31 changes: 26 additions & 5 deletions vendor/github.com/gardener/gardener/.ci/integration-test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b21b4bd

Please sign in to comment.