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

Adjust the cassandra example to use the service account. #8454

Merged
merged 1 commit into from
May 19, 2015

Conversation

brendandburns
Copy link
Contributor

@brendandburns
Copy link
Contributor Author

Part of #7444

@brendandburns
Copy link
Contributor Author

@erictune too.

String serviceName = getEnvOrDefault("CASSANDRA_SERVICE", "cassandra");
String path = "/api/v1beta3/namespaces/default/endpoints/";
try {
String token = getServiceAccountToken();

SSLContext ctx = SSLContext.getInstance("SSL");
Copy link
Member

Choose a reason for hiding this comment

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

indentation is inconsistent...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed. The perils of tab characters...

@brendandburns
Copy link
Contributor Author

Comments addressed. ptal.

String hostPort = getEnvOrDefault("KUBERNETES_RO_SERVICE_PORT", "8080");

String host = protocol + "://" + hostName + ":" + hostPort;
String host = "https://kubernetes.default.cluster.local";
String serviceName = getEnvOrDefault("CASSANDRA_SERVICE", "cassandra");
String path = "/api/v1beta3/namespaces/default/endpoints/";
Copy link
Member

Choose a reason for hiding this comment

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

I'm gonna merge this, but maybe in a followup you can fix this to get the namespace from the downward API? This forces the example to work only in the default namespace unnecessarily.

@lavalamp
Copy link
Member

LGTM

lavalamp added a commit that referenced this pull request May 19, 2015
Adjust the cassandra example to use the service account.
@lavalamp lavalamp merged commit f53c55a into kubernetes:master May 19, 2015
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.

6 participants