forked from fabric8io/kubernetes-client
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for
flowcontrol.apiserver.k8s.io/v1beta1
FlowSchema and…
… PriorityLevelConfiguration Related to fabric8io#2912
- Loading branch information
1 parent
64cc3b0
commit 22df0cf
Showing
32 changed files
with
2,878 additions
and
2 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
35 changes: 35 additions & 0 deletions
35
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/FlowControlAPIGroupClient.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 io.fabric8.kubernetes.client.dsl.FlowControlAPIGroupDSL; | ||
import io.fabric8.kubernetes.client.dsl.V1beta1FlowControlAPIGroupDSL; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class FlowControlAPIGroupClient extends BaseClient implements FlowControlAPIGroupDSL { | ||
public FlowControlAPIGroupClient() { | ||
super(); | ||
} | ||
|
||
public FlowControlAPIGroupClient(OkHttpClient httpClient, final Config config) { | ||
super(httpClient, config); | ||
} | ||
|
||
@Override | ||
public V1beta1FlowControlAPIGroupDSL v1beta1() { | ||
return adapt(V1beta1FlowControlAPIGroupClient.class); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...lient/src/main/java/io/fabric8/kubernetes/client/FlowControlAPIGroupExtensionAdapter.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 FlowControlAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<FlowControlAPIGroupClient> { | ||
@Override | ||
protected String getAPIGroupName() { | ||
return "flowcontrol.apiserver.k8s.io"; | ||
} | ||
|
||
@Override | ||
public Class<FlowControlAPIGroupClient> getExtensionType() { | ||
return FlowControlAPIGroupClient.class; | ||
} | ||
|
||
@Override | ||
protected FlowControlAPIGroupClient newInstance(Client client) { | ||
return new FlowControlAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); | ||
} | ||
} |
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
47 changes: 47 additions & 0 deletions
47
...s-client/src/main/java/io/fabric8/kubernetes/client/V1beta1FlowControlAPIGroupClient.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,47 @@ | ||
/** | ||
* 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.flowcontrol.v1beta1.FlowSchema; | ||
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.FlowSchemaList; | ||
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PriorityLevelConfiguration; | ||
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PriorityLevelConfigurationList; | ||
import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; | ||
import io.fabric8.kubernetes.client.dsl.Resource; | ||
import io.fabric8.kubernetes.client.dsl.V1beta1FlowControlAPIGroupDSL; | ||
import io.fabric8.kubernetes.client.dsl.internal.flowcontrol.v1beta1.FlowSchemaOperationsImpl; | ||
import io.fabric8.kubernetes.client.dsl.internal.flowcontrol.v1beta1.PriorityLevelConfigurationOperationsImpl; | ||
import okhttp3.OkHttpClient; | ||
|
||
public class V1beta1FlowControlAPIGroupClient extends BaseClient implements V1beta1FlowControlAPIGroupDSL { | ||
public V1beta1FlowControlAPIGroupClient() { | ||
super(); | ||
} | ||
|
||
public V1beta1FlowControlAPIGroupClient(OkHttpClient httpClient, final Config config) { | ||
super(httpClient, config); | ||
} | ||
|
||
@Override | ||
public NonNamespaceOperation<FlowSchema, FlowSchemaList, Resource<FlowSchema>> flowSchema() { | ||
return new FlowSchemaOperationsImpl(httpClient, getConfiguration()); | ||
} | ||
|
||
@Override | ||
public NonNamespaceOperation<PriorityLevelConfiguration, PriorityLevelConfigurationList, Resource<PriorityLevelConfiguration>> priorityLevelConfigurations() { | ||
return new PriorityLevelConfigurationOperationsImpl(httpClient, getConfiguration()); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...rc/main/java/io/fabric8/kubernetes/client/V1beta1FlowControlAPIGroupExtensionAdapter.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,36 @@ | ||
/** | ||
* 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 V1beta1FlowControlAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V1beta1FlowControlAPIGroupClient> { | ||
@Override | ||
protected String getAPIGroupName() { | ||
return "flowcontrol.apiserver.k8s.io/v1beta1"; | ||
} | ||
|
||
@Override | ||
public Class<V1beta1FlowControlAPIGroupClient> getExtensionType() { | ||
return V1beta1FlowControlAPIGroupClient.class; | ||
} | ||
|
||
@Override | ||
protected V1beta1FlowControlAPIGroupClient newInstance(Client client) { | ||
return new V1beta1FlowControlAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration()); | ||
} | ||
} | ||
|
22 changes: 22 additions & 0 deletions
22
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/FlowControlAPIGroupDSL.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,22 @@ | ||
/** | ||
* 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.dsl; | ||
|
||
import io.fabric8.kubernetes.client.Client; | ||
|
||
public interface FlowControlAPIGroupDSL extends Client { | ||
V1beta1FlowControlAPIGroupDSL v1beta1(); | ||
} |
38 changes: 38 additions & 0 deletions
38
...-client/src/main/java/io/fabric8/kubernetes/client/dsl/V1beta1FlowControlAPIGroupDSL.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,38 @@ | ||
/** | ||
* 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.dsl; | ||
|
||
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PriorityLevelConfiguration; | ||
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PriorityLevelConfigurationList; | ||
import io.fabric8.kubernetes.client.Client; | ||
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.FlowSchema; | ||
import io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.FlowSchemaList; | ||
|
||
public interface V1beta1FlowControlAPIGroupDSL extends Client { | ||
/** | ||
* DSL entrypoint for flowcontrol.apiserver.k8s.io/v1beta1 FlowSchema | ||
* | ||
* @return {@link NonNamespaceOperation} for FlowSchema resource | ||
*/ | ||
NonNamespaceOperation<FlowSchema, FlowSchemaList, Resource<FlowSchema>> flowSchema(); | ||
|
||
/** | ||
* DSL entrypoint for flowcontrol.apiserver.k8s.io/v1beta1 PriorityLevelConfiguration | ||
* | ||
* @return {@link NonNamespaceOperation} for PriorityLevelConfiguration resource | ||
*/ | ||
NonNamespaceOperation<PriorityLevelConfiguration, PriorityLevelConfigurationList, Resource<PriorityLevelConfiguration>> priorityLevelConfigurations(); | ||
} |
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
27 changes: 27 additions & 0 deletions
27
kubernetes-model-generator/kubernetes-model-flowcontrol/Makefile
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,27 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
SHELL := /bin/bash | ||
|
||
all: build | ||
|
||
build: gobuild | ||
mvn clean install | ||
|
||
gobuild: | ||
CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 go build -a ./cmd/generate/generate.go | ||
./generate > src/main/resources/schema/kube-schema.json | ||
./generate validation > src/main/resources/schema/validation-schema.json |
Oops, something went wrong.