Skip to content

Commit

Permalink
Merge pull request #20 from TykTechnologies/fix/fix-bootstrapping-com…
Browse files Browse the repository at this point in the history
…ponent-charts

(fix): bootstrapping in component charts
  • Loading branch information
buraksekili committed Oct 25, 2023
2 parents 7f6d42c + 186be97 commit 76b329a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ const (
DashboardEnabledEnvVar = "DASHBOARD_ENABLED"
TykOrgNameEnvVar = "TYK_ORG_NAME"
TykOrgCnameEnvVar = "TYK_ORG_CNAME"
ReleaseNameEnvVar = "RELEASE_NAME"

TykBootstrapLabel = "tyk.tyk.io/k8s-bootstrap"
TykBootstrapPreDeleteLabel = "tyk-k8s-bootstrap-pre-delete"
TykBootstrapDashboardDeployLabel = "tyk-dashboard"
TykBootstrapDashboardSvcLabel = "tyk-dashboard"
TykBootstrapReleaseLabel = "release"
)
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 76b329a

Please sign in to comment.