-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DSL Changes for batch/v1, policy/v1 and discovery/v1 resources
+ Added `client.batch().v1()` and `client.batch().v1beta1()` DSL + Added `client.policy().v1()` and `client.policy().v1beta1()` DSL + Added `client.discovery.v1()` DSL
- Loading branch information
1 parent
ae96030
commit 73e8fda
Showing
48 changed files
with
1,338 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1BatchAPIGroupClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import io.fabric8.kubernetes.api.model.batch.v1.CronJob; | ||
import io.fabric8.kubernetes.api.model.batch.v1.CronJobList; | ||
import io.fabric8.kubernetes.api.model.batch.v1.Job; | ||
import io.fabric8.kubernetes.api.model.batch.v1.JobList; | ||
import io.fabric8.kubernetes.client.dsl.MixedOperation; | ||
import io.fabric8.kubernetes.client.dsl.Resource; | ||
import io.fabric8.kubernetes.client.dsl.ScalableResource; | ||
import io.fabric8.kubernetes.client.dsl.V1BatchAPIGroupDSL; | ||
import io.fabric8.kubernetes.client.dsl.internal.batch.v1.CronJobOperationsImpl; | ||
import io.fabric8.kubernetes.client.dsl.internal.batch.v1.JobOperationsImpl; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class V1BatchAPIGroupClient extends BaseClient implements V1BatchAPIGroupDSL { | ||
public V1BatchAPIGroupClient() { | ||
super(); | ||
} | ||
|
||
public V1BatchAPIGroupClient(OkHttpClient httpClient, final Config config) { | ||
super(httpClient, config); | ||
} | ||
|
||
@Override | ||
public MixedOperation<Job, JobList, ScalableResource<Job>> jobs() { | ||
return new JobOperationsImpl(httpClient, getConfiguration()); | ||
} | ||
|
||
@Override | ||
public MixedOperation<CronJob, CronJobList, Resource<CronJob>> cronjobs() { | ||
return new CronJobOperationsImpl(httpClient, getConfiguration()); | ||
} | ||
} | ||
|
35 changes: 35 additions & 0 deletions
35
...es-client/src/main/java/io/fabric8/kubernetes/client/V1BatchAPIGroupExtensionAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import okhttp3.OkHttpClient; | ||
|
||
public class V1BatchAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V1BatchAPIGroupClient> { | ||
@Override | ||
protected String getAPIGroupName() { | ||
return "batch/v1"; | ||
} | ||
|
||
@Override | ||
public Class<V1BatchAPIGroupClient> getExtensionType() { | ||
return V1BatchAPIGroupClient.class; | ||
} | ||
|
||
@Override | ||
protected V1BatchAPIGroupClient newInstance(Client client) { | ||
return new V1BatchAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1DiscoveryAPIGroupClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import io.fabric8.kubernetes.api.model.discovery.v1.EndpointSlice; | ||
import io.fabric8.kubernetes.api.model.discovery.v1.EndpointSliceList; | ||
import io.fabric8.kubernetes.client.dsl.MixedOperation; | ||
import io.fabric8.kubernetes.client.dsl.Resource; | ||
import io.fabric8.kubernetes.client.dsl.V1DiscoveryAPIGroupDSL; | ||
import io.fabric8.kubernetes.client.dsl.internal.discovery.v1.EndpointSliceOperationsImpl; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class V1DiscoveryAPIGroupClient extends BaseClient implements V1DiscoveryAPIGroupDSL { | ||
public V1DiscoveryAPIGroupClient() { | ||
super(); | ||
} | ||
|
||
public V1DiscoveryAPIGroupClient(OkHttpClient httpClient, final Config config) { | ||
super(httpClient, config); | ||
} | ||
|
||
@Override | ||
public MixedOperation<EndpointSlice, EndpointSliceList, Resource<EndpointSlice>> endpointSlices() { | ||
return new EndpointSliceOperationsImpl(httpClient, getConfiguration()); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...lient/src/main/java/io/fabric8/kubernetes/client/V1DiscoveryAPIGroupExtensionAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import okhttp3.OkHttpClient; | ||
|
||
public class V1DiscoveryAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V1DiscoveryAPIGroupClient> { | ||
@Override | ||
protected String getAPIGroupName() { | ||
return "discovery/v1"; | ||
} | ||
|
||
@Override | ||
public Class<V1DiscoveryAPIGroupClient> getExtensionType() { | ||
return V1DiscoveryAPIGroupClient.class; | ||
} | ||
|
||
@Override | ||
protected V1DiscoveryAPIGroupClient newInstance(Client client) { | ||
return new V1DiscoveryAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1PolicyAPIGroupClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import io.fabric8.kubernetes.api.model.policy.v1.PodDisruptionBudget; | ||
import io.fabric8.kubernetes.api.model.policy.v1.PodDisruptionBudgetList; | ||
import io.fabric8.kubernetes.client.dsl.MixedOperation; | ||
import io.fabric8.kubernetes.client.dsl.Resource; | ||
import io.fabric8.kubernetes.client.dsl.V1PolicyAPIGroupDSL; | ||
import io.fabric8.kubernetes.client.dsl.internal.policy.v1.PodDisruptionBudgetOperationsImpl; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class V1PolicyAPIGroupClient extends BaseClient implements V1PolicyAPIGroupDSL { | ||
public V1PolicyAPIGroupClient() { | ||
super(); | ||
} | ||
|
||
public V1PolicyAPIGroupClient(OkHttpClient httpClient, final Config config) { | ||
super(httpClient, config); | ||
} | ||
|
||
@Override | ||
public MixedOperation<PodDisruptionBudget, PodDisruptionBudgetList, Resource<PodDisruptionBudget>> podDisruptionBudget() { | ||
return new PodDisruptionBudgetOperationsImpl(httpClient, getConfiguration()); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...s-client/src/main/java/io/fabric8/kubernetes/client/V1PolicyAPIGroupExtensionAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import okhttp3.OkHttpClient; | ||
|
||
public class V1PolicyAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V1PolicyAPIGroupClient> { | ||
@Override | ||
protected String getAPIGroupName() { | ||
return "policy/v1"; | ||
} | ||
|
||
@Override | ||
public Class<V1PolicyAPIGroupClient> getExtensionType() { | ||
return V1PolicyAPIGroupClient.class; | ||
} | ||
|
||
@Override | ||
protected V1PolicyAPIGroupClient newInstance(Client client) { | ||
return new V1PolicyAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/V1beta1BatchAPIGroupClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.fabric8.kubernetes.client; | ||
|
||
import io.fabric8.kubernetes.api.model.batch.v1beta1.CronJob; | ||
import io.fabric8.kubernetes.api.model.batch.v1beta1.CronJobList; | ||
import io.fabric8.kubernetes.client.dsl.MixedOperation; | ||
import io.fabric8.kubernetes.client.dsl.Resource; | ||
import io.fabric8.kubernetes.client.dsl.V1beta1BatchAPIGroupDSL; | ||
import io.fabric8.kubernetes.client.dsl.internal.batch.v1beta1.CronJobOperationsImpl; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class V1beta1BatchAPIGroupClient extends BaseClient implements V1beta1BatchAPIGroupDSL { | ||
public V1beta1BatchAPIGroupClient() { | ||
super(); | ||
} | ||
|
||
public V1beta1BatchAPIGroupClient(OkHttpClient httpClient, final Config config) { | ||
super(httpClient, config); | ||
} | ||
|
||
@Override | ||
public MixedOperation<CronJob, CronJobList, Resource<CronJob>> cronjobs() { | ||
return new CronJobOperationsImpl(httpClient, getConfiguration()); | ||
} | ||
} |
Oops, something went wrong.