Skip to content

Commit

Permalink
Fix install into non-default namespace (#515)
Browse files Browse the repository at this point in the history
* Fixed a bug when using `kudo install --namespace xxx` was not respected. It was not possible to install into non-default namespace
  • Loading branch information
alenkacz authored and kensipe committed Jul 8, 2019
1 parent 0785f61 commit 73e29ce
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
8 changes: 3 additions & 5 deletions pkg/kudoctl/bundle/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ func (p *PackageFiles) getCRDs() (*PackageCRDs, error) {
APIVersion: apiVersion,
},
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("%s-%s", p.Operator.Name, p.Operator.Version),
Namespace: "default",
Labels: map[string]string{"controller-tools.k8s.io": "1.0"},
Name: fmt.Sprintf("%s-%s", p.Operator.Name, p.Operator.Version),
Labels: map[string]string{"controller-tools.k8s.io": "1.0"},
},
Spec: v1alpha1.OperatorVersionSpec{
Operator: v1.ObjectReference{
Expand Down Expand Up @@ -165,8 +164,7 @@ func (p *PackageFiles) getCRDs() (*PackageCRDs, error) {
},
Spec: v1alpha1.InstanceSpec{
OperatorVersion: v1.ObjectReference{
Name: fmt.Sprintf("%s-%s", p.Operator.Name, p.Operator.Version),
Namespace: "default",
Name: fmt.Sprintf("%s-%s", p.Operator.Name, p.Operator.Version),
},
},
Status: v1alpha1.InstanceStatus{},
Expand Down
1 change: 0 additions & 1 deletion pkg/kudoctl/bundle/testdata/zk-crd-golden1/instance.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ metadata:
spec:
operatorVersion:
name: zookeeper-0.1.0
namespace: default
type: OperatorVersions
name: "zookeeper-0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
labels:
controller-tools.k8s.io: "1.0"
name: zookeeper-0.1.0
namespace: default
spec:
operator:
name: zookeeper
Expand Down
1 change: 0 additions & 1 deletion pkg/kudoctl/bundle/testdata/zk-crd-golden2/instance.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ metadata:
spec:
operatorVersion:
name: zookeeper-0.1.0
namespace: default
type: OperatorVersions
name: "zookeeper-0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
labels:
controller-tools.k8s.io: "1.0"
name: zookeeper-0.1.0
namespace: default
spec:
operator:
name: zookeeper
Expand Down

0 comments on commit 73e29ce

Please sign in to comment.