from("direct:list").
toF("openshift-deploymentconfigs:///?kubernetesClient=#kubernetesClient&operation=listDeploymentConfigs").
to("mock:result");
from("direct:list").
toF("openshift-deploymentconfigs:///?kubernetesClient=#kubernetesClient&operation=listDeploymentConfigs").
to("mock:result");
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
from("direct:listByLabels").process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
Map<String, String> labels = new HashMap<>();
labels.put("key1", "value1");
labels.put("key2", "value2");
exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_DEPLOYMENTS_LABELS, labels);
}
});
toF("openshift-deploymentconfigs:///?kubernetesClient=#kubernetesClient&operation=listDeploymentConfigsByLabels").
to("mock:result");
from("direct:listByLabels").process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
Map<String, String> labels = new HashMap<>();
labels.put("key1", "value1");
labels.put("key2", "value2");
exchange.getIn().setHeader(KubernetesConstants.KUBERNETES_DEPLOYMENTS_LABELS, labels);
}
});
toF("openshift-deploymentconfigs:///?kubernetesClient=#kubernetesClient&operation=listDeploymentConfigsByLabels").
to("mock:result");
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
此操作使用标签选择器(带有 key1 和 key2,值为 value1 和 value2)从集群中返回 Deployment Configs 列表。