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

Update the hazelcast discovery to use the service account and https. #2

Merged
merged 1 commit into from
May 19, 2015

Conversation

brendandburns
Copy link
Contributor

public List<Subset> subsets;
}

private static String getServiceAccountToken() throws IOException {
String file = "/var/run/secrets/kubernetes.io/serviceaccount/token";
Copy link
Owner

Choose a reason for hiding this comment

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

How is this file provisioned?

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's automatically included in all pods now. See:

kubernetes/kubernetes#7101

Copy link
Owner

Choose a reason for hiding this comment

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

Is this present in 0.17.0? Cause

015-05-20T11:41:15.444282980Z 2015-05-20 11:41:15.439  INFO 12 --- [           main] c.g.p.h.HazelcastDiscoveryController     : Asking k8s registry at https://kubernetes.default.cluster.local..
2015-05-20T11:41:15.447430811Z 2015-05-20 11:41:15.447  WARN 12 --- [           main] c.g.p.h.HazelcastDiscoveryController     : Request to Kubernetes API failed
2015-05-20T11:41:15.447455987Z
2015-05-20T11:41:15.447459540Z java.nio.file.NoSuchFileException: /var/run/secrets/kubernetes.io/serviceaccount/token
2015-05-20T11:41:15.447462767Z  at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
2015-05-20T11:41:15.447465764Z  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
2015-05-20T11:41:15.447468341Z  at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
2015-05-20T11:41:15.447470841Z  at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
2015-05-20T11:41:15.447473430Z  at java.nio.file.Files.newByteChannel(Files.java:361)
2015-05-20T11:41:15.447476757Z  at java.nio.file.Files.newByteChannel(Files.java:407)
2015-05-20T11:41:15.447479365Z  at java.nio.file.Files.readAllBytes(Files.java:3152)
2015-05-20T11:41:15.447481931Z  at com.github.pires.hazelcast.HazelcastDiscoveryController.getServiceAccountToken(HazelcastDiscoveryController.java:73)
2015-05-20T11:41:15.447484868Z  at com.github.pires.hazelcast.HazelcastDiscoveryController.run(HazelcastDiscoveryController.java:107)
2015-05-20T11:41:15.447487676Z  at org.springframework.boot.SpringApplication.runCommandLineRunners(SpringApplication.java:672)
2015-05-20T11:41:15.447490031Z  at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:690)
2015-05-20T11:41:15.447492460Z  at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
2015-05-20T11:41:15.447494917Z  at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139)
2015-05-20T11:41:15.447497353Z  at com.github.pires.hazelcast.Application.main(Application.java:27)
2015-05-20T11:41:15.447500453Z  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2015-05-20T11:41:15.447502947Z  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2015-05-20T11:41:15.447505408Z  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2015-05-20T11:41:15.447517981Z  at java.lang.reflect.Method.invoke(Method.java:497)
2015-05-20T11:41:15.447520811Z  at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
2015-05-20T11:41:15.447523966Z

Copy link
Owner

Choose a reason for hiding this comment

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

It wasn't. 0.17.1 has just been tagged. Let me give it a try.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's in 0.17.1

Brendan
On May 21, 2015 1:48 PM, "Paulo Pires" notifications@github.com wrote:

In
src/main/java/com/github/pires/hazelcast/HazelcastDiscoveryController.java
#2 (comment)
:

 public List<Subset> subsets;

}

  • private static String getServiceAccountToken() throws IOException {
  • String file = "/var/run/secrets/kubernetes.io/serviceaccount/token";

It wasn't. 0.17.1 has just been tagged. Let me give it a try.


Reply to this email directly or view it on GitHub
https://github.com/pires/hazelcast-kubernetes-bootstrapper/pull/2/files#r30827448
.

@brendandburns
Copy link
Contributor Author

Comments addressed. Please re-check.

Thanks
--brendan

pires added a commit that referenced this pull request May 19, 2015
Update the hazelcast discovery to use the service account and https.
@pires pires merged commit af5cf8e into pires:master May 19, 2015
@pires
Copy link
Owner

pires commented May 19, 2015

Thank you @brendandburns

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.

3 participants