Search in sources :

Example 1 with CreateOrReplaceable

use of io.fabric8.kubernetes.client.dsl.CreateOrReplaceable in project jointware by isdream.

the class KubernetesModelGenerator method doCreateOrReplace.

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected Object doCreateOrReplace(Object client, String kind, Map<String, Map<String, Object>> params) throws Exception {
    CreateOrReplaceable instance = (CreateOrReplaceable) getKindModel(client, kind);
    Object param = generateParameters(params, kind);
    return instance.createOrReplace(param);
}
Also used : CreateOrReplaceable(io.fabric8.kubernetes.client.dsl.CreateOrReplaceable)

Example 2 with CreateOrReplaceable

use of io.fabric8.kubernetes.client.dsl.CreateOrReplaceable in project jointware by isdream.

the class KubernetesExecutor method doCreateOrReplace.

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected Object doCreateOrReplace(Object client, String kind, Map<String, Map<String, Object>> params) throws Exception {
    CreateOrReplaceable instance = (CreateOrReplaceable) getKindModel(client, kind);
    KubernetesModelGenerator generator = new KubernetesModelGenerator(getObjectRef());
    Object param = generator.toObject(params, kind);
    return instance.createOrReplace(param);
}
Also used : KubernetesModelGenerator(com.github.isdream.jointware.kubernetes.KubernetesModelGenerator) CreateOrReplaceable(io.fabric8.kubernetes.client.dsl.CreateOrReplaceable)

Aggregations

CreateOrReplaceable (io.fabric8.kubernetes.client.dsl.CreateOrReplaceable)2 KubernetesModelGenerator (com.github.isdream.jointware.kubernetes.KubernetesModelGenerator)1