io.fabric8.kubernetes.api.model.ObjectFieldSelector Java Examples
The following examples show how to use
io.fabric8.kubernetes.api.model.ObjectFieldSelector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LanderPodFactory.java From data-highway with Apache License 2.0 | 5 votes |
private EnvVar envFromFieldPath(String name, String fieldPath) { EnvVarSource envVarSource = new EnvVarSource(); envVarSource.setFieldRef(new ObjectFieldSelector()); ObjectFieldSelector fieldRef = envVarSource.getFieldRef(); fieldRef.setFieldPath(fieldPath); return new EnvVarBuilder().withName(name).withValueFrom(envVarSource).build(); }
Example #2
Source File: DefaultContainerFactory.java From spring-cloud-deployer-kubernetes with Apache License 2.0 | 5 votes |
private EnvVar getGUIDEnvVar() { ObjectFieldSelector objectFieldSelector = new ObjectFieldSelector(); objectFieldSelector.setFieldPath("metadata.uid"); EnvVarSource envVarSource = new EnvVarSource(); envVarSource.setFieldRef(objectFieldSelector); EnvVar guidEnvVar = new EnvVar(); guidEnvVar.setValueFrom(envVarSource); guidEnvVar.setName(SPRING_CLOUD_APPLICATION_GUID); return guidEnvVar; }