Skip to content

Commit

Permalink
Merge pull request #143 from barney-s/fix_build
Browse files Browse the repository at this point in the history
Fix build error
  • Loading branch information
k8s-ci-robot committed Feb 6, 2020
2 parents f3155ce + 76b0bb9 commit 97cb4c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
12 changes: 6 additions & 6 deletions controllers/application_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ var _ = Describe("Application Reconciler", func() {
})

It("should update the application status, as well as the components' ownerReference", func() {
application := &appv1beta1.Application {
application := &appv1beta1.Application{
ObjectMeta: metav1.ObjectMeta{
Name: "application-01",
Name: "application-01",
Namespace: metav1.NamespaceDefault,
Labels: labelSet1,
Labels: labelSet1,
},
Spec: appv1beta1.ApplicationSpec{
Selector: &metav1.LabelSelector{MatchLabels: labelSet1},
Expand Down Expand Up @@ -306,7 +306,7 @@ var _ = Describe("Application Reconciler", func() {
})

func fetchUpdatedDeployment(ctx context.Context, deployment *apps.Deployment) {
key := types.NamespacedName {
key := types.NamespacedName{
Name: deployment.Name,
Namespace: deployment.Namespace,
}
Expand All @@ -315,7 +315,7 @@ func fetchUpdatedDeployment(ctx context.Context, deployment *apps.Deployment) {
}

func fetchUpdatedService(ctx context.Context, service *core.Service) {
key := types.NamespacedName {
key := types.NamespacedName{
Name: service.Name,
Namespace: service.Namespace,
}
Expand All @@ -324,7 +324,7 @@ func fetchUpdatedService(ctx context.Context, service *core.Service) {
}

func waitForComponentsAddedToStatus(ctx context.Context, app *appv1beta1.Application, expectedNames ...string) {
key := types.NamespacedName {
key := types.NamespacedName{
Name: app.Name,
Namespace: app.Namespace,
}
Expand Down
26 changes: 8 additions & 18 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,14 @@ func main() {
}))

syncPeriod := 2 * time.Minute
if namespace == "" {
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
LeaderElection: enableLeaderElection,
Port: 9443,
SyncPeriod: &syncPeriod,
})
} else {
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
LeaderElection: enableLeaderElection,
Port: 9443,
SyncPeriod: &syncPeriod,
Namespace: namespace,
})
}
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
LeaderElection: enableLeaderElection,
Port: 9443,
SyncPeriod: &syncPeriod,
Namespace: namespace,
})
if err != nil {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
Expand Down

0 comments on commit 97cb4c8

Please sign in to comment.