Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If namespace is not provided nor autoconfigured should use default #234

Merged
merged 3 commits into from
Oct 31, 2017

Conversation

carlossg
Copy link
Contributor

@carlossg carlossg commented Oct 12, 2017

Otherwise it will fail with

io.fabric8.kubernetes.client.KubernetesClientException: Namespace not specified. But operation requires namespace.

Test pod creation on global config page

Otherwise it will fail with
io.fabric8.kubernetes.client.KubernetesClientException: Namespace not specified. But operation requires namespace.

Test pod creation on global config page
.withNewMetadata().withGenerateName("kubernetes-plugin-").endMetadata() //
.withNewSpec() //
.withContainers( //
new ContainerBuilder().withName("alpine").withImage("alpine").withCommand("cat")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail if no "alpine" image is available.

Jenkins might be running in a closed build environment which does not have access to dockerhub, but only to a private registry with custom images. May happen in an enterprise setting..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should should the correct error in that case

client.pods().withName(podName).waitUntilReady(30, TimeUnit.SECONDS);
client.pods().withName(podName).delete();

return FormValidation.ok("Connection test successful");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really just a "connection test" if we actually create a pod? The button also says "test connection"..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any other suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point 😄 .

I would only have stupid suggestions, write "test connection and creating pods" on the button, or remove the "creating pods" check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed pod creation

@carlossg
Copy link
Contributor Author

all good now @marvinthepa ?

@marvinthepa marvinthepa merged commit 4303ec3 into master Oct 31, 2017
@carlossg carlossg deleted the default-namespace branch December 2, 2017 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants