Skip to content

Commit

Permalink
Remove release namings while listing k8s resources to find dashboard …
Browse files Browse the repository at this point in the history
…deploy and svc

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
  • Loading branch information
buraksekili committed Oct 25, 2023
1 parent 5cdba0d commit 186be97
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions data/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ type AppArguments struct {
EnterprisePortalSecretName string
BootstrapPortal bool
DashboardDeploymentName string
ReleaseName string
}

var AppConfig = AppArguments{
Expand Down Expand Up @@ -71,7 +70,6 @@ func InitAppDataPostInstall() error {
AppConfig.TykAdminSecret = os.Getenv(constants.TykAdminSecretEnvVar)
AppConfig.CurrentOrgName = os.Getenv(constants.TykOrgNameEnvVar)
AppConfig.Cname = os.Getenv(constants.TykOrgCnameEnvVar)
AppConfig.ReleaseName = os.Getenv(constants.ReleaseNameEnvVar)

var err error

Expand Down Expand Up @@ -152,9 +150,6 @@ func discoverDashboardSvc() error {
ls := metav1.LabelSelector{MatchLabels: map[string]string{
constants.TykBootstrapLabel: constants.TykBootstrapDashboardSvcLabel,
}}
if AppConfig.ReleaseName != "" {
ls.MatchLabels[constants.TykBootstrapReleaseLabel] = AppConfig.ReleaseName
}

l := labels.Set(ls.MatchLabels).String()

Expand Down
4 changes: 0 additions & 4 deletions helpers/portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,6 @@ func RestartDashboard() error {
constants.TykBootstrapLabel: constants.TykBootstrapDashboardDeployLabel,
}}

if data.AppConfig.ReleaseName != "" {
ls.MatchLabels[constants.TykBootstrapReleaseLabel] = data.AppConfig.ReleaseName
}

deployments, err := clientset.
AppsV1().
Deployments(data.AppConfig.TykPodNamespace).
Expand Down

0 comments on commit 186be97

Please sign in to comment.