-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Conversation
Part of #7444 |
@erictune too. |
String serviceName = getEnvOrDefault("CASSANDRA_SERVICE", "cassandra"); | ||
String path = "/api/v1beta3/namespaces/default/endpoints/"; | ||
try { | ||
String token = getServiceAccountToken(); | ||
|
||
SSLContext ctx = SSLContext.getInstance("SSL"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation is inconsistent...
There was a problem hiding this comment.
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...
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/"; |
There was a problem hiding this comment.
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.
LGTM |
Adjust the cassandra example to use the service account.
@lavalamp