Skip to content

Commit

Permalink
Merge pull request fabric8io#2216 from rohanKanojia/pr/validatingwebh…
Browse files Browse the repository at this point in the history
…ookconfiguration
  • Loading branch information
fusesource-ci authored May 15, 2020
2 parents cc916a2 + 72705f4 commit d073f75
Show file tree
Hide file tree
Showing 30 changed files with 1,954 additions and 247 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#### Dependency Upgrade

#### New Features
* Added DSL support for `admissionregistration.k8s.io/v1beta1` resources
* Add support for Namespaced SharedInformers, fixed probelms with OperationContext argument

### 4.10.1 (2020-05-06)
Expand Down
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;

import okhttp3.OkHttpClient;

public class AdmissionRegistrationAPIGroupClient extends BaseClient implements AdmissionRegistrationAPIGroupDSL {
public AdmissionRegistrationAPIGroupClient() {
super();
}

public AdmissionRegistrationAPIGroupClient(OkHttpClient httpClient, final Config config) {
super(httpClient, config);
}

@Override
public V1AdmissionRegistrationAPIGroupDSL v1() {
return adapt(V1AdmissionRegistrationAPIGroupClient.class);
}

@Override
public V1beta1AdmissionRegistrationAPIGroupDSL v1beta1() {
return adapt(V1beta1AdmissionRegistrationAPIGroupClient.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* 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;

public interface AdmissionRegistrationAPIGroupDSL extends Client {
V1AdmissionRegistrationAPIGroupDSL v1();
V1beta1AdmissionRegistrationAPIGroupDSL v1beta1();
}
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 AdmissionRegistrationAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<AdmissionRegistrationAPIGroupClient> {
@Override
protected String getAPIGroupName() {
return "admissionregistration.k8s.io";
}

@Override
public Class<AdmissionRegistrationAPIGroupClient> getExtensionType() {
return AdmissionRegistrationAPIGroupClient.class;
}

@Override
protected AdmissionRegistrationAPIGroupClient newInstance(Client client) {
return new AdmissionRegistrationAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ public VersionInfo getVersion() {
return delegate.getVersion();
}

@Override
public AdmissionRegistrationAPIGroupDSL admissionRegistration() {
return delegate.admissionRegistration();
}

@Override
public AppsAPIGroupDSL apps() {
return delegate.apps();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ public V1APIGroupDSL v1() {
return adapt(V1APIGroupClient.class);
}

@Override
public AdmissionRegistrationAPIGroupDSL admissionRegistration() {
return adapt(AdmissionRegistrationAPIGroupClient.class);
}

@Override
public AppsAPIGroupDSL apps() {
return adapt(AppsAPIGroupClient.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ public interface KubernetesClient extends Client {
*/
RawCustomResourceOperationsImpl customResource(CustomResourceDefinitionContext customResourceDefinition);

/**
* API entrypoint for kubernetes resources with APIGroup admissionregistration.k8s.io/v1beta1
*
* @return AdmissionRegistrationAPIGroupDSL which offers entrypoints to specific resources in this API group
*/
AdmissionRegistrationAPIGroupDSL admissionRegistration();

/**
* API entrypoint for kubernetes resources with APIGroup apps/v1
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* 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.admissionregistration.v1.DoneableMutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.DoneableValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.MutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.MutatingWebhookConfigurationList;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.ValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.ValidatingWebhookConfigurationList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.internal.admissionregistration.v1.ValidatingWebhookConfigurationOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.admissionregistration.v1.MutatingWebhookConfigurationOperationsImpl;
import okhttp3.OkHttpClient;

public class V1AdmissionRegistrationAPIGroupClient extends BaseClient implements V1AdmissionRegistrationAPIGroupDSL {
public V1AdmissionRegistrationAPIGroupClient() {
super();
}

public V1AdmissionRegistrationAPIGroupClient(OkHttpClient httpClient, final Config config) {
super(httpClient, config);
}

@Override
public MixedOperation<ValidatingWebhookConfiguration, ValidatingWebhookConfigurationList, DoneableValidatingWebhookConfiguration, Resource<ValidatingWebhookConfiguration, DoneableValidatingWebhookConfiguration>> validatingWebhookConfigurations() {
return new ValidatingWebhookConfigurationOperationsImpl(httpClient, getConfiguration());
}

@Override
public MixedOperation<MutatingWebhookConfiguration, MutatingWebhookConfigurationList, DoneableMutatingWebhookConfiguration, Resource<MutatingWebhookConfiguration, DoneableMutatingWebhookConfiguration>> mutatingWebhookConfigurations() {
return new MutatingWebhookConfigurationOperationsImpl(httpClient, getConfiguration());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* 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.admissionregistration.v1.DoneableMutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.DoneableValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.MutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.MutatingWebhookConfigurationList;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.ValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1.ValidatingWebhookConfigurationList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;

public interface V1AdmissionRegistrationAPIGroupDSL extends Client {
MixedOperation<ValidatingWebhookConfiguration, ValidatingWebhookConfigurationList, DoneableValidatingWebhookConfiguration, Resource<ValidatingWebhookConfiguration, DoneableValidatingWebhookConfiguration>> validatingWebhookConfigurations();
MixedOperation<MutatingWebhookConfiguration, MutatingWebhookConfigurationList, DoneableMutatingWebhookConfiguration, Resource<MutatingWebhookConfiguration, DoneableMutatingWebhookConfiguration>> mutatingWebhookConfigurations();
}
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 V1AdmissionRegistrationAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V1AdmissionRegistrationAPIGroupClient> {
@Override
protected String getAPIGroupName() {
return "admissionregistration/v1";
}

@Override
public Class<V1AdmissionRegistrationAPIGroupClient> getExtensionType() {
return V1AdmissionRegistrationAPIGroupClient.class;
}

@Override
protected V1AdmissionRegistrationAPIGroupClient newInstance(Client client) {
return new V1AdmissionRegistrationAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* 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.admissionregistration.v1beta1.DoneableMutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.DoneableValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.MutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.MutatingWebhookConfigurationList;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.ValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.ValidatingWebhookConfigurationList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.internal.admissionregistration.v1beta1.MutatingWebhookConfigurationOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.admissionregistration.v1beta1.ValidatingWebhookConfigurationOperationsImpl;
import okhttp3.OkHttpClient;

public class V1beta1AdmissionRegistrationAPIGroupClient extends BaseClient implements V1beta1AdmissionRegistrationAPIGroupDSL {
public V1beta1AdmissionRegistrationAPIGroupClient() {
super();
}

public V1beta1AdmissionRegistrationAPIGroupClient(OkHttpClient httpClient, final Config config) {
super(httpClient, config);
}

@Override
public MixedOperation<ValidatingWebhookConfiguration, ValidatingWebhookConfigurationList, DoneableValidatingWebhookConfiguration, Resource<ValidatingWebhookConfiguration, DoneableValidatingWebhookConfiguration>> validatingWebhookConfigurations() {
return new ValidatingWebhookConfigurationOperationsImpl(httpClient, getConfiguration());
}

@Override
public MixedOperation<MutatingWebhookConfiguration, MutatingWebhookConfigurationList, DoneableMutatingWebhookConfiguration, Resource<MutatingWebhookConfiguration, DoneableMutatingWebhookConfiguration>> mutatingWebhookConfigurations() {
return new MutatingWebhookConfigurationOperationsImpl(httpClient, getConfiguration());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* 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.admissionregistration.v1beta1.DoneableMutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.DoneableValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.MutatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.MutatingWebhookConfigurationList;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.ValidatingWebhookConfiguration;
import io.fabric8.kubernetes.api.model.admissionregistration.v1beta1.ValidatingWebhookConfigurationList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;

public interface V1beta1AdmissionRegistrationAPIGroupDSL extends Client {
MixedOperation<ValidatingWebhookConfiguration, ValidatingWebhookConfigurationList, DoneableValidatingWebhookConfiguration, Resource<ValidatingWebhookConfiguration, DoneableValidatingWebhookConfiguration>> validatingWebhookConfigurations();
MixedOperation<MutatingWebhookConfiguration, MutatingWebhookConfigurationList, DoneableMutatingWebhookConfiguration, Resource<MutatingWebhookConfiguration, DoneableMutatingWebhookConfiguration>> mutatingWebhookConfigurations();
}
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 V1beta1AdmissionRegistrationAPIGroupExtensionAdapter extends APIGroupExtensionAdapter<V1beta1AdmissionRegistrationAPIGroupClient> {
@Override
protected String getAPIGroupName() {
return "admissionregistration/v1beta1";
}

@Override
public Class<V1beta1AdmissionRegistrationAPIGroupClient> getExtensionType() {
return V1beta1AdmissionRegistrationAPIGroupClient.class;
}

@Override
protected V1beta1AdmissionRegistrationAPIGroupClient newInstance(Client client) {
return new V1beta1AdmissionRegistrationAPIGroupClient(client.adapt(OkHttpClient.class), client.getConfiguration());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import io.fabric8.kubernetes.api.model.coordination.v1.Lease;
import io.fabric8.kubernetes.api.model.coordination.v1.LeaseList;
import io.fabric8.kubernetes.client.Adapters;
import io.fabric8.kubernetes.client.AdmissionRegistrationAPIGroupDSL;
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.ConfigBuilder;
import io.fabric8.kubernetes.client.KubernetesClient;
Expand Down Expand Up @@ -371,6 +372,11 @@ public V1APIGroupDSL v1() {
return delegate.v1();
}

@Override
public AdmissionRegistrationAPIGroupDSL admissionRegistration() {
return delegate.admissionRegistration();
}

@Override
public AppsAPIGroupDSL apps() {
return delegate.apps();
Expand Down
Loading

0 comments on commit d073f75

Please sign in to comment.