Skip to content

Commit

Permalink
Add kubeconfig file path log to kind provisioner
Browse files Browse the repository at this point in the history
Signed-off-by: Per G. da Silva <perdasilva@redhat.com>
  • Loading branch information
perdasilva committed Dec 13, 2021
1 parent e02d21a commit 41070eb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deploy/chart/crds/0000_50_olm_00-catalogsources.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,4 @@ spec:
served: true
storage: true
subresources:
status: {}
status: {}
24 changes: 23 additions & 1 deletion pkg/controller/registry/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ func TestPodSchedulingOverrides(t *testing.T) {
expectedNodeSelectors map[string]string
expectedTolerations []corev1.Toleration
expectedPriorityClassName string
annotations map[string]string
}{
{
title: "no overrides",
Expand Down Expand Up @@ -238,11 +239,32 @@ func TestPodSchedulingOverrides(t *testing.T) {
expectedTolerations: overriddenTolerations,
expectedPriorityClassName: overriddenPriorityClassName,
expectedNodeSelectors: overriddenNodeSelectors,
}, {
title: "priorityClassName annotation takes precedence",
catalogSource: &v1alpha1.CatalogSource{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "testns",
},
Spec: v1alpha1.CatalogSourceSpec{
SourceType: v1alpha1.SourceTypeGrpc,
Image: "repo/image:tag",
GrpcPodConfig: &v1alpha1.GrpcPodConfig{
PriorityClassName: &overriddenPriorityClassName,
},
},
},
expectedTolerations: nil,
annotations: map[string]string{
CatalogPriorityClassKey: "some-OTHER-prio-class",
},
expectedPriorityClassName: "some-OTHER-prio-class",
expectedNodeSelectors: defaultNodeSelectors,
},
}

for _, testCase := range testCases {
pod := Pod(testCase.catalogSource, "hello", "busybox", "", map[string]string{}, map[string]string{}, int32(0), int32(0))
pod := Pod(testCase.catalogSource, "hello", "busybox", "", map[string]string{}, testCase.annotations, int32(0), int32(0))
require.Equal(t, testCase.expectedNodeSelectors, pod.Spec.NodeSelector)
require.Equal(t, testCase.expectedPriorityClassName, pod.Spec.PriorityClassName)
require.Equal(t, testCase.expectedTolerations, pod.Spec.Tolerations)
Expand Down
1 change: 1 addition & 0 deletions test/e2e/ctx/provisioner_kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func Provision(ctx *TestContext) (func(), error) {
}
kubeconfigPath := filepath.Join(dir, "kubeconfig")

fmt.Printf("kubeconfig: %s\n", kubeconfigPath)
provider := cluster.NewProvider(
cluster.ProviderWithLogger(kindLogAdapter{ctx}),
)
Expand Down

0 comments on commit 41070eb

Please sign in to comment.