Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: shipwright-io/operator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f3f812ebc1b171461f61e5b8baea005534eb053e
Choose a base ref
..
head repository: shipwright-io/operator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d021388c5d77701c2c64913f9463f5f3bd12bbdf
Choose a head ref
4 changes: 2 additions & 2 deletions bundle/manifests/operator.shipwright.io_shipwrightbuilds.yaml
Original file line number Diff line number Diff line change
@@ -30,8 +30,8 @@ spec:
spec:
description: ShipwrightBuildSpec defines the configuration of a Shipwright Build deployment.
properties:
namespace:
description: Namespace is the target namespace where Shipwright's build controller will be deployed.
targetNamespace:
description: TargetNamespace is the target namespace where Shipwright's build controller will be deployed.
type: string
type: object
status:
4 changes: 2 additions & 2 deletions config/crd/bases/operator.shipwright.io_shipwrightbuilds.yaml
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@ spec:
description: ShipwrightBuildSpec defines the configuration of a Shipwright
Build deployment.
properties:
namespace:
description: Namespace is the target namespace where Shipwright's
targetNamespace:
description: TargetNamespace is the target namespace where Shipwright's
build controller will be deployed.
type: string
type: object
2 changes: 1 addition & 1 deletion controllers/default_test.go
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ var _ = g.Describe("Reconcile default ShipwrightBuild installation", func() {
Name: "cluster",
},
Spec: v1alpha1.ShipwrightBuildSpec{
Namespace: targetNamespace,
TargetNamespace: targetNamespace,
},
}
err = k8sClient.Create(ctx, build, &client.CreateOptions{})
2 changes: 1 addition & 1 deletion controllers/shipwrightbuild_controller.go
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ func (r *ShipwrightBuildReconciler) Reconcile(ctx context.Context, req ctrl.Requ

// selecting the target namespace based on the CRD information, when not informed using the
// default namespace instead
targetNamespace := b.Spec.Namespace
targetNamespace := b.Spec.TargetNamespace
if targetNamespace == "" {
logger.Info("Namespace is not informed, using default namespace instead")
targetNamespace = defaultTargetNamespace
8 changes: 4 additions & 4 deletions controllers/shipwrightbuild_controller_test.go
Original file line number Diff line number Diff line change
@@ -46,12 +46,12 @@ func bootstrapShipwrightBuildReconciler(

// creating targetNamespace on which Shipwright-Build will be deployed against, before the other
// tests takes place
if b.Spec.Namespace != "" {
t.Logf("Creating test namespace '%s'", b.Spec.Namespace)
if b.Spec.TargetNamespace != "" {
t.Logf("Creating test namespace '%s'", b.Spec.TargetNamespace)
t.Run("create-test-namespace", func(t *testing.T) {
err := c.Create(
context.TODO(),
&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: b.Spec.Namespace}},
&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: b.Spec.TargetNamespace}},
&client.CreateOptions{},
)
g.Expect(err).To(o.BeNil())
@@ -110,7 +110,7 @@ func testShipwrightBuildReconcilerReconcile(t *testing.T, targetNamespace string
Namespace: namespacedName.Namespace,
},
Spec: v1alpha1.ShipwrightBuildSpec{
Namespace: targetNamespace,
TargetNamespace: targetNamespace,
},
}
c, r := bootstrapShipwrightBuildReconciler(t, b)