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 KubernetesController.java #2

Open
wants to merge 1 commit into
base: kubernetes
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ void create(InstanceConfig instanceConfig, String userCodeFile, String pulsarSer
instanceCodeFile = pythonInstanceFile;
}
final String fqn = FunctionDetailsUtils.getFullyQualifiedName(instanceConfig.getFunctionDetails());

// there are other characters that are not allowed in a pod name. see the heron code for the regex check
Copy link
Author

Choose a reason for hiding this comment

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

if (!fqn.equals(fqn.toLowerCase())) {
throw new RuntimeException("K8S scheduler does not allow upper case fqns.");
}
Expand Down Expand Up @@ -278,14 +280,16 @@ private V1Container getContainer(List<String> executorCommand, String cpu,
.valueFrom(new V1EnvVarSource()
.fieldRef(new V1ObjectFieldSelector()
.fieldPath(KubernetesConstants.POD_IP)));

*/

// This env variable is needed to get the shard id
final V1EnvVar envVarPodName = new V1EnvVar();
envVarPodName.name(KubernetesConstants.ENV_POD_NAME)
.valueFrom(new V1EnvVarSource()
.fieldRef(new V1ObjectFieldSelector()
.fieldPath(KubernetesConstants.POD_NAME)));
container.setEnv(Arrays.asList(envVarHost, envVarPodName));
*/



// set container resources
Expand Down Expand Up @@ -327,4 +331,4 @@ private void mountVolumeIfPresent(V1Container container) {
}
}
*/
}
}