use istio client-go library instead of knative (#1661)

use istio client-go library instead of knative
bump kubernetes dependency version
change code coverage to codecov
This commit is contained in:
zryfish
2019-12-13 11:26:18 +08:00
committed by GitHub
parent f249a6e081
commit ea88c8803d
2071 changed files with 354531 additions and 108336 deletions

View File

@@ -0,0 +1,6 @@
// Code generated by kubetype-gen. DO NOT EDIT.
// Package has auto-generated kube type wrappers for raw types.
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package
package v1alpha1

View File

@@ -0,0 +1,37 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
)
var (
// Package-wide variables from generator "register".
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
const (
// Package-wide consts from generator "register".
GroupName = "authentication.istio.io"
)
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&MeshPolicy{},
&MeshPolicyList{},
&Policy{},
&PolicyList{},
)
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@@ -0,0 +1,217 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha1
import (
authenticationv1alpha1 "istio.io/api/authentication/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Policy defines what authentication methods can be accepted on workload(s),
// and if authenticated, which method/certificate will set the request principal
// (i.e request.auth.principal attribute).
//
// Authentication policy is composed of 2-part authentication:
// - peer: verify caller service credentials. This part will set source.user
// (peer identity).
// - origin: verify the origin credentials. This part will set request.auth.user
// (origin identity), as well as other attributes like request.auth.presenter,
// request.auth.audiences and raw claims. Note that the identity could be
// end-user, service account, device etc.
//
// Last but not least, the principal binding rule defines which identity (peer
// or origin) should be used as principal. By default, it uses peer.
//
// Examples:
//
// Policy to enable mTLS for all services in namespace frod. The policy name must be
// `default`, and it contains no rule for `targets`.
//
// ```yaml
// apiVersion: authentication.istio.io/v1alpha1
// kind: Policy
// metadata:
// name: default
// namespace: frod
// spec:
// peers:
// - mtls:
// ```
// Policy to disable mTLS for "productpage" service
//
// ```yaml
// apiVersion: authentication.istio.io/v1alpha1
// kind: Policy
// metadata:
// name: productpage-mTLS-disable
// namespace: frod
// spec:
// targets:
// - name: productpage
// ```
// Policy to require mTLS for peer authentication, and JWT for origin authentication
// for productpage:9000 except the path '/health_check' . Principal is set from origin identity.
//
// ```yaml
// apiVersion: authentication.istio.io/v1alpha1
// kind: Policy
// metadata:
// name: productpage-mTLS-with-JWT
// namespace: frod
// spec:
// targets:
// - name: productpage
// ports:
// - number: 9000
// peers:
// - mtls:
// origins:
// - jwt:
// issuer: "https://securetoken.google.com"
// audiences:
// - "productpage"
// jwksUri: "https://www.googleapis.com/oauth2/v1/certs"
// jwtHeaders:
// - "x-goog-iap-jwt-assertion"
// triggerRules:
// - excludedPaths:
// - exact: /health_check
// principalBinding: USE_ORIGIN
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=authentication.istio.io/v1alpha1
// +kubetype-gen:kubeType=Policy
// +kubetype-gen:kubeType=MeshPolicy
// +kubetype-gen:MeshPolicy:tag=genclient:nonNamespaced
// +genclient
// +k8s:deepcopy-gen=true
// -->
type Policy struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec authenticationv1alpha1.Policy `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PolicyList is a collection of Policies.
type PolicyList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []Policy `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Policy defines what authentication methods can be accepted on workload(s),
// and if authenticated, which method/certificate will set the request principal
// (i.e request.auth.principal attribute).
//
// Authentication policy is composed of 2-part authentication:
// - peer: verify caller service credentials. This part will set source.user
// (peer identity).
// - origin: verify the origin credentials. This part will set request.auth.user
// (origin identity), as well as other attributes like request.auth.presenter,
// request.auth.audiences and raw claims. Note that the identity could be
// end-user, service account, device etc.
//
// Last but not least, the principal binding rule defines which identity (peer
// or origin) should be used as principal. By default, it uses peer.
//
// Examples:
//
// Policy to enable mTLS for all services in namespace frod. The policy name must be
// `default`, and it contains no rule for `targets`.
//
// ```yaml
// apiVersion: authentication.istio.io/v1alpha1
// kind: Policy
// metadata:
// name: default
// namespace: frod
// spec:
// peers:
// - mtls:
// ```
// Policy to disable mTLS for "productpage" service
//
// ```yaml
// apiVersion: authentication.istio.io/v1alpha1
// kind: Policy
// metadata:
// name: productpage-mTLS-disable
// namespace: frod
// spec:
// targets:
// - name: productpage
// ```
// Policy to require mTLS for peer authentication, and JWT for origin authentication
// for productpage:9000 except the path '/health_check' . Principal is set from origin identity.
//
// ```yaml
// apiVersion: authentication.istio.io/v1alpha1
// kind: Policy
// metadata:
// name: productpage-mTLS-with-JWT
// namespace: frod
// spec:
// targets:
// - name: productpage
// ports:
// - number: 9000
// peers:
// - mtls:
// origins:
// - jwt:
// issuer: "https://securetoken.google.com"
// audiences:
// - "productpage"
// jwksUri: "https://www.googleapis.com/oauth2/v1/certs"
// jwtHeaders:
// - "x-goog-iap-jwt-assertion"
// triggerRules:
// - excludedPaths:
// - exact: /health_check
// principalBinding: USE_ORIGIN
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=authentication.istio.io/v1alpha1
// +kubetype-gen:kubeType=Policy
// +kubetype-gen:kubeType=MeshPolicy
// +kubetype-gen:MeshPolicy:tag=genclient:nonNamespaced
// +genclient
// +k8s:deepcopy-gen=true
// -->
type MeshPolicy struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec authenticationv1alpha1.Policy `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MeshPolicyList is a collection of MeshPolicies.
type MeshPolicyList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []MeshPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@@ -0,0 +1,129 @@
// +build !ignore_autogenerated
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MeshPolicy) DeepCopyInto(out *MeshPolicy) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshPolicy.
func (in *MeshPolicy) DeepCopy() *MeshPolicy {
if in == nil {
return nil
}
out := new(MeshPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *MeshPolicy) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MeshPolicyList) DeepCopyInto(out *MeshPolicyList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]MeshPolicy, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshPolicyList.
func (in *MeshPolicyList) DeepCopy() *MeshPolicyList {
if in == nil {
return nil
}
out := new(MeshPolicyList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *MeshPolicyList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Policy) DeepCopyInto(out *Policy) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (in *Policy) DeepCopy() *Policy {
if in == nil {
return nil
}
out := new(Policy)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Policy) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PolicyList) DeepCopyInto(out *PolicyList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Policy, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList.
func (in *PolicyList) DeepCopy() *PolicyList {
if in == nil {
return nil
}
out := new(PolicyList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PolicyList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@@ -0,0 +1,6 @@
// Code generated by kubetype-gen. DO NOT EDIT.
// Package has auto-generated kube type wrappers for raw types.
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package
package v1alpha2

View File

@@ -0,0 +1,49 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha2
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
)
var (
// Package-wide variables from generator "register".
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
const (
// Package-wide consts from generator "register".
GroupName = "config.istio.io"
)
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&AttributeManifest{},
&AttributeManifestList{},
&HTTPAPISpec{},
&HTTPAPISpecList{},
&HTTPAPISpecBinding{},
&HTTPAPISpecBindingList{},
&Handler{},
&HandlerList{},
&Instance{},
&InstanceList{},
&QuotaSpec{},
&QuotaSpecList{},
&QuotaSpecBinding{},
&QuotaSpecBindingList{},
&Rule{},
&RuleList{},
)
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@@ -0,0 +1,415 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha2
import (
client "istio.io/api/mixer/v1/config/client"
v1beta1 "istio.io/api/policy/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AttributeManifest describes a set of Attributes produced by some component
// of an Istio deployment.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type AttributeManifest struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec v1beta1.AttributeManifest `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AttributeManifestList is a collection of AttributeManifests.
type AttributeManifestList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []AttributeManifest `json:"items" protobuf:"bytes,2,rep,name=items"`
}
// please upgrade the proto package
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HTTPAPISpec defines the canonical configuration for generating
// API-related attributes from HTTP requests based on the method and
// uri templated path matches. It is sufficient for defining the API
// surface of a service for the purposes of API attribute
// generation. It is not intended to represent auth, quota,
// documentation, or other information commonly found in other API
// specifications, e.g. OpenAPI.
//
// Existing standards that define operations (or methods) in terms of
// HTTP methods and paths can be normalized to this format for use in
// Istio. For example, a simple petstore API described by OpenAPIv2
// [here](https://github.com/googleapis/gnostic/blob/master/examples/v2.0/yaml/petstore-simple.yaml)
// can be represented with the following HTTPAPISpec.
//
// ```yaml
// apiVersion: config.istio.io/v1alpha2
// kind: HTTPAPISpec
// metadata:
// name: petstore
// namespace: default
// spec:
// attributes:
// attributes:
// api.service:
// stringValue: petstore.swagger.io
// api.version:
// stringValue: 1.0.0
// patterns:
// - attributes:
// attributes:
// api.operation:
// stringValue: findPets
// httpMethod: GET
// uriTemplate: /api/pets
// - attributes:
// attributes:
// api.operation:
// stringValue: addPet
// httpMethod: POST
// uriTemplate: /api/pets
// - attributes:
// attributes:
// api.operation:
// stringValue: findPetById
// httpMethod: GET
// uriTemplate: /api/pets/{id}
// - attributes:
// attributes:
// api.operation:
// stringValue: deletePet
// httpMethod: DELETE
// uriTemplate: /api/pets/{id}
// apiKeys:
// - query: api-key
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type HTTPAPISpec struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec client.HTTPAPISpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HTTPAPISpecList is a collection of HTTPAPISpecs.
type HTTPAPISpecList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []HTTPAPISpec `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HTTPAPISpecBinding defines the binding between HTTPAPISpecs and one or more
// IstioService. For example, the following establishes a binding
// between the HTTPAPISpec `petstore` and service `foo` in namespace `bar`.
//
// ```yaml
// apiVersion: config.istio.io/v1alpha2
// kind: HTTPAPISpecBinding
// metadata:
// name: my-binding
// namespace: default
// spec:
// services:
// - name: foo
// namespace: bar
// apiSpecs:
// - name: petstore
// namespace: default
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type HTTPAPISpecBinding struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec client.HTTPAPISpecBinding `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HTTPAPISpecBindingList is a collection of HTTPAPISpecBindings.
type HTTPAPISpecBindingList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []HTTPAPISpecBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Handler allows the operator to configure a specific adapter implementation.
// Each adapter implementation defines its own `params` proto.
//
// In the following example we define a `metrics` handler for the `prometheus` adapter.
// The example is in the form of a Kubernetes resource:
// * The `metadata.name` is the name of the handler
// * The `kind` refers to the adapter name
// * The `spec` block represents adapter-specific configuration as well as the connection information
//
// ```yaml
// # Sample-1: No connection specified (for compiled in adapters)
// # Note: if connection information is not specified, the adapter configuration is directly inside
// # `spec` block. This is going to be DEPRECATED in favor of Sample-2
// apiVersion: "config.istio.io/v1alpha2"
// kind: handler
// metadata:
// name: requestcount
// namespace: istio-system
// spec:
// compiledAdapter: prometheus
// params:
// metrics:
// - name: request_count
// instance_name: requestcount.metric.istio-system
// kind: COUNTER
// label_names:
// - source_service
// - source_version
// - destination_service
// - destination_version
// ---
// # Sample-2: With connection information (for out-of-process adapters)
// # Note: Unlike sample-1, the adapter configuration is parallel to `connection` and is nested inside `param` block.
// apiVersion: "config.istio.io/v1alpha2"
// kind: handler
// metadata:
// name: requestcount
// namespace: istio-system
// spec:
// compiledAdapter: prometheus
// params:
// param:
// metrics:
// - name: request_count
// instance_name: requestcount.metric.istio-system
// kind: COUNTER
// label_names:
// - source_service
// - source_version
// - destination_service
// - destination_version
// connection:
// address: localhost:8090
// ---
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type Handler struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec v1beta1.Handler `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// HandlerList is a collection of Handlers.
type HandlerList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []Handler `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// An Instance tells Mixer how to create instances for particular template.
//
// Instance is defined by the operator. Instance is defined relative to a known
// template. Their purpose is to tell Mixer how to use attributes or literals to produce
// instances of the specified template at runtime.
//
// The following example instructs Mixer to construct an instance associated with template
// 'istio.mixer.adapter.metric.Metric'. It provides a mapping from the template's fields to expressions.
// Instances produced with this instance can be referenced by [Actions][istio.policy.v1beta1.Action] using name
// 'RequestCountByService'
//
// ```yaml
// - name: RequestCountByService
// template: istio.mixer.adapter.metric.Metric
// params:
// value: 1
// dimensions:
// source: source.name
// destination_ip: destination.ip
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type Instance struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec v1beta1.Instance `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// InstanceList is a collection of Instances.
type InstanceList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []Instance `json:"items" protobuf:"bytes,2,rep,name=items"`
}
// please upgrade the proto package
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Determines the quotas used for individual requests.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type QuotaSpec struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec client.QuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// QuotaSpecList is a collection of QuotaSpecs.
type QuotaSpecList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []QuotaSpec `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// QuotaSpecBinding defines the binding between QuotaSpecs and one or more
// IstioService.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type QuotaSpecBinding struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec client.QuotaSpecBinding `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// QuotaSpecBindingList is a collection of QuotaSpecBindings.
type QuotaSpecBindingList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []QuotaSpecBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// A Rule is a selector and a set of intentions to be executed when the
// selector is `true`
//
// The following example instructs Mixer to invoke `prometheus-handler` handler for all services and pass it the
// instance constructed using the 'RequestCountByService' instance.
//
// ```yaml
// - match: match(destination.service.host, "*")
// actions:
// - handler: prometheus-handler
// instances:
// - RequestCountByService
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=config.istio.io/v1alpha2
// +genclient
// +k8s:deepcopy-gen=true
// -->
type Rule struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec v1beta1.Rule `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// RuleList is a collection of Rules.
type RuleList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []Rule `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@@ -0,0 +1,489 @@
// +build !ignore_autogenerated
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha2
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AttributeManifest) DeepCopyInto(out *AttributeManifest) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttributeManifest.
func (in *AttributeManifest) DeepCopy() *AttributeManifest {
if in == nil {
return nil
}
out := new(AttributeManifest)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AttributeManifest) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AttributeManifestList) DeepCopyInto(out *AttributeManifestList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]AttributeManifest, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttributeManifestList.
func (in *AttributeManifestList) DeepCopy() *AttributeManifestList {
if in == nil {
return nil
}
out := new(AttributeManifestList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AttributeManifestList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPAPISpec) DeepCopyInto(out *HTTPAPISpec) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPAPISpec.
func (in *HTTPAPISpec) DeepCopy() *HTTPAPISpec {
if in == nil {
return nil
}
out := new(HTTPAPISpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HTTPAPISpec) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPAPISpecBinding) DeepCopyInto(out *HTTPAPISpecBinding) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPAPISpecBinding.
func (in *HTTPAPISpecBinding) DeepCopy() *HTTPAPISpecBinding {
if in == nil {
return nil
}
out := new(HTTPAPISpecBinding)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HTTPAPISpecBinding) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPAPISpecBindingList) DeepCopyInto(out *HTTPAPISpecBindingList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]HTTPAPISpecBinding, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPAPISpecBindingList.
func (in *HTTPAPISpecBindingList) DeepCopy() *HTTPAPISpecBindingList {
if in == nil {
return nil
}
out := new(HTTPAPISpecBindingList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HTTPAPISpecBindingList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPAPISpecList) DeepCopyInto(out *HTTPAPISpecList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]HTTPAPISpec, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPAPISpecList.
func (in *HTTPAPISpecList) DeepCopy() *HTTPAPISpecList {
if in == nil {
return nil
}
out := new(HTTPAPISpecList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HTTPAPISpecList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Handler) DeepCopyInto(out *Handler) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Handler.
func (in *Handler) DeepCopy() *Handler {
if in == nil {
return nil
}
out := new(Handler)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Handler) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HandlerList) DeepCopyInto(out *HandlerList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Handler, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HandlerList.
func (in *HandlerList) DeepCopy() *HandlerList {
if in == nil {
return nil
}
out := new(HandlerList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HandlerList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Instance) DeepCopyInto(out *Instance) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.
func (in *Instance) DeepCopy() *Instance {
if in == nil {
return nil
}
out := new(Instance)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Instance) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InstanceList) DeepCopyInto(out *InstanceList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Instance, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstanceList.
func (in *InstanceList) DeepCopy() *InstanceList {
if in == nil {
return nil
}
out := new(InstanceList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *InstanceList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *QuotaSpec) DeepCopyInto(out *QuotaSpec) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaSpec.
func (in *QuotaSpec) DeepCopy() *QuotaSpec {
if in == nil {
return nil
}
out := new(QuotaSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *QuotaSpec) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *QuotaSpecBinding) DeepCopyInto(out *QuotaSpecBinding) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaSpecBinding.
func (in *QuotaSpecBinding) DeepCopy() *QuotaSpecBinding {
if in == nil {
return nil
}
out := new(QuotaSpecBinding)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *QuotaSpecBinding) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *QuotaSpecBindingList) DeepCopyInto(out *QuotaSpecBindingList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]QuotaSpecBinding, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaSpecBindingList.
func (in *QuotaSpecBindingList) DeepCopy() *QuotaSpecBindingList {
if in == nil {
return nil
}
out := new(QuotaSpecBindingList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *QuotaSpecBindingList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *QuotaSpecList) DeepCopyInto(out *QuotaSpecList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]QuotaSpec, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuotaSpecList.
func (in *QuotaSpecList) DeepCopy() *QuotaSpecList {
if in == nil {
return nil
}
out := new(QuotaSpecList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *QuotaSpecList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Rule) DeepCopyInto(out *Rule) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (in *Rule) DeepCopy() *Rule {
if in == nil {
return nil
}
out := new(Rule)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Rule) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RuleList) DeepCopyInto(out *RuleList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Rule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleList.
func (in *RuleList) DeepCopy() *RuleList {
if in == nil {
return nil
}
out := new(RuleList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *RuleList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@@ -0,0 +1,6 @@
// Code generated by kubetype-gen. DO NOT EDIT.
// Package has auto-generated kube type wrappers for raw types.
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package
package v1alpha3

View File

@@ -0,0 +1,45 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha3
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
)
var (
// Package-wide variables from generator "register".
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"}
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
const (
// Package-wide consts from generator "register".
GroupName = "networking.istio.io"
)
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&DestinationRule{},
&DestinationRuleList{},
&EnvoyFilter{},
&EnvoyFilterList{},
&Gateway{},
&GatewayList{},
&ServiceEntry{},
&ServiceEntryList{},
&Sidecar{},
&SidecarList{},
&VirtualService{},
&VirtualServiceList{},
)
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@@ -0,0 +1,200 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha3
import (
networkingv1alpha3 "istio.io/api/networking/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DestinationRule defines policies that apply to traffic intended for a service
// after routing has occurred.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
// +genclient
// +k8s:deepcopy-gen=true
// -->
type DestinationRule struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec networkingv1alpha3.DestinationRule `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DestinationRuleList is a collection of DestinationRules.
type DestinationRuleList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []DestinationRule `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// EnvoyFilter provides a mechanism to customize the Envoy configuration
// generated by Istio Pilot.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
// +genclient
// +k8s:deepcopy-gen=true
// -->
type EnvoyFilter struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec networkingv1alpha3.EnvoyFilter `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// EnvoyFilterList is a collection of EnvoyFilters.
type EnvoyFilterList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []EnvoyFilter `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Gateway describes a load balancer operating at the edge of the mesh
// receiving incoming or outgoing HTTP/TCP connections.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
// +genclient
// +k8s:deepcopy-gen=true
// -->
type Gateway struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec networkingv1alpha3.Gateway `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// GatewayList is a collection of Gateways.
type GatewayList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []Gateway `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceEntry enables adding additional entries into Istio's internal
// service registry.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
// +genclient
// +k8s:deepcopy-gen=true
// -->
type ServiceEntry struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec networkingv1alpha3.ServiceEntry `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceEntryList is a collection of ServiceEntries.
type ServiceEntryList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []ServiceEntry `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// `Sidecar` describes the configuration of the sidecar proxy that mediates
// inbound and outbound communication of the workload instance to which it is
// attached.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
// +genclient
// +k8s:deepcopy-gen=true
// -->
type Sidecar struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec networkingv1alpha3.Sidecar `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// SidecarList is a collection of Sidecars.
type SidecarList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []Sidecar `json:"items" protobuf:"bytes,2,rep,name=items"`
}
// please upgrade the proto package
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Configuration affecting traffic routing.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
// +genclient
// +k8s:deepcopy-gen=true
// -->
type VirtualService struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec networkingv1alpha3.VirtualService `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// VirtualServiceList is a collection of VirtualServices.
type VirtualServiceList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []VirtualService `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@@ -0,0 +1,369 @@
// +build !ignore_autogenerated
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha3
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DestinationRule) DeepCopyInto(out *DestinationRule) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRule.
func (in *DestinationRule) DeepCopy() *DestinationRule {
if in == nil {
return nil
}
out := new(DestinationRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DestinationRule) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DestinationRuleList) DeepCopyInto(out *DestinationRuleList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]DestinationRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleList.
func (in *DestinationRuleList) DeepCopy() *DestinationRuleList {
if in == nil {
return nil
}
out := new(DestinationRuleList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DestinationRuleList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvoyFilter) DeepCopyInto(out *EnvoyFilter) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilter.
func (in *EnvoyFilter) DeepCopy() *EnvoyFilter {
if in == nil {
return nil
}
out := new(EnvoyFilter)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EnvoyFilter) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvoyFilterList) DeepCopyInto(out *EnvoyFilterList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]EnvoyFilter, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyFilterList.
func (in *EnvoyFilterList) DeepCopy() *EnvoyFilterList {
if in == nil {
return nil
}
out := new(EnvoyFilterList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EnvoyFilterList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Gateway) DeepCopyInto(out *Gateway) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway.
func (in *Gateway) DeepCopy() *Gateway {
if in == nil {
return nil
}
out := new(Gateway)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Gateway) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GatewayList) DeepCopyInto(out *GatewayList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Gateway, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayList.
func (in *GatewayList) DeepCopy() *GatewayList {
if in == nil {
return nil
}
out := new(GatewayList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GatewayList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceEntry) DeepCopyInto(out *ServiceEntry) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEntry.
func (in *ServiceEntry) DeepCopy() *ServiceEntry {
if in == nil {
return nil
}
out := new(ServiceEntry)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceEntry) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceEntryList) DeepCopyInto(out *ServiceEntryList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ServiceEntry, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceEntryList.
func (in *ServiceEntryList) DeepCopy() *ServiceEntryList {
if in == nil {
return nil
}
out := new(ServiceEntryList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceEntryList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Sidecar) DeepCopyInto(out *Sidecar) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.
func (in *Sidecar) DeepCopy() *Sidecar {
if in == nil {
return nil
}
out := new(Sidecar)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Sidecar) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SidecarList) DeepCopyInto(out *SidecarList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Sidecar, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SidecarList.
func (in *SidecarList) DeepCopy() *SidecarList {
if in == nil {
return nil
}
out := new(SidecarList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *SidecarList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VirtualService) DeepCopyInto(out *VirtualService) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualService.
func (in *VirtualService) DeepCopy() *VirtualService {
if in == nil {
return nil
}
out := new(VirtualService)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *VirtualService) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VirtualServiceList) DeepCopyInto(out *VirtualServiceList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]VirtualService, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList.
func (in *VirtualServiceList) DeepCopy() *VirtualServiceList {
if in == nil {
return nil
}
out := new(VirtualServiceList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *VirtualServiceList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@@ -0,0 +1,6 @@
// Code generated by kubetype-gen. DO NOT EDIT.
// Package has auto-generated kube type wrappers for raw types.
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package
package v1alpha1

View File

@@ -0,0 +1,41 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
)
var (
// Package-wide variables from generator "register".
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
const (
// Package-wide consts from generator "register".
GroupName = "rbac.istio.io"
)
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&ClusterRbacConfig{},
&ClusterRbacConfigList{},
&RbacConfig{},
&RbacConfigList{},
&ServiceRole{},
&ServiceRoleList{},
&ServiceRoleBinding{},
&ServiceRoleBindingList{},
)
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@@ -0,0 +1,173 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1alpha1
import (
rbacv1alpha1 "istio.io/api/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// RbacConfig implements the ClusterRbacConfig Custom Resource Definition for controlling Istio RBAC behavior.
// The ClusterRbacConfig Custom Resource is a singleton where only one ClusterRbacConfig should be created
// globally in the mesh and the namespace should be the same to other Istio components, which usually is `istio-system`.
//
// Below is an example of an `ClusterRbacConfig` resource called `istio-rbac-config` which enables Istio RBAC for all
// services in the default namespace.
//
// ```yaml
// apiVersion: "rbac.istio.io/v1alpha1"
// kind: ClusterRbacConfig
// metadata:
// name: default
// namespace: istio-system
// spec:
// mode: ON_WITH_INCLUSION
// inclusion:
// namespaces: [ "default" ]
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=rbac.istio.io/v1alpha1
// +kubetype-gen:kubeType=RbacConfig
// +kubetype-gen:kubeType=ClusterRbacConfig
// +kubetype-gen:ClusterRbacConfig:tag=genclient:nonNamespaced
// +genclient
// +k8s:deepcopy-gen=true
// -->
type RbacConfig struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec rbacv1alpha1.RbacConfig `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// RbacConfigList is a collection of RbacConfigs.
type RbacConfigList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []RbacConfig `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// RbacConfig implements the ClusterRbacConfig Custom Resource Definition for controlling Istio RBAC behavior.
// The ClusterRbacConfig Custom Resource is a singleton where only one ClusterRbacConfig should be created
// globally in the mesh and the namespace should be the same to other Istio components, which usually is `istio-system`.
//
// Below is an example of an `ClusterRbacConfig` resource called `istio-rbac-config` which enables Istio RBAC for all
// services in the default namespace.
//
// ```yaml
// apiVersion: "rbac.istio.io/v1alpha1"
// kind: ClusterRbacConfig
// metadata:
// name: default
// namespace: istio-system
// spec:
// mode: ON_WITH_INCLUSION
// inclusion:
// namespaces: [ "default" ]
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=rbac.istio.io/v1alpha1
// +kubetype-gen:kubeType=RbacConfig
// +kubetype-gen:kubeType=ClusterRbacConfig
// +kubetype-gen:ClusterRbacConfig:tag=genclient:nonNamespaced
// +genclient
// +k8s:deepcopy-gen=true
// -->
type ClusterRbacConfig struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec rbacv1alpha1.RbacConfig `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterRbacConfigList is a collection of ClusterRbacConfigs.
type ClusterRbacConfigList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []ClusterRbacConfig `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceRole specification contains a list of access rules (permissions).
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=rbac.istio.io/v1alpha1
// +genclient
// +k8s:deepcopy-gen=true
// -->
type ServiceRole struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec rbacv1alpha1.ServiceRole `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceRoleList is a collection of ServiceRoles.
type ServiceRoleList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []ServiceRole `json:"items" protobuf:"bytes,2,rep,name=items"`
}
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceRoleBinding assigns a ServiceRole to a list of subjects.
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=rbac.istio.io/v1alpha1
// +genclient
// +k8s:deepcopy-gen=true
// -->
type ServiceRoleBinding struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec rbacv1alpha1.ServiceRoleBinding `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceRoleBindingList is a collection of ServiceRoleBindings.
type ServiceRoleBindingList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []ServiceRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@@ -0,0 +1,249 @@
// +build !ignore_autogenerated
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterRbacConfig) DeepCopyInto(out *ClusterRbacConfig) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRbacConfig.
func (in *ClusterRbacConfig) DeepCopy() *ClusterRbacConfig {
if in == nil {
return nil
}
out := new(ClusterRbacConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterRbacConfig) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterRbacConfigList) DeepCopyInto(out *ClusterRbacConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ClusterRbacConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRbacConfigList.
func (in *ClusterRbacConfigList) DeepCopy() *ClusterRbacConfigList {
if in == nil {
return nil
}
out := new(ClusterRbacConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterRbacConfigList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RbacConfig) DeepCopyInto(out *RbacConfig) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RbacConfig.
func (in *RbacConfig) DeepCopy() *RbacConfig {
if in == nil {
return nil
}
out := new(RbacConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *RbacConfig) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RbacConfigList) DeepCopyInto(out *RbacConfigList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]RbacConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RbacConfigList.
func (in *RbacConfigList) DeepCopy() *RbacConfigList {
if in == nil {
return nil
}
out := new(RbacConfigList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *RbacConfigList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceRole) DeepCopyInto(out *ServiceRole) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRole.
func (in *ServiceRole) DeepCopy() *ServiceRole {
if in == nil {
return nil
}
out := new(ServiceRole)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceRole) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceRoleBinding) DeepCopyInto(out *ServiceRoleBinding) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRoleBinding.
func (in *ServiceRoleBinding) DeepCopy() *ServiceRoleBinding {
if in == nil {
return nil
}
out := new(ServiceRoleBinding)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceRoleBinding) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceRoleBindingList) DeepCopyInto(out *ServiceRoleBindingList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ServiceRoleBinding, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRoleBindingList.
func (in *ServiceRoleBindingList) DeepCopy() *ServiceRoleBindingList {
if in == nil {
return nil
}
out := new(ServiceRoleBindingList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceRoleBindingList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceRoleList) DeepCopyInto(out *ServiceRoleList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ServiceRole, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRoleList.
func (in *ServiceRoleList) DeepCopy() *ServiceRoleList {
if in == nil {
return nil
}
out := new(ServiceRoleList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ServiceRoleList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@@ -0,0 +1,6 @@
// Code generated by kubetype-gen. DO NOT EDIT.
// Package has auto-generated kube type wrappers for raw types.
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package
package v1beta1

View File

@@ -0,0 +1,35 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1beta1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
)
var (
// Package-wide variables from generator "register".
SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
localSchemeBuilder = &SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
const (
// Package-wide consts from generator "register".
GroupName = "security.istio.io"
)
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&AuthorizationPolicy{},
&AuthorizationPolicyList{},
)
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
}

View File

@@ -0,0 +1,65 @@
// Code generated by kubetype-gen. DO NOT EDIT.
package v1beta1
import (
securityv1beta1 "istio.io/api/security/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// please upgrade the proto package
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AuthorizationPolicy enables access control on workloads.
//
// For example, the following authorization policy denies all requests to workloads
// in namespace foo.
//
// ```yaml
// apiVersion: security.istio.io/v1beta1
// kind: AuthorizationPolicy
// metadata:
// name: deny-all
// namespace: foo
// spec:
// ```
//
// The following authorization policy allows all requests to workloads in namespace
// foo.
//
// ```yaml
// apiVersion: security.istio.io/v1beta1
// kind: AuthorizationPolicy
// metadata:
// name: allow-all
// namespace: foo
// spec:
// rules:
// - {}
// ```
//
// <!-- go code generation tags
// +kubetype-gen
// +kubetype-gen:groupVersion=security.istio.io/v1beta1
// +genclient
// +k8s:deepcopy-gen=true
// -->
type AuthorizationPolicy struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec defines the implementation of this definition.
// +optional
Spec securityv1beta1.AuthorizationPolicy `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AuthorizationPolicyList is a collection of AuthorizationPolicies.
type AuthorizationPolicyList struct {
v1.TypeMeta `json:",inline"`
// +optional
v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []AuthorizationPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View File

@@ -0,0 +1,69 @@
// +build !ignore_autogenerated
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1beta1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AuthorizationPolicy) DeepCopyInto(out *AuthorizationPolicy) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicy.
func (in *AuthorizationPolicy) DeepCopy() *AuthorizationPolicy {
if in == nil {
return nil
}
out := new(AuthorizationPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AuthorizationPolicy) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AuthorizationPolicyList) DeepCopyInto(out *AuthorizationPolicyList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]AuthorizationPolicy, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicyList.
func (in *AuthorizationPolicyList) DeepCopy() *AuthorizationPolicyList {
if in == nil {
return nil
}
out := new(AuthorizationPolicyList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AuthorizationPolicyList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@@ -0,0 +1,137 @@
// Code generated by client-gen. DO NOT EDIT.
package versioned
import (
"fmt"
authenticationv1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/authentication/v1alpha1"
configv1alpha2 "istio.io/client-go/pkg/clientset/versioned/typed/config/v1alpha2"
networkingv1alpha3 "istio.io/client-go/pkg/clientset/versioned/typed/networking/v1alpha3"
rbacv1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/rbac/v1alpha1"
securityv1beta1 "istio.io/client-go/pkg/clientset/versioned/typed/security/v1beta1"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
)
type Interface interface {
Discovery() discovery.DiscoveryInterface
AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface
ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface
NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
SecurityV1beta1() securityv1beta1.SecurityV1beta1Interface
}
// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
authenticationV1alpha1 *authenticationv1alpha1.AuthenticationV1alpha1Client
configV1alpha2 *configv1alpha2.ConfigV1alpha2Client
networkingV1alpha3 *networkingv1alpha3.NetworkingV1alpha3Client
rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
securityV1beta1 *securityv1beta1.SecurityV1beta1Client
}
// AuthenticationV1alpha1 retrieves the AuthenticationV1alpha1Client
func (c *Clientset) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface {
return c.authenticationV1alpha1
}
// ConfigV1alpha2 retrieves the ConfigV1alpha2Client
func (c *Clientset) ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface {
return c.configV1alpha2
}
// NetworkingV1alpha3 retrieves the NetworkingV1alpha3Client
func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface {
return c.networkingV1alpha3
}
// RbacV1alpha1 retrieves the RbacV1alpha1Client
func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.rbacV1alpha1
}
// SecurityV1beta1 retrieves the SecurityV1beta1Client
func (c *Clientset) SecurityV1beta1() securityv1beta1.SecurityV1beta1Interface {
return c.securityV1beta1
}
// Discovery retrieves the DiscoveryClient
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
if c == nil {
return nil
}
return c.DiscoveryClient
}
// NewForConfig creates a new Clientset for the given config.
// If config's RateLimiter is not set and QPS and Burst are acceptable,
// NewForConfig will generate a rate-limiter in configShallowCopy.
func NewForConfig(c *rest.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
if configShallowCopy.Burst <= 0 {
return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
}
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
}
var cs Clientset
var err error
cs.authenticationV1alpha1, err = authenticationv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.configV1alpha2, err = configv1alpha2.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.networkingV1alpha3, err = networkingv1alpha3.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.rbacV1alpha1, err = rbacv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.securityV1beta1, err = securityv1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
return &cs, nil
}
// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.authenticationV1alpha1 = authenticationv1alpha1.NewForConfigOrDie(c)
cs.configV1alpha2 = configv1alpha2.NewForConfigOrDie(c)
cs.networkingV1alpha3 = networkingv1alpha3.NewForConfigOrDie(c)
cs.rbacV1alpha1 = rbacv1alpha1.NewForConfigOrDie(c)
cs.securityV1beta1 = securityv1beta1.NewForConfigOrDie(c)
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
return &cs
}
// New creates a new Clientset for the given RESTClient.
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.authenticationV1alpha1 = authenticationv1alpha1.New(c)
cs.configV1alpha2 = configv1alpha2.New(c)
cs.networkingV1alpha3 = networkingv1alpha3.New(c)
cs.rbacV1alpha1 = rbacv1alpha1.New(c)
cs.securityV1beta1 = securityv1beta1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated clientset.
package versioned

View File

@@ -0,0 +1,94 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
clientset "istio.io/client-go/pkg/clientset/versioned"
authenticationv1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/authentication/v1alpha1"
fakeauthenticationv1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/authentication/v1alpha1/fake"
configv1alpha2 "istio.io/client-go/pkg/clientset/versioned/typed/config/v1alpha2"
fakeconfigv1alpha2 "istio.io/client-go/pkg/clientset/versioned/typed/config/v1alpha2/fake"
networkingv1alpha3 "istio.io/client-go/pkg/clientset/versioned/typed/networking/v1alpha3"
fakenetworkingv1alpha3 "istio.io/client-go/pkg/clientset/versioned/typed/networking/v1alpha3/fake"
rbacv1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/rbac/v1alpha1"
fakerbacv1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/rbac/v1alpha1/fake"
securityv1beta1 "istio.io/client-go/pkg/clientset/versioned/typed/security/v1beta1"
fakesecurityv1beta1 "istio.io/client-go/pkg/clientset/versioned/typed/security/v1beta1/fake"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/discovery"
fakediscovery "k8s.io/client-go/discovery/fake"
"k8s.io/client-go/testing"
)
// NewSimpleClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
for _, obj := range objects {
if err := o.Add(obj); err != nil {
panic(err)
}
}
cs := &Clientset{tracker: o}
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
cs.AddReactor("*", "*", testing.ObjectReaction(o))
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
gvr := action.GetResource()
ns := action.GetNamespace()
watch, err := o.Watch(gvr, ns)
if err != nil {
return false, nil, err
}
return true, watch, nil
})
return cs
}
// Clientset implements clientset.Interface. Meant to be embedded into a
// struct to get a default implementation. This makes faking out just the method
// you want to test easier.
type Clientset struct {
testing.Fake
discovery *fakediscovery.FakeDiscovery
tracker testing.ObjectTracker
}
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
return c.discovery
}
func (c *Clientset) Tracker() testing.ObjectTracker {
return c.tracker
}
var _ clientset.Interface = &Clientset{}
// AuthenticationV1alpha1 retrieves the AuthenticationV1alpha1Client
func (c *Clientset) AuthenticationV1alpha1() authenticationv1alpha1.AuthenticationV1alpha1Interface {
return &fakeauthenticationv1alpha1.FakeAuthenticationV1alpha1{Fake: &c.Fake}
}
// ConfigV1alpha2 retrieves the ConfigV1alpha2Client
func (c *Clientset) ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface {
return &fakeconfigv1alpha2.FakeConfigV1alpha2{Fake: &c.Fake}
}
// NetworkingV1alpha3 retrieves the NetworkingV1alpha3Client
func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface {
return &fakenetworkingv1alpha3.FakeNetworkingV1alpha3{Fake: &c.Fake}
}
// RbacV1alpha1 retrieves the RbacV1alpha1Client
func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
}
// SecurityV1beta1 retrieves the SecurityV1beta1Client
func (c *Clientset) SecurityV1beta1() securityv1beta1.SecurityV1beta1Interface {
return &fakesecurityv1beta1.FakeSecurityV1beta1{Fake: &c.Fake}
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated fake clientset.
package fake

View File

@@ -0,0 +1,48 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
authenticationv1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
rbacv1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
securityv1beta1 "istio.io/client-go/pkg/apis/security/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
)
var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme)
var parameterCodec = runtime.NewParameterCodec(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
authenticationv1alpha1.AddToScheme,
configv1alpha2.AddToScheme,
networkingv1alpha3.AddToScheme,
rbacv1alpha1.AddToScheme,
securityv1beta1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in:
//
// import (
// "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// )
//
// kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
var AddToScheme = localSchemeBuilder.AddToScheme
func init() {
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
utilruntime.Must(AddToScheme(scheme))
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package contains the scheme of the automatically generated clientset.
package scheme

View File

@@ -0,0 +1,48 @@
// Code generated by client-gen. DO NOT EDIT.
package scheme
import (
authenticationv1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
networkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
rbacv1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
securityv1beta1 "istio.io/client-go/pkg/apis/security/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
)
var Scheme = runtime.NewScheme()
var Codecs = serializer.NewCodecFactory(Scheme)
var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
authenticationv1alpha1.AddToScheme,
configv1alpha2.AddToScheme,
networkingv1alpha3.AddToScheme,
rbacv1alpha1.AddToScheme,
securityv1beta1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in:
//
// import (
// "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// )
//
// kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
var AddToScheme = localSchemeBuilder.AddToScheme
func init() {
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
utilruntime.Must(AddToScheme(Scheme))
}

View File

@@ -0,0 +1,78 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
"istio.io/client-go/pkg/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type AuthenticationV1alpha1Interface interface {
RESTClient() rest.Interface
MeshPoliciesGetter
PoliciesGetter
}
// AuthenticationV1alpha1Client is used to interact with features provided by the authentication group.
type AuthenticationV1alpha1Client struct {
restClient rest.Interface
}
func (c *AuthenticationV1alpha1Client) MeshPolicies() MeshPolicyInterface {
return newMeshPolicies(c)
}
func (c *AuthenticationV1alpha1Client) Policies(namespace string) PolicyInterface {
return newPolicies(c, namespace)
}
// NewForConfig creates a new AuthenticationV1alpha1Client for the given config.
func NewForConfig(c *rest.Config) (*AuthenticationV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AuthenticationV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new AuthenticationV1alpha1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AuthenticationV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AuthenticationV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *AuthenticationV1alpha1Client {
return &AuthenticationV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AuthenticationV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha1

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,28 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/authentication/v1alpha1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeAuthenticationV1alpha1 struct {
*testing.Fake
}
func (c *FakeAuthenticationV1alpha1) MeshPolicies() v1alpha1.MeshPolicyInterface {
return &FakeMeshPolicies{c}
}
func (c *FakeAuthenticationV1alpha1) Policies(namespace string) v1alpha1.PolicyInterface {
return &FakePolicies{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAuthenticationV1alpha1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,104 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeMeshPolicies implements MeshPolicyInterface
type FakeMeshPolicies struct {
Fake *FakeAuthenticationV1alpha1
}
var meshpoliciesResource = schema.GroupVersionResource{Group: "authentication", Version: "v1alpha1", Resource: "meshpolicies"}
var meshpoliciesKind = schema.GroupVersionKind{Group: "authentication", Version: "v1alpha1", Kind: "MeshPolicy"}
// Get takes name of the meshPolicy, and returns the corresponding meshPolicy object, and an error if there is any.
func (c *FakeMeshPolicies) Get(name string, options v1.GetOptions) (result *v1alpha1.MeshPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(meshpoliciesResource, name), &v1alpha1.MeshPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.MeshPolicy), err
}
// List takes label and field selectors, and returns the list of MeshPolicies that match those selectors.
func (c *FakeMeshPolicies) List(opts v1.ListOptions) (result *v1alpha1.MeshPolicyList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(meshpoliciesResource, meshpoliciesKind, opts), &v1alpha1.MeshPolicyList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.MeshPolicyList{ListMeta: obj.(*v1alpha1.MeshPolicyList).ListMeta}
for _, item := range obj.(*v1alpha1.MeshPolicyList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested meshPolicies.
func (c *FakeMeshPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(meshpoliciesResource, opts))
}
// Create takes the representation of a meshPolicy and creates it. Returns the server's representation of the meshPolicy, and an error, if there is any.
func (c *FakeMeshPolicies) Create(meshPolicy *v1alpha1.MeshPolicy) (result *v1alpha1.MeshPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(meshpoliciesResource, meshPolicy), &v1alpha1.MeshPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.MeshPolicy), err
}
// Update takes the representation of a meshPolicy and updates it. Returns the server's representation of the meshPolicy, and an error, if there is any.
func (c *FakeMeshPolicies) Update(meshPolicy *v1alpha1.MeshPolicy) (result *v1alpha1.MeshPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(meshpoliciesResource, meshPolicy), &v1alpha1.MeshPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.MeshPolicy), err
}
// Delete takes name of the meshPolicy and deletes it. Returns an error if one occurs.
func (c *FakeMeshPolicies) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(meshpoliciesResource, name), &v1alpha1.MeshPolicy{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeMeshPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(meshpoliciesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.MeshPolicyList{})
return err
}
// Patch applies the patch and returns the patched meshPolicy.
func (c *FakeMeshPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MeshPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(meshpoliciesResource, name, pt, data, subresources...), &v1alpha1.MeshPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.MeshPolicy), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakePolicies implements PolicyInterface
type FakePolicies struct {
Fake *FakeAuthenticationV1alpha1
ns string
}
var policiesResource = schema.GroupVersionResource{Group: "authentication", Version: "v1alpha1", Resource: "policies"}
var policiesKind = schema.GroupVersionKind{Group: "authentication", Version: "v1alpha1", Kind: "Policy"}
// Get takes name of the policy, and returns the corresponding policy object, and an error if there is any.
func (c *FakePolicies) Get(name string, options v1.GetOptions) (result *v1alpha1.Policy, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(policiesResource, c.ns, name), &v1alpha1.Policy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.Policy), err
}
// List takes label and field selectors, and returns the list of Policies that match those selectors.
func (c *FakePolicies) List(opts v1.ListOptions) (result *v1alpha1.PolicyList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(policiesResource, policiesKind, c.ns, opts), &v1alpha1.PolicyList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.PolicyList{ListMeta: obj.(*v1alpha1.PolicyList).ListMeta}
for _, item := range obj.(*v1alpha1.PolicyList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested policies.
func (c *FakePolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(policiesResource, c.ns, opts))
}
// Create takes the representation of a policy and creates it. Returns the server's representation of the policy, and an error, if there is any.
func (c *FakePolicies) Create(policy *v1alpha1.Policy) (result *v1alpha1.Policy, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(policiesResource, c.ns, policy), &v1alpha1.Policy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.Policy), err
}
// Update takes the representation of a policy and updates it. Returns the server's representation of the policy, and an error, if there is any.
func (c *FakePolicies) Update(policy *v1alpha1.Policy) (result *v1alpha1.Policy, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(policiesResource, c.ns, policy), &v1alpha1.Policy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.Policy), err
}
// Delete takes name of the policy and deletes it. Returns an error if one occurs.
func (c *FakePolicies) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(policiesResource, c.ns, name), &v1alpha1.Policy{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakePolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(policiesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.PolicyList{})
return err
}
// Patch applies the patch and returns the patched policy.
func (c *FakePolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Policy, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(policiesResource, c.ns, name, pt, data, subresources...), &v1alpha1.Policy{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.Policy), err
}

View File

@@ -0,0 +1,7 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
type MeshPolicyExpansion interface{}
type PolicyExpansion interface{}

View File

@@ -0,0 +1,148 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"time"
v1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// MeshPoliciesGetter has a method to return a MeshPolicyInterface.
// A group's client should implement this interface.
type MeshPoliciesGetter interface {
MeshPolicies() MeshPolicyInterface
}
// MeshPolicyInterface has methods to work with MeshPolicy resources.
type MeshPolicyInterface interface {
Create(*v1alpha1.MeshPolicy) (*v1alpha1.MeshPolicy, error)
Update(*v1alpha1.MeshPolicy) (*v1alpha1.MeshPolicy, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.MeshPolicy, error)
List(opts v1.ListOptions) (*v1alpha1.MeshPolicyList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MeshPolicy, err error)
MeshPolicyExpansion
}
// meshPolicies implements MeshPolicyInterface
type meshPolicies struct {
client rest.Interface
}
// newMeshPolicies returns a MeshPolicies
func newMeshPolicies(c *AuthenticationV1alpha1Client) *meshPolicies {
return &meshPolicies{
client: c.RESTClient(),
}
}
// Get takes name of the meshPolicy, and returns the corresponding meshPolicy object, and an error if there is any.
func (c *meshPolicies) Get(name string, options v1.GetOptions) (result *v1alpha1.MeshPolicy, err error) {
result = &v1alpha1.MeshPolicy{}
err = c.client.Get().
Resource("meshpolicies").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of MeshPolicies that match those selectors.
func (c *meshPolicies) List(opts v1.ListOptions) (result *v1alpha1.MeshPolicyList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.MeshPolicyList{}
err = c.client.Get().
Resource("meshpolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested meshPolicies.
func (c *meshPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("meshpolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a meshPolicy and creates it. Returns the server's representation of the meshPolicy, and an error, if there is any.
func (c *meshPolicies) Create(meshPolicy *v1alpha1.MeshPolicy) (result *v1alpha1.MeshPolicy, err error) {
result = &v1alpha1.MeshPolicy{}
err = c.client.Post().
Resource("meshpolicies").
Body(meshPolicy).
Do().
Into(result)
return
}
// Update takes the representation of a meshPolicy and updates it. Returns the server's representation of the meshPolicy, and an error, if there is any.
func (c *meshPolicies) Update(meshPolicy *v1alpha1.MeshPolicy) (result *v1alpha1.MeshPolicy, err error) {
result = &v1alpha1.MeshPolicy{}
err = c.client.Put().
Resource("meshpolicies").
Name(meshPolicy.Name).
Body(meshPolicy).
Do().
Into(result)
return
}
// Delete takes name of the meshPolicy and deletes it. Returns an error if one occurs.
func (c *meshPolicies) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("meshpolicies").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *meshPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("meshpolicies").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched meshPolicy.
func (c *meshPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MeshPolicy, err error) {
result = &v1alpha1.MeshPolicy{}
err = c.client.Patch(pt).
Resource("meshpolicies").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"time"
v1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// PoliciesGetter has a method to return a PolicyInterface.
// A group's client should implement this interface.
type PoliciesGetter interface {
Policies(namespace string) PolicyInterface
}
// PolicyInterface has methods to work with Policy resources.
type PolicyInterface interface {
Create(*v1alpha1.Policy) (*v1alpha1.Policy, error)
Update(*v1alpha1.Policy) (*v1alpha1.Policy, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.Policy, error)
List(opts v1.ListOptions) (*v1alpha1.PolicyList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Policy, err error)
PolicyExpansion
}
// policies implements PolicyInterface
type policies struct {
client rest.Interface
ns string
}
// newPolicies returns a Policies
func newPolicies(c *AuthenticationV1alpha1Client, namespace string) *policies {
return &policies{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the policy, and returns the corresponding policy object, and an error if there is any.
func (c *policies) Get(name string, options v1.GetOptions) (result *v1alpha1.Policy, err error) {
result = &v1alpha1.Policy{}
err = c.client.Get().
Namespace(c.ns).
Resource("policies").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Policies that match those selectors.
func (c *policies) List(opts v1.ListOptions) (result *v1alpha1.PolicyList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.PolicyList{}
err = c.client.Get().
Namespace(c.ns).
Resource("policies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested policies.
func (c *policies) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("policies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a policy and creates it. Returns the server's representation of the policy, and an error, if there is any.
func (c *policies) Create(policy *v1alpha1.Policy) (result *v1alpha1.Policy, err error) {
result = &v1alpha1.Policy{}
err = c.client.Post().
Namespace(c.ns).
Resource("policies").
Body(policy).
Do().
Into(result)
return
}
// Update takes the representation of a policy and updates it. Returns the server's representation of the policy, and an error, if there is any.
func (c *policies) Update(policy *v1alpha1.Policy) (result *v1alpha1.Policy, err error) {
result = &v1alpha1.Policy{}
err = c.client.Put().
Namespace(c.ns).
Resource("policies").
Name(policy.Name).
Body(policy).
Do().
Into(result)
return
}
// Delete takes name of the policy and deletes it. Returns an error if one occurs.
func (c *policies) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("policies").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *policies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("policies").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched policy.
func (c *policies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Policy, err error) {
result = &v1alpha1.Policy{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("policies").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// AttributeManifestsGetter has a method to return a AttributeManifestInterface.
// A group's client should implement this interface.
type AttributeManifestsGetter interface {
AttributeManifests(namespace string) AttributeManifestInterface
}
// AttributeManifestInterface has methods to work with AttributeManifest resources.
type AttributeManifestInterface interface {
Create(*v1alpha2.AttributeManifest) (*v1alpha2.AttributeManifest, error)
Update(*v1alpha2.AttributeManifest) (*v1alpha2.AttributeManifest, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.AttributeManifest, error)
List(opts v1.ListOptions) (*v1alpha2.AttributeManifestList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.AttributeManifest, err error)
AttributeManifestExpansion
}
// attributeManifests implements AttributeManifestInterface
type attributeManifests struct {
client rest.Interface
ns string
}
// newAttributeManifests returns a AttributeManifests
func newAttributeManifests(c *ConfigV1alpha2Client, namespace string) *attributeManifests {
return &attributeManifests{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the attributeManifest, and returns the corresponding attributeManifest object, and an error if there is any.
func (c *attributeManifests) Get(name string, options v1.GetOptions) (result *v1alpha2.AttributeManifest, err error) {
result = &v1alpha2.AttributeManifest{}
err = c.client.Get().
Namespace(c.ns).
Resource("attributemanifests").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of AttributeManifests that match those selectors.
func (c *attributeManifests) List(opts v1.ListOptions) (result *v1alpha2.AttributeManifestList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.AttributeManifestList{}
err = c.client.Get().
Namespace(c.ns).
Resource("attributemanifests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested attributeManifests.
func (c *attributeManifests) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("attributemanifests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a attributeManifest and creates it. Returns the server's representation of the attributeManifest, and an error, if there is any.
func (c *attributeManifests) Create(attributeManifest *v1alpha2.AttributeManifest) (result *v1alpha2.AttributeManifest, err error) {
result = &v1alpha2.AttributeManifest{}
err = c.client.Post().
Namespace(c.ns).
Resource("attributemanifests").
Body(attributeManifest).
Do().
Into(result)
return
}
// Update takes the representation of a attributeManifest and updates it. Returns the server's representation of the attributeManifest, and an error, if there is any.
func (c *attributeManifests) Update(attributeManifest *v1alpha2.AttributeManifest) (result *v1alpha2.AttributeManifest, err error) {
result = &v1alpha2.AttributeManifest{}
err = c.client.Put().
Namespace(c.ns).
Resource("attributemanifests").
Name(attributeManifest.Name).
Body(attributeManifest).
Do().
Into(result)
return
}
// Delete takes name of the attributeManifest and deletes it. Returns an error if one occurs.
func (c *attributeManifests) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("attributemanifests").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *attributeManifests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("attributemanifests").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched attributeManifest.
func (c *attributeManifests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.AttributeManifest, err error) {
result = &v1alpha2.AttributeManifest{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("attributemanifests").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,108 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
"istio.io/client-go/pkg/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type ConfigV1alpha2Interface interface {
RESTClient() rest.Interface
AttributeManifestsGetter
HTTPAPISpecsGetter
HTTPAPISpecBindingsGetter
HandlersGetter
InstancesGetter
QuotaSpecsGetter
QuotaSpecBindingsGetter
RulesGetter
}
// ConfigV1alpha2Client is used to interact with features provided by the config group.
type ConfigV1alpha2Client struct {
restClient rest.Interface
}
func (c *ConfigV1alpha2Client) AttributeManifests(namespace string) AttributeManifestInterface {
return newAttributeManifests(c, namespace)
}
func (c *ConfigV1alpha2Client) HTTPAPISpecs(namespace string) HTTPAPISpecInterface {
return newHTTPAPISpecs(c, namespace)
}
func (c *ConfigV1alpha2Client) HTTPAPISpecBindings(namespace string) HTTPAPISpecBindingInterface {
return newHTTPAPISpecBindings(c, namespace)
}
func (c *ConfigV1alpha2Client) Handlers(namespace string) HandlerInterface {
return newHandlers(c, namespace)
}
func (c *ConfigV1alpha2Client) Instances(namespace string) InstanceInterface {
return newInstances(c, namespace)
}
func (c *ConfigV1alpha2Client) QuotaSpecs(namespace string) QuotaSpecInterface {
return newQuotaSpecs(c, namespace)
}
func (c *ConfigV1alpha2Client) QuotaSpecBindings(namespace string) QuotaSpecBindingInterface {
return newQuotaSpecBindings(c, namespace)
}
func (c *ConfigV1alpha2Client) Rules(namespace string) RuleInterface {
return newRules(c, namespace)
}
// NewForConfig creates a new ConfigV1alpha2Client for the given config.
func NewForConfig(c *rest.Config) (*ConfigV1alpha2Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &ConfigV1alpha2Client{client}, nil
}
// NewForConfigOrDie creates a new ConfigV1alpha2Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *ConfigV1alpha2Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new ConfigV1alpha2Client for the given RESTClient.
func New(c rest.Interface) *ConfigV1alpha2Client {
return &ConfigV1alpha2Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha2.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *ConfigV1alpha2Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha2

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeAttributeManifests implements AttributeManifestInterface
type FakeAttributeManifests struct {
Fake *FakeConfigV1alpha2
ns string
}
var attributemanifestsResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "attributemanifests"}
var attributemanifestsKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "AttributeManifest"}
// Get takes name of the attributeManifest, and returns the corresponding attributeManifest object, and an error if there is any.
func (c *FakeAttributeManifests) Get(name string, options v1.GetOptions) (result *v1alpha2.AttributeManifest, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(attributemanifestsResource, c.ns, name), &v1alpha2.AttributeManifest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.AttributeManifest), err
}
// List takes label and field selectors, and returns the list of AttributeManifests that match those selectors.
func (c *FakeAttributeManifests) List(opts v1.ListOptions) (result *v1alpha2.AttributeManifestList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(attributemanifestsResource, attributemanifestsKind, c.ns, opts), &v1alpha2.AttributeManifestList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.AttributeManifestList{ListMeta: obj.(*v1alpha2.AttributeManifestList).ListMeta}
for _, item := range obj.(*v1alpha2.AttributeManifestList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested attributeManifests.
func (c *FakeAttributeManifests) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(attributemanifestsResource, c.ns, opts))
}
// Create takes the representation of a attributeManifest and creates it. Returns the server's representation of the attributeManifest, and an error, if there is any.
func (c *FakeAttributeManifests) Create(attributeManifest *v1alpha2.AttributeManifest) (result *v1alpha2.AttributeManifest, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(attributemanifestsResource, c.ns, attributeManifest), &v1alpha2.AttributeManifest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.AttributeManifest), err
}
// Update takes the representation of a attributeManifest and updates it. Returns the server's representation of the attributeManifest, and an error, if there is any.
func (c *FakeAttributeManifests) Update(attributeManifest *v1alpha2.AttributeManifest) (result *v1alpha2.AttributeManifest, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(attributemanifestsResource, c.ns, attributeManifest), &v1alpha2.AttributeManifest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.AttributeManifest), err
}
// Delete takes name of the attributeManifest and deletes it. Returns an error if one occurs.
func (c *FakeAttributeManifests) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(attributemanifestsResource, c.ns, name), &v1alpha2.AttributeManifest{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeAttributeManifests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(attributemanifestsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.AttributeManifestList{})
return err
}
// Patch applies the patch and returns the patched attributeManifest.
func (c *FakeAttributeManifests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.AttributeManifest, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(attributemanifestsResource, c.ns, name, pt, data, subresources...), &v1alpha2.AttributeManifest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.AttributeManifest), err
}

View File

@@ -0,0 +1,52 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/clientset/versioned/typed/config/v1alpha2"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeConfigV1alpha2 struct {
*testing.Fake
}
func (c *FakeConfigV1alpha2) AttributeManifests(namespace string) v1alpha2.AttributeManifestInterface {
return &FakeAttributeManifests{c, namespace}
}
func (c *FakeConfigV1alpha2) HTTPAPISpecs(namespace string) v1alpha2.HTTPAPISpecInterface {
return &FakeHTTPAPISpecs{c, namespace}
}
func (c *FakeConfigV1alpha2) HTTPAPISpecBindings(namespace string) v1alpha2.HTTPAPISpecBindingInterface {
return &FakeHTTPAPISpecBindings{c, namespace}
}
func (c *FakeConfigV1alpha2) Handlers(namespace string) v1alpha2.HandlerInterface {
return &FakeHandlers{c, namespace}
}
func (c *FakeConfigV1alpha2) Instances(namespace string) v1alpha2.InstanceInterface {
return &FakeInstances{c, namespace}
}
func (c *FakeConfigV1alpha2) QuotaSpecs(namespace string) v1alpha2.QuotaSpecInterface {
return &FakeQuotaSpecs{c, namespace}
}
func (c *FakeConfigV1alpha2) QuotaSpecBindings(namespace string) v1alpha2.QuotaSpecBindingInterface {
return &FakeQuotaSpecBindings{c, namespace}
}
func (c *FakeConfigV1alpha2) Rules(namespace string) v1alpha2.RuleInterface {
return &FakeRules{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeConfigV1alpha2) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeHandlers implements HandlerInterface
type FakeHandlers struct {
Fake *FakeConfigV1alpha2
ns string
}
var handlersResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "handlers"}
var handlersKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "Handler"}
// Get takes name of the handler, and returns the corresponding handler object, and an error if there is any.
func (c *FakeHandlers) Get(name string, options v1.GetOptions) (result *v1alpha2.Handler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(handlersResource, c.ns, name), &v1alpha2.Handler{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Handler), err
}
// List takes label and field selectors, and returns the list of Handlers that match those selectors.
func (c *FakeHandlers) List(opts v1.ListOptions) (result *v1alpha2.HandlerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(handlersResource, handlersKind, c.ns, opts), &v1alpha2.HandlerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.HandlerList{ListMeta: obj.(*v1alpha2.HandlerList).ListMeta}
for _, item := range obj.(*v1alpha2.HandlerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested handlers.
func (c *FakeHandlers) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(handlersResource, c.ns, opts))
}
// Create takes the representation of a handler and creates it. Returns the server's representation of the handler, and an error, if there is any.
func (c *FakeHandlers) Create(handler *v1alpha2.Handler) (result *v1alpha2.Handler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(handlersResource, c.ns, handler), &v1alpha2.Handler{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Handler), err
}
// Update takes the representation of a handler and updates it. Returns the server's representation of the handler, and an error, if there is any.
func (c *FakeHandlers) Update(handler *v1alpha2.Handler) (result *v1alpha2.Handler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(handlersResource, c.ns, handler), &v1alpha2.Handler{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Handler), err
}
// Delete takes name of the handler and deletes it. Returns an error if one occurs.
func (c *FakeHandlers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(handlersResource, c.ns, name), &v1alpha2.Handler{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHandlers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(handlersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.HandlerList{})
return err
}
// Patch applies the patch and returns the patched handler.
func (c *FakeHandlers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Handler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(handlersResource, c.ns, name, pt, data, subresources...), &v1alpha2.Handler{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Handler), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeHTTPAPISpecs implements HTTPAPISpecInterface
type FakeHTTPAPISpecs struct {
Fake *FakeConfigV1alpha2
ns string
}
var httpapispecsResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "httpapispecs"}
var httpapispecsKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "HTTPAPISpec"}
// Get takes name of the hTTPAPISpec, and returns the corresponding hTTPAPISpec object, and an error if there is any.
func (c *FakeHTTPAPISpecs) Get(name string, options v1.GetOptions) (result *v1alpha2.HTTPAPISpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(httpapispecsResource, c.ns, name), &v1alpha2.HTTPAPISpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpec), err
}
// List takes label and field selectors, and returns the list of HTTPAPISpecs that match those selectors.
func (c *FakeHTTPAPISpecs) List(opts v1.ListOptions) (result *v1alpha2.HTTPAPISpecList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(httpapispecsResource, httpapispecsKind, c.ns, opts), &v1alpha2.HTTPAPISpecList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.HTTPAPISpecList{ListMeta: obj.(*v1alpha2.HTTPAPISpecList).ListMeta}
for _, item := range obj.(*v1alpha2.HTTPAPISpecList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested hTTPAPISpecs.
func (c *FakeHTTPAPISpecs) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(httpapispecsResource, c.ns, opts))
}
// Create takes the representation of a hTTPAPISpec and creates it. Returns the server's representation of the hTTPAPISpec, and an error, if there is any.
func (c *FakeHTTPAPISpecs) Create(hTTPAPISpec *v1alpha2.HTTPAPISpec) (result *v1alpha2.HTTPAPISpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(httpapispecsResource, c.ns, hTTPAPISpec), &v1alpha2.HTTPAPISpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpec), err
}
// Update takes the representation of a hTTPAPISpec and updates it. Returns the server's representation of the hTTPAPISpec, and an error, if there is any.
func (c *FakeHTTPAPISpecs) Update(hTTPAPISpec *v1alpha2.HTTPAPISpec) (result *v1alpha2.HTTPAPISpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(httpapispecsResource, c.ns, hTTPAPISpec), &v1alpha2.HTTPAPISpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpec), err
}
// Delete takes name of the hTTPAPISpec and deletes it. Returns an error if one occurs.
func (c *FakeHTTPAPISpecs) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(httpapispecsResource, c.ns, name), &v1alpha2.HTTPAPISpec{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHTTPAPISpecs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(httpapispecsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.HTTPAPISpecList{})
return err
}
// Patch applies the patch and returns the patched hTTPAPISpec.
func (c *FakeHTTPAPISpecs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.HTTPAPISpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(httpapispecsResource, c.ns, name, pt, data, subresources...), &v1alpha2.HTTPAPISpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpec), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeHTTPAPISpecBindings implements HTTPAPISpecBindingInterface
type FakeHTTPAPISpecBindings struct {
Fake *FakeConfigV1alpha2
ns string
}
var httpapispecbindingsResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "httpapispecbindings"}
var httpapispecbindingsKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "HTTPAPISpecBinding"}
// Get takes name of the hTTPAPISpecBinding, and returns the corresponding hTTPAPISpecBinding object, and an error if there is any.
func (c *FakeHTTPAPISpecBindings) Get(name string, options v1.GetOptions) (result *v1alpha2.HTTPAPISpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(httpapispecbindingsResource, c.ns, name), &v1alpha2.HTTPAPISpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpecBinding), err
}
// List takes label and field selectors, and returns the list of HTTPAPISpecBindings that match those selectors.
func (c *FakeHTTPAPISpecBindings) List(opts v1.ListOptions) (result *v1alpha2.HTTPAPISpecBindingList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(httpapispecbindingsResource, httpapispecbindingsKind, c.ns, opts), &v1alpha2.HTTPAPISpecBindingList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.HTTPAPISpecBindingList{ListMeta: obj.(*v1alpha2.HTTPAPISpecBindingList).ListMeta}
for _, item := range obj.(*v1alpha2.HTTPAPISpecBindingList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested hTTPAPISpecBindings.
func (c *FakeHTTPAPISpecBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(httpapispecbindingsResource, c.ns, opts))
}
// Create takes the representation of a hTTPAPISpecBinding and creates it. Returns the server's representation of the hTTPAPISpecBinding, and an error, if there is any.
func (c *FakeHTTPAPISpecBindings) Create(hTTPAPISpecBinding *v1alpha2.HTTPAPISpecBinding) (result *v1alpha2.HTTPAPISpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(httpapispecbindingsResource, c.ns, hTTPAPISpecBinding), &v1alpha2.HTTPAPISpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpecBinding), err
}
// Update takes the representation of a hTTPAPISpecBinding and updates it. Returns the server's representation of the hTTPAPISpecBinding, and an error, if there is any.
func (c *FakeHTTPAPISpecBindings) Update(hTTPAPISpecBinding *v1alpha2.HTTPAPISpecBinding) (result *v1alpha2.HTTPAPISpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(httpapispecbindingsResource, c.ns, hTTPAPISpecBinding), &v1alpha2.HTTPAPISpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpecBinding), err
}
// Delete takes name of the hTTPAPISpecBinding and deletes it. Returns an error if one occurs.
func (c *FakeHTTPAPISpecBindings) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(httpapispecbindingsResource, c.ns, name), &v1alpha2.HTTPAPISpecBinding{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHTTPAPISpecBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(httpapispecbindingsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.HTTPAPISpecBindingList{})
return err
}
// Patch applies the patch and returns the patched hTTPAPISpecBinding.
func (c *FakeHTTPAPISpecBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.HTTPAPISpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(httpapispecbindingsResource, c.ns, name, pt, data, subresources...), &v1alpha2.HTTPAPISpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.HTTPAPISpecBinding), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeInstances implements InstanceInterface
type FakeInstances struct {
Fake *FakeConfigV1alpha2
ns string
}
var instancesResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "instances"}
var instancesKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "Instance"}
// Get takes name of the instance, and returns the corresponding instance object, and an error if there is any.
func (c *FakeInstances) Get(name string, options v1.GetOptions) (result *v1alpha2.Instance, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(instancesResource, c.ns, name), &v1alpha2.Instance{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Instance), err
}
// List takes label and field selectors, and returns the list of Instances that match those selectors.
func (c *FakeInstances) List(opts v1.ListOptions) (result *v1alpha2.InstanceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(instancesResource, instancesKind, c.ns, opts), &v1alpha2.InstanceList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.InstanceList{ListMeta: obj.(*v1alpha2.InstanceList).ListMeta}
for _, item := range obj.(*v1alpha2.InstanceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested instances.
func (c *FakeInstances) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(instancesResource, c.ns, opts))
}
// Create takes the representation of a instance and creates it. Returns the server's representation of the instance, and an error, if there is any.
func (c *FakeInstances) Create(instance *v1alpha2.Instance) (result *v1alpha2.Instance, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(instancesResource, c.ns, instance), &v1alpha2.Instance{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Instance), err
}
// Update takes the representation of a instance and updates it. Returns the server's representation of the instance, and an error, if there is any.
func (c *FakeInstances) Update(instance *v1alpha2.Instance) (result *v1alpha2.Instance, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(instancesResource, c.ns, instance), &v1alpha2.Instance{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Instance), err
}
// Delete takes name of the instance and deletes it. Returns an error if one occurs.
func (c *FakeInstances) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(instancesResource, c.ns, name), &v1alpha2.Instance{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeInstances) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(instancesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.InstanceList{})
return err
}
// Patch applies the patch and returns the patched instance.
func (c *FakeInstances) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Instance, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(instancesResource, c.ns, name, pt, data, subresources...), &v1alpha2.Instance{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Instance), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeQuotaSpecs implements QuotaSpecInterface
type FakeQuotaSpecs struct {
Fake *FakeConfigV1alpha2
ns string
}
var quotaspecsResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "quotaspecs"}
var quotaspecsKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "QuotaSpec"}
// Get takes name of the quotaSpec, and returns the corresponding quotaSpec object, and an error if there is any.
func (c *FakeQuotaSpecs) Get(name string, options v1.GetOptions) (result *v1alpha2.QuotaSpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(quotaspecsResource, c.ns, name), &v1alpha2.QuotaSpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpec), err
}
// List takes label and field selectors, and returns the list of QuotaSpecs that match those selectors.
func (c *FakeQuotaSpecs) List(opts v1.ListOptions) (result *v1alpha2.QuotaSpecList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(quotaspecsResource, quotaspecsKind, c.ns, opts), &v1alpha2.QuotaSpecList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.QuotaSpecList{ListMeta: obj.(*v1alpha2.QuotaSpecList).ListMeta}
for _, item := range obj.(*v1alpha2.QuotaSpecList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested quotaSpecs.
func (c *FakeQuotaSpecs) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(quotaspecsResource, c.ns, opts))
}
// Create takes the representation of a quotaSpec and creates it. Returns the server's representation of the quotaSpec, and an error, if there is any.
func (c *FakeQuotaSpecs) Create(quotaSpec *v1alpha2.QuotaSpec) (result *v1alpha2.QuotaSpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(quotaspecsResource, c.ns, quotaSpec), &v1alpha2.QuotaSpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpec), err
}
// Update takes the representation of a quotaSpec and updates it. Returns the server's representation of the quotaSpec, and an error, if there is any.
func (c *FakeQuotaSpecs) Update(quotaSpec *v1alpha2.QuotaSpec) (result *v1alpha2.QuotaSpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(quotaspecsResource, c.ns, quotaSpec), &v1alpha2.QuotaSpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpec), err
}
// Delete takes name of the quotaSpec and deletes it. Returns an error if one occurs.
func (c *FakeQuotaSpecs) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(quotaspecsResource, c.ns, name), &v1alpha2.QuotaSpec{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeQuotaSpecs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(quotaspecsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.QuotaSpecList{})
return err
}
// Patch applies the patch and returns the patched quotaSpec.
func (c *FakeQuotaSpecs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.QuotaSpec, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(quotaspecsResource, c.ns, name, pt, data, subresources...), &v1alpha2.QuotaSpec{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpec), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeQuotaSpecBindings implements QuotaSpecBindingInterface
type FakeQuotaSpecBindings struct {
Fake *FakeConfigV1alpha2
ns string
}
var quotaspecbindingsResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "quotaspecbindings"}
var quotaspecbindingsKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "QuotaSpecBinding"}
// Get takes name of the quotaSpecBinding, and returns the corresponding quotaSpecBinding object, and an error if there is any.
func (c *FakeQuotaSpecBindings) Get(name string, options v1.GetOptions) (result *v1alpha2.QuotaSpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(quotaspecbindingsResource, c.ns, name), &v1alpha2.QuotaSpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpecBinding), err
}
// List takes label and field selectors, and returns the list of QuotaSpecBindings that match those selectors.
func (c *FakeQuotaSpecBindings) List(opts v1.ListOptions) (result *v1alpha2.QuotaSpecBindingList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(quotaspecbindingsResource, quotaspecbindingsKind, c.ns, opts), &v1alpha2.QuotaSpecBindingList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.QuotaSpecBindingList{ListMeta: obj.(*v1alpha2.QuotaSpecBindingList).ListMeta}
for _, item := range obj.(*v1alpha2.QuotaSpecBindingList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested quotaSpecBindings.
func (c *FakeQuotaSpecBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(quotaspecbindingsResource, c.ns, opts))
}
// Create takes the representation of a quotaSpecBinding and creates it. Returns the server's representation of the quotaSpecBinding, and an error, if there is any.
func (c *FakeQuotaSpecBindings) Create(quotaSpecBinding *v1alpha2.QuotaSpecBinding) (result *v1alpha2.QuotaSpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(quotaspecbindingsResource, c.ns, quotaSpecBinding), &v1alpha2.QuotaSpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpecBinding), err
}
// Update takes the representation of a quotaSpecBinding and updates it. Returns the server's representation of the quotaSpecBinding, and an error, if there is any.
func (c *FakeQuotaSpecBindings) Update(quotaSpecBinding *v1alpha2.QuotaSpecBinding) (result *v1alpha2.QuotaSpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(quotaspecbindingsResource, c.ns, quotaSpecBinding), &v1alpha2.QuotaSpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpecBinding), err
}
// Delete takes name of the quotaSpecBinding and deletes it. Returns an error if one occurs.
func (c *FakeQuotaSpecBindings) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(quotaspecbindingsResource, c.ns, name), &v1alpha2.QuotaSpecBinding{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeQuotaSpecBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(quotaspecbindingsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.QuotaSpecBindingList{})
return err
}
// Patch applies the patch and returns the patched quotaSpecBinding.
func (c *FakeQuotaSpecBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.QuotaSpecBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(quotaspecbindingsResource, c.ns, name, pt, data, subresources...), &v1alpha2.QuotaSpecBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.QuotaSpecBinding), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeRules implements RuleInterface
type FakeRules struct {
Fake *FakeConfigV1alpha2
ns string
}
var rulesResource = schema.GroupVersionResource{Group: "config", Version: "v1alpha2", Resource: "rules"}
var rulesKind = schema.GroupVersionKind{Group: "config", Version: "v1alpha2", Kind: "Rule"}
// Get takes name of the rule, and returns the corresponding rule object, and an error if there is any.
func (c *FakeRules) Get(name string, options v1.GetOptions) (result *v1alpha2.Rule, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(rulesResource, c.ns, name), &v1alpha2.Rule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Rule), err
}
// List takes label and field selectors, and returns the list of Rules that match those selectors.
func (c *FakeRules) List(opts v1.ListOptions) (result *v1alpha2.RuleList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(rulesResource, rulesKind, c.ns, opts), &v1alpha2.RuleList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha2.RuleList{ListMeta: obj.(*v1alpha2.RuleList).ListMeta}
for _, item := range obj.(*v1alpha2.RuleList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested rules.
func (c *FakeRules) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(rulesResource, c.ns, opts))
}
// Create takes the representation of a rule and creates it. Returns the server's representation of the rule, and an error, if there is any.
func (c *FakeRules) Create(rule *v1alpha2.Rule) (result *v1alpha2.Rule, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(rulesResource, c.ns, rule), &v1alpha2.Rule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Rule), err
}
// Update takes the representation of a rule and updates it. Returns the server's representation of the rule, and an error, if there is any.
func (c *FakeRules) Update(rule *v1alpha2.Rule) (result *v1alpha2.Rule, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(rulesResource, c.ns, rule), &v1alpha2.Rule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Rule), err
}
// Delete takes name of the rule and deletes it. Returns an error if one occurs.
func (c *FakeRules) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(rulesResource, c.ns, name), &v1alpha2.Rule{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeRules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(rulesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha2.RuleList{})
return err
}
// Patch applies the patch and returns the patched rule.
func (c *FakeRules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Rule, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(rulesResource, c.ns, name, pt, data, subresources...), &v1alpha2.Rule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha2.Rule), err
}

View File

@@ -0,0 +1,19 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
type AttributeManifestExpansion interface{}
type HTTPAPISpecExpansion interface{}
type HTTPAPISpecBindingExpansion interface{}
type HandlerExpansion interface{}
type InstanceExpansion interface{}
type QuotaSpecExpansion interface{}
type QuotaSpecBindingExpansion interface{}
type RuleExpansion interface{}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// HandlersGetter has a method to return a HandlerInterface.
// A group's client should implement this interface.
type HandlersGetter interface {
Handlers(namespace string) HandlerInterface
}
// HandlerInterface has methods to work with Handler resources.
type HandlerInterface interface {
Create(*v1alpha2.Handler) (*v1alpha2.Handler, error)
Update(*v1alpha2.Handler) (*v1alpha2.Handler, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.Handler, error)
List(opts v1.ListOptions) (*v1alpha2.HandlerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Handler, err error)
HandlerExpansion
}
// handlers implements HandlerInterface
type handlers struct {
client rest.Interface
ns string
}
// newHandlers returns a Handlers
func newHandlers(c *ConfigV1alpha2Client, namespace string) *handlers {
return &handlers{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the handler, and returns the corresponding handler object, and an error if there is any.
func (c *handlers) Get(name string, options v1.GetOptions) (result *v1alpha2.Handler, err error) {
result = &v1alpha2.Handler{}
err = c.client.Get().
Namespace(c.ns).
Resource("handlers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Handlers that match those selectors.
func (c *handlers) List(opts v1.ListOptions) (result *v1alpha2.HandlerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.HandlerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("handlers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested handlers.
func (c *handlers) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("handlers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a handler and creates it. Returns the server's representation of the handler, and an error, if there is any.
func (c *handlers) Create(handler *v1alpha2.Handler) (result *v1alpha2.Handler, err error) {
result = &v1alpha2.Handler{}
err = c.client.Post().
Namespace(c.ns).
Resource("handlers").
Body(handler).
Do().
Into(result)
return
}
// Update takes the representation of a handler and updates it. Returns the server's representation of the handler, and an error, if there is any.
func (c *handlers) Update(handler *v1alpha2.Handler) (result *v1alpha2.Handler, err error) {
result = &v1alpha2.Handler{}
err = c.client.Put().
Namespace(c.ns).
Resource("handlers").
Name(handler.Name).
Body(handler).
Do().
Into(result)
return
}
// Delete takes name of the handler and deletes it. Returns an error if one occurs.
func (c *handlers) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("handlers").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *handlers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("handlers").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched handler.
func (c *handlers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Handler, err error) {
result = &v1alpha2.Handler{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("handlers").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// HTTPAPISpecsGetter has a method to return a HTTPAPISpecInterface.
// A group's client should implement this interface.
type HTTPAPISpecsGetter interface {
HTTPAPISpecs(namespace string) HTTPAPISpecInterface
}
// HTTPAPISpecInterface has methods to work with HTTPAPISpec resources.
type HTTPAPISpecInterface interface {
Create(*v1alpha2.HTTPAPISpec) (*v1alpha2.HTTPAPISpec, error)
Update(*v1alpha2.HTTPAPISpec) (*v1alpha2.HTTPAPISpec, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.HTTPAPISpec, error)
List(opts v1.ListOptions) (*v1alpha2.HTTPAPISpecList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.HTTPAPISpec, err error)
HTTPAPISpecExpansion
}
// hTTPAPISpecs implements HTTPAPISpecInterface
type hTTPAPISpecs struct {
client rest.Interface
ns string
}
// newHTTPAPISpecs returns a HTTPAPISpecs
func newHTTPAPISpecs(c *ConfigV1alpha2Client, namespace string) *hTTPAPISpecs {
return &hTTPAPISpecs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the hTTPAPISpec, and returns the corresponding hTTPAPISpec object, and an error if there is any.
func (c *hTTPAPISpecs) Get(name string, options v1.GetOptions) (result *v1alpha2.HTTPAPISpec, err error) {
result = &v1alpha2.HTTPAPISpec{}
err = c.client.Get().
Namespace(c.ns).
Resource("httpapispecs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of HTTPAPISpecs that match those selectors.
func (c *hTTPAPISpecs) List(opts v1.ListOptions) (result *v1alpha2.HTTPAPISpecList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.HTTPAPISpecList{}
err = c.client.Get().
Namespace(c.ns).
Resource("httpapispecs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested hTTPAPISpecs.
func (c *hTTPAPISpecs) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("httpapispecs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a hTTPAPISpec and creates it. Returns the server's representation of the hTTPAPISpec, and an error, if there is any.
func (c *hTTPAPISpecs) Create(hTTPAPISpec *v1alpha2.HTTPAPISpec) (result *v1alpha2.HTTPAPISpec, err error) {
result = &v1alpha2.HTTPAPISpec{}
err = c.client.Post().
Namespace(c.ns).
Resource("httpapispecs").
Body(hTTPAPISpec).
Do().
Into(result)
return
}
// Update takes the representation of a hTTPAPISpec and updates it. Returns the server's representation of the hTTPAPISpec, and an error, if there is any.
func (c *hTTPAPISpecs) Update(hTTPAPISpec *v1alpha2.HTTPAPISpec) (result *v1alpha2.HTTPAPISpec, err error) {
result = &v1alpha2.HTTPAPISpec{}
err = c.client.Put().
Namespace(c.ns).
Resource("httpapispecs").
Name(hTTPAPISpec.Name).
Body(hTTPAPISpec).
Do().
Into(result)
return
}
// Delete takes name of the hTTPAPISpec and deletes it. Returns an error if one occurs.
func (c *hTTPAPISpecs) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("httpapispecs").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *hTTPAPISpecs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("httpapispecs").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched hTTPAPISpec.
func (c *hTTPAPISpecs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.HTTPAPISpec, err error) {
result = &v1alpha2.HTTPAPISpec{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("httpapispecs").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// HTTPAPISpecBindingsGetter has a method to return a HTTPAPISpecBindingInterface.
// A group's client should implement this interface.
type HTTPAPISpecBindingsGetter interface {
HTTPAPISpecBindings(namespace string) HTTPAPISpecBindingInterface
}
// HTTPAPISpecBindingInterface has methods to work with HTTPAPISpecBinding resources.
type HTTPAPISpecBindingInterface interface {
Create(*v1alpha2.HTTPAPISpecBinding) (*v1alpha2.HTTPAPISpecBinding, error)
Update(*v1alpha2.HTTPAPISpecBinding) (*v1alpha2.HTTPAPISpecBinding, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.HTTPAPISpecBinding, error)
List(opts v1.ListOptions) (*v1alpha2.HTTPAPISpecBindingList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.HTTPAPISpecBinding, err error)
HTTPAPISpecBindingExpansion
}
// hTTPAPISpecBindings implements HTTPAPISpecBindingInterface
type hTTPAPISpecBindings struct {
client rest.Interface
ns string
}
// newHTTPAPISpecBindings returns a HTTPAPISpecBindings
func newHTTPAPISpecBindings(c *ConfigV1alpha2Client, namespace string) *hTTPAPISpecBindings {
return &hTTPAPISpecBindings{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the hTTPAPISpecBinding, and returns the corresponding hTTPAPISpecBinding object, and an error if there is any.
func (c *hTTPAPISpecBindings) Get(name string, options v1.GetOptions) (result *v1alpha2.HTTPAPISpecBinding, err error) {
result = &v1alpha2.HTTPAPISpecBinding{}
err = c.client.Get().
Namespace(c.ns).
Resource("httpapispecbindings").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of HTTPAPISpecBindings that match those selectors.
func (c *hTTPAPISpecBindings) List(opts v1.ListOptions) (result *v1alpha2.HTTPAPISpecBindingList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.HTTPAPISpecBindingList{}
err = c.client.Get().
Namespace(c.ns).
Resource("httpapispecbindings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested hTTPAPISpecBindings.
func (c *hTTPAPISpecBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("httpapispecbindings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a hTTPAPISpecBinding and creates it. Returns the server's representation of the hTTPAPISpecBinding, and an error, if there is any.
func (c *hTTPAPISpecBindings) Create(hTTPAPISpecBinding *v1alpha2.HTTPAPISpecBinding) (result *v1alpha2.HTTPAPISpecBinding, err error) {
result = &v1alpha2.HTTPAPISpecBinding{}
err = c.client.Post().
Namespace(c.ns).
Resource("httpapispecbindings").
Body(hTTPAPISpecBinding).
Do().
Into(result)
return
}
// Update takes the representation of a hTTPAPISpecBinding and updates it. Returns the server's representation of the hTTPAPISpecBinding, and an error, if there is any.
func (c *hTTPAPISpecBindings) Update(hTTPAPISpecBinding *v1alpha2.HTTPAPISpecBinding) (result *v1alpha2.HTTPAPISpecBinding, err error) {
result = &v1alpha2.HTTPAPISpecBinding{}
err = c.client.Put().
Namespace(c.ns).
Resource("httpapispecbindings").
Name(hTTPAPISpecBinding.Name).
Body(hTTPAPISpecBinding).
Do().
Into(result)
return
}
// Delete takes name of the hTTPAPISpecBinding and deletes it. Returns an error if one occurs.
func (c *hTTPAPISpecBindings) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("httpapispecbindings").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *hTTPAPISpecBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("httpapispecbindings").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched hTTPAPISpecBinding.
func (c *hTTPAPISpecBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.HTTPAPISpecBinding, err error) {
result = &v1alpha2.HTTPAPISpecBinding{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("httpapispecbindings").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// InstancesGetter has a method to return a InstanceInterface.
// A group's client should implement this interface.
type InstancesGetter interface {
Instances(namespace string) InstanceInterface
}
// InstanceInterface has methods to work with Instance resources.
type InstanceInterface interface {
Create(*v1alpha2.Instance) (*v1alpha2.Instance, error)
Update(*v1alpha2.Instance) (*v1alpha2.Instance, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.Instance, error)
List(opts v1.ListOptions) (*v1alpha2.InstanceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Instance, err error)
InstanceExpansion
}
// instances implements InstanceInterface
type instances struct {
client rest.Interface
ns string
}
// newInstances returns a Instances
func newInstances(c *ConfigV1alpha2Client, namespace string) *instances {
return &instances{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the instance, and returns the corresponding instance object, and an error if there is any.
func (c *instances) Get(name string, options v1.GetOptions) (result *v1alpha2.Instance, err error) {
result = &v1alpha2.Instance{}
err = c.client.Get().
Namespace(c.ns).
Resource("instances").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Instances that match those selectors.
func (c *instances) List(opts v1.ListOptions) (result *v1alpha2.InstanceList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.InstanceList{}
err = c.client.Get().
Namespace(c.ns).
Resource("instances").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested instances.
func (c *instances) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("instances").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a instance and creates it. Returns the server's representation of the instance, and an error, if there is any.
func (c *instances) Create(instance *v1alpha2.Instance) (result *v1alpha2.Instance, err error) {
result = &v1alpha2.Instance{}
err = c.client.Post().
Namespace(c.ns).
Resource("instances").
Body(instance).
Do().
Into(result)
return
}
// Update takes the representation of a instance and updates it. Returns the server's representation of the instance, and an error, if there is any.
func (c *instances) Update(instance *v1alpha2.Instance) (result *v1alpha2.Instance, err error) {
result = &v1alpha2.Instance{}
err = c.client.Put().
Namespace(c.ns).
Resource("instances").
Name(instance.Name).
Body(instance).
Do().
Into(result)
return
}
// Delete takes name of the instance and deletes it. Returns an error if one occurs.
func (c *instances) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("instances").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *instances) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("instances").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched instance.
func (c *instances) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Instance, err error) {
result = &v1alpha2.Instance{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("instances").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// QuotaSpecsGetter has a method to return a QuotaSpecInterface.
// A group's client should implement this interface.
type QuotaSpecsGetter interface {
QuotaSpecs(namespace string) QuotaSpecInterface
}
// QuotaSpecInterface has methods to work with QuotaSpec resources.
type QuotaSpecInterface interface {
Create(*v1alpha2.QuotaSpec) (*v1alpha2.QuotaSpec, error)
Update(*v1alpha2.QuotaSpec) (*v1alpha2.QuotaSpec, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.QuotaSpec, error)
List(opts v1.ListOptions) (*v1alpha2.QuotaSpecList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.QuotaSpec, err error)
QuotaSpecExpansion
}
// quotaSpecs implements QuotaSpecInterface
type quotaSpecs struct {
client rest.Interface
ns string
}
// newQuotaSpecs returns a QuotaSpecs
func newQuotaSpecs(c *ConfigV1alpha2Client, namespace string) *quotaSpecs {
return &quotaSpecs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the quotaSpec, and returns the corresponding quotaSpec object, and an error if there is any.
func (c *quotaSpecs) Get(name string, options v1.GetOptions) (result *v1alpha2.QuotaSpec, err error) {
result = &v1alpha2.QuotaSpec{}
err = c.client.Get().
Namespace(c.ns).
Resource("quotaspecs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of QuotaSpecs that match those selectors.
func (c *quotaSpecs) List(opts v1.ListOptions) (result *v1alpha2.QuotaSpecList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.QuotaSpecList{}
err = c.client.Get().
Namespace(c.ns).
Resource("quotaspecs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested quotaSpecs.
func (c *quotaSpecs) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("quotaspecs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a quotaSpec and creates it. Returns the server's representation of the quotaSpec, and an error, if there is any.
func (c *quotaSpecs) Create(quotaSpec *v1alpha2.QuotaSpec) (result *v1alpha2.QuotaSpec, err error) {
result = &v1alpha2.QuotaSpec{}
err = c.client.Post().
Namespace(c.ns).
Resource("quotaspecs").
Body(quotaSpec).
Do().
Into(result)
return
}
// Update takes the representation of a quotaSpec and updates it. Returns the server's representation of the quotaSpec, and an error, if there is any.
func (c *quotaSpecs) Update(quotaSpec *v1alpha2.QuotaSpec) (result *v1alpha2.QuotaSpec, err error) {
result = &v1alpha2.QuotaSpec{}
err = c.client.Put().
Namespace(c.ns).
Resource("quotaspecs").
Name(quotaSpec.Name).
Body(quotaSpec).
Do().
Into(result)
return
}
// Delete takes name of the quotaSpec and deletes it. Returns an error if one occurs.
func (c *quotaSpecs) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("quotaspecs").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *quotaSpecs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("quotaspecs").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched quotaSpec.
func (c *quotaSpecs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.QuotaSpec, err error) {
result = &v1alpha2.QuotaSpec{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("quotaspecs").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// QuotaSpecBindingsGetter has a method to return a QuotaSpecBindingInterface.
// A group's client should implement this interface.
type QuotaSpecBindingsGetter interface {
QuotaSpecBindings(namespace string) QuotaSpecBindingInterface
}
// QuotaSpecBindingInterface has methods to work with QuotaSpecBinding resources.
type QuotaSpecBindingInterface interface {
Create(*v1alpha2.QuotaSpecBinding) (*v1alpha2.QuotaSpecBinding, error)
Update(*v1alpha2.QuotaSpecBinding) (*v1alpha2.QuotaSpecBinding, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.QuotaSpecBinding, error)
List(opts v1.ListOptions) (*v1alpha2.QuotaSpecBindingList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.QuotaSpecBinding, err error)
QuotaSpecBindingExpansion
}
// quotaSpecBindings implements QuotaSpecBindingInterface
type quotaSpecBindings struct {
client rest.Interface
ns string
}
// newQuotaSpecBindings returns a QuotaSpecBindings
func newQuotaSpecBindings(c *ConfigV1alpha2Client, namespace string) *quotaSpecBindings {
return &quotaSpecBindings{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the quotaSpecBinding, and returns the corresponding quotaSpecBinding object, and an error if there is any.
func (c *quotaSpecBindings) Get(name string, options v1.GetOptions) (result *v1alpha2.QuotaSpecBinding, err error) {
result = &v1alpha2.QuotaSpecBinding{}
err = c.client.Get().
Namespace(c.ns).
Resource("quotaspecbindings").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of QuotaSpecBindings that match those selectors.
func (c *quotaSpecBindings) List(opts v1.ListOptions) (result *v1alpha2.QuotaSpecBindingList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.QuotaSpecBindingList{}
err = c.client.Get().
Namespace(c.ns).
Resource("quotaspecbindings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested quotaSpecBindings.
func (c *quotaSpecBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("quotaspecbindings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a quotaSpecBinding and creates it. Returns the server's representation of the quotaSpecBinding, and an error, if there is any.
func (c *quotaSpecBindings) Create(quotaSpecBinding *v1alpha2.QuotaSpecBinding) (result *v1alpha2.QuotaSpecBinding, err error) {
result = &v1alpha2.QuotaSpecBinding{}
err = c.client.Post().
Namespace(c.ns).
Resource("quotaspecbindings").
Body(quotaSpecBinding).
Do().
Into(result)
return
}
// Update takes the representation of a quotaSpecBinding and updates it. Returns the server's representation of the quotaSpecBinding, and an error, if there is any.
func (c *quotaSpecBindings) Update(quotaSpecBinding *v1alpha2.QuotaSpecBinding) (result *v1alpha2.QuotaSpecBinding, err error) {
result = &v1alpha2.QuotaSpecBinding{}
err = c.client.Put().
Namespace(c.ns).
Resource("quotaspecbindings").
Name(quotaSpecBinding.Name).
Body(quotaSpecBinding).
Do().
Into(result)
return
}
// Delete takes name of the quotaSpecBinding and deletes it. Returns an error if one occurs.
func (c *quotaSpecBindings) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("quotaspecbindings").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *quotaSpecBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("quotaspecbindings").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched quotaSpecBinding.
func (c *quotaSpecBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.QuotaSpecBinding, err error) {
result = &v1alpha2.QuotaSpecBinding{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("quotaspecbindings").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha2
import (
"time"
v1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// RulesGetter has a method to return a RuleInterface.
// A group's client should implement this interface.
type RulesGetter interface {
Rules(namespace string) RuleInterface
}
// RuleInterface has methods to work with Rule resources.
type RuleInterface interface {
Create(*v1alpha2.Rule) (*v1alpha2.Rule, error)
Update(*v1alpha2.Rule) (*v1alpha2.Rule, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha2.Rule, error)
List(opts v1.ListOptions) (*v1alpha2.RuleList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Rule, err error)
RuleExpansion
}
// rules implements RuleInterface
type rules struct {
client rest.Interface
ns string
}
// newRules returns a Rules
func newRules(c *ConfigV1alpha2Client, namespace string) *rules {
return &rules{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the rule, and returns the corresponding rule object, and an error if there is any.
func (c *rules) Get(name string, options v1.GetOptions) (result *v1alpha2.Rule, err error) {
result = &v1alpha2.Rule{}
err = c.client.Get().
Namespace(c.ns).
Resource("rules").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Rules that match those selectors.
func (c *rules) List(opts v1.ListOptions) (result *v1alpha2.RuleList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.RuleList{}
err = c.client.Get().
Namespace(c.ns).
Resource("rules").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested rules.
func (c *rules) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("rules").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a rule and creates it. Returns the server's representation of the rule, and an error, if there is any.
func (c *rules) Create(rule *v1alpha2.Rule) (result *v1alpha2.Rule, err error) {
result = &v1alpha2.Rule{}
err = c.client.Post().
Namespace(c.ns).
Resource("rules").
Body(rule).
Do().
Into(result)
return
}
// Update takes the representation of a rule and updates it. Returns the server's representation of the rule, and an error, if there is any.
func (c *rules) Update(rule *v1alpha2.Rule) (result *v1alpha2.Rule, err error) {
result = &v1alpha2.Rule{}
err = c.client.Put().
Namespace(c.ns).
Resource("rules").
Name(rule.Name).
Body(rule).
Do().
Into(result)
return
}
// Delete takes name of the rule and deletes it. Returns an error if one occurs.
func (c *rules) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("rules").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *rules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("rules").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched rule.
func (c *rules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Rule, err error) {
result = &v1alpha2.Rule{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("rules").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"time"
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// DestinationRulesGetter has a method to return a DestinationRuleInterface.
// A group's client should implement this interface.
type DestinationRulesGetter interface {
DestinationRules(namespace string) DestinationRuleInterface
}
// DestinationRuleInterface has methods to work with DestinationRule resources.
type DestinationRuleInterface interface {
Create(*v1alpha3.DestinationRule) (*v1alpha3.DestinationRule, error)
Update(*v1alpha3.DestinationRule) (*v1alpha3.DestinationRule, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha3.DestinationRule, error)
List(opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.DestinationRule, err error)
DestinationRuleExpansion
}
// destinationRules implements DestinationRuleInterface
type destinationRules struct {
client rest.Interface
ns string
}
// newDestinationRules returns a DestinationRules
func newDestinationRules(c *NetworkingV1alpha3Client, namespace string) *destinationRules {
return &destinationRules{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the destinationRule, and returns the corresponding destinationRule object, and an error if there is any.
func (c *destinationRules) Get(name string, options v1.GetOptions) (result *v1alpha3.DestinationRule, err error) {
result = &v1alpha3.DestinationRule{}
err = c.client.Get().
Namespace(c.ns).
Resource("destinationrules").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of DestinationRules that match those selectors.
func (c *destinationRules) List(opts v1.ListOptions) (result *v1alpha3.DestinationRuleList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.DestinationRuleList{}
err = c.client.Get().
Namespace(c.ns).
Resource("destinationrules").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested destinationRules.
func (c *destinationRules) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("destinationrules").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a destinationRule and creates it. Returns the server's representation of the destinationRule, and an error, if there is any.
func (c *destinationRules) Create(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
result = &v1alpha3.DestinationRule{}
err = c.client.Post().
Namespace(c.ns).
Resource("destinationrules").
Body(destinationRule).
Do().
Into(result)
return
}
// Update takes the representation of a destinationRule and updates it. Returns the server's representation of the destinationRule, and an error, if there is any.
func (c *destinationRules) Update(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
result = &v1alpha3.DestinationRule{}
err = c.client.Put().
Namespace(c.ns).
Resource("destinationrules").
Name(destinationRule.Name).
Body(destinationRule).
Do().
Into(result)
return
}
// Delete takes name of the destinationRule and deletes it. Returns an error if one occurs.
func (c *destinationRules) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("destinationrules").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *destinationRules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("destinationrules").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched destinationRule.
func (c *destinationRules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.DestinationRule, err error) {
result = &v1alpha3.DestinationRule{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("destinationrules").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha3

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"time"
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// EnvoyFiltersGetter has a method to return a EnvoyFilterInterface.
// A group's client should implement this interface.
type EnvoyFiltersGetter interface {
EnvoyFilters(namespace string) EnvoyFilterInterface
}
// EnvoyFilterInterface has methods to work with EnvoyFilter resources.
type EnvoyFilterInterface interface {
Create(*v1alpha3.EnvoyFilter) (*v1alpha3.EnvoyFilter, error)
Update(*v1alpha3.EnvoyFilter) (*v1alpha3.EnvoyFilter, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha3.EnvoyFilter, error)
List(opts v1.ListOptions) (*v1alpha3.EnvoyFilterList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.EnvoyFilter, err error)
EnvoyFilterExpansion
}
// envoyFilters implements EnvoyFilterInterface
type envoyFilters struct {
client rest.Interface
ns string
}
// newEnvoyFilters returns a EnvoyFilters
func newEnvoyFilters(c *NetworkingV1alpha3Client, namespace string) *envoyFilters {
return &envoyFilters{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the envoyFilter, and returns the corresponding envoyFilter object, and an error if there is any.
func (c *envoyFilters) Get(name string, options v1.GetOptions) (result *v1alpha3.EnvoyFilter, err error) {
result = &v1alpha3.EnvoyFilter{}
err = c.client.Get().
Namespace(c.ns).
Resource("envoyfilters").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of EnvoyFilters that match those selectors.
func (c *envoyFilters) List(opts v1.ListOptions) (result *v1alpha3.EnvoyFilterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.EnvoyFilterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("envoyfilters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested envoyFilters.
func (c *envoyFilters) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("envoyfilters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a envoyFilter and creates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
func (c *envoyFilters) Create(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
result = &v1alpha3.EnvoyFilter{}
err = c.client.Post().
Namespace(c.ns).
Resource("envoyfilters").
Body(envoyFilter).
Do().
Into(result)
return
}
// Update takes the representation of a envoyFilter and updates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
func (c *envoyFilters) Update(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
result = &v1alpha3.EnvoyFilter{}
err = c.client.Put().
Namespace(c.ns).
Resource("envoyfilters").
Name(envoyFilter.Name).
Body(envoyFilter).
Do().
Into(result)
return
}
// Delete takes name of the envoyFilter and deletes it. Returns an error if one occurs.
func (c *envoyFilters) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("envoyfilters").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *envoyFilters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("envoyfilters").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched envoyFilter.
func (c *envoyFilters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.EnvoyFilter, err error) {
result = &v1alpha3.EnvoyFilter{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("envoyfilters").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeDestinationRules implements DestinationRuleInterface
type FakeDestinationRules struct {
Fake *FakeNetworkingV1alpha3
ns string
}
var destinationrulesResource = schema.GroupVersionResource{Group: "networking", Version: "v1alpha3", Resource: "destinationrules"}
var destinationrulesKind = schema.GroupVersionKind{Group: "networking", Version: "v1alpha3", Kind: "DestinationRule"}
// Get takes name of the destinationRule, and returns the corresponding destinationRule object, and an error if there is any.
func (c *FakeDestinationRules) Get(name string, options v1.GetOptions) (result *v1alpha3.DestinationRule, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(destinationrulesResource, c.ns, name), &v1alpha3.DestinationRule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.DestinationRule), err
}
// List takes label and field selectors, and returns the list of DestinationRules that match those selectors.
func (c *FakeDestinationRules) List(opts v1.ListOptions) (result *v1alpha3.DestinationRuleList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(destinationrulesResource, destinationrulesKind, c.ns, opts), &v1alpha3.DestinationRuleList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.DestinationRuleList{ListMeta: obj.(*v1alpha3.DestinationRuleList).ListMeta}
for _, item := range obj.(*v1alpha3.DestinationRuleList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested destinationRules.
func (c *FakeDestinationRules) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(destinationrulesResource, c.ns, opts))
}
// Create takes the representation of a destinationRule and creates it. Returns the server's representation of the destinationRule, and an error, if there is any.
func (c *FakeDestinationRules) Create(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(destinationrulesResource, c.ns, destinationRule), &v1alpha3.DestinationRule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.DestinationRule), err
}
// Update takes the representation of a destinationRule and updates it. Returns the server's representation of the destinationRule, and an error, if there is any.
func (c *FakeDestinationRules) Update(destinationRule *v1alpha3.DestinationRule) (result *v1alpha3.DestinationRule, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(destinationrulesResource, c.ns, destinationRule), &v1alpha3.DestinationRule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.DestinationRule), err
}
// Delete takes name of the destinationRule and deletes it. Returns an error if one occurs.
func (c *FakeDestinationRules) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(destinationrulesResource, c.ns, name), &v1alpha3.DestinationRule{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDestinationRules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(destinationrulesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha3.DestinationRuleList{})
return err
}
// Patch applies the patch and returns the patched destinationRule.
func (c *FakeDestinationRules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.DestinationRule, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(destinationrulesResource, c.ns, name, pt, data, subresources...), &v1alpha3.DestinationRule{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.DestinationRule), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeEnvoyFilters implements EnvoyFilterInterface
type FakeEnvoyFilters struct {
Fake *FakeNetworkingV1alpha3
ns string
}
var envoyfiltersResource = schema.GroupVersionResource{Group: "networking", Version: "v1alpha3", Resource: "envoyfilters"}
var envoyfiltersKind = schema.GroupVersionKind{Group: "networking", Version: "v1alpha3", Kind: "EnvoyFilter"}
// Get takes name of the envoyFilter, and returns the corresponding envoyFilter object, and an error if there is any.
func (c *FakeEnvoyFilters) Get(name string, options v1.GetOptions) (result *v1alpha3.EnvoyFilter, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(envoyfiltersResource, c.ns, name), &v1alpha3.EnvoyFilter{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.EnvoyFilter), err
}
// List takes label and field selectors, and returns the list of EnvoyFilters that match those selectors.
func (c *FakeEnvoyFilters) List(opts v1.ListOptions) (result *v1alpha3.EnvoyFilterList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(envoyfiltersResource, envoyfiltersKind, c.ns, opts), &v1alpha3.EnvoyFilterList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.EnvoyFilterList{ListMeta: obj.(*v1alpha3.EnvoyFilterList).ListMeta}
for _, item := range obj.(*v1alpha3.EnvoyFilterList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested envoyFilters.
func (c *FakeEnvoyFilters) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(envoyfiltersResource, c.ns, opts))
}
// Create takes the representation of a envoyFilter and creates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
func (c *FakeEnvoyFilters) Create(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(envoyfiltersResource, c.ns, envoyFilter), &v1alpha3.EnvoyFilter{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.EnvoyFilter), err
}
// Update takes the representation of a envoyFilter and updates it. Returns the server's representation of the envoyFilter, and an error, if there is any.
func (c *FakeEnvoyFilters) Update(envoyFilter *v1alpha3.EnvoyFilter) (result *v1alpha3.EnvoyFilter, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(envoyfiltersResource, c.ns, envoyFilter), &v1alpha3.EnvoyFilter{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.EnvoyFilter), err
}
// Delete takes name of the envoyFilter and deletes it. Returns an error if one occurs.
func (c *FakeEnvoyFilters) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(envoyfiltersResource, c.ns, name), &v1alpha3.EnvoyFilter{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeEnvoyFilters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(envoyfiltersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha3.EnvoyFilterList{})
return err
}
// Patch applies the patch and returns the patched envoyFilter.
func (c *FakeEnvoyFilters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.EnvoyFilter, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(envoyfiltersResource, c.ns, name, pt, data, subresources...), &v1alpha3.EnvoyFilter{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.EnvoyFilter), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeGateways implements GatewayInterface
type FakeGateways struct {
Fake *FakeNetworkingV1alpha3
ns string
}
var gatewaysResource = schema.GroupVersionResource{Group: "networking", Version: "v1alpha3", Resource: "gateways"}
var gatewaysKind = schema.GroupVersionKind{Group: "networking", Version: "v1alpha3", Kind: "Gateway"}
// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
func (c *FakeGateways) Get(name string, options v1.GetOptions) (result *v1alpha3.Gateway, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(gatewaysResource, c.ns, name), &v1alpha3.Gateway{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Gateway), err
}
// List takes label and field selectors, and returns the list of Gateways that match those selectors.
func (c *FakeGateways) List(opts v1.ListOptions) (result *v1alpha3.GatewayList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(gatewaysResource, gatewaysKind, c.ns, opts), &v1alpha3.GatewayList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.GatewayList{ListMeta: obj.(*v1alpha3.GatewayList).ListMeta}
for _, item := range obj.(*v1alpha3.GatewayList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested gateways.
func (c *FakeGateways) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(gatewaysResource, c.ns, opts))
}
// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *FakeGateways) Create(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(gatewaysResource, c.ns, gateway), &v1alpha3.Gateway{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Gateway), err
}
// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *FakeGateways) Update(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(gatewaysResource, c.ns, gateway), &v1alpha3.Gateway{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Gateway), err
}
// Delete takes name of the gateway and deletes it. Returns an error if one occurs.
func (c *FakeGateways) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(gatewaysResource, c.ns, name), &v1alpha3.Gateway{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeGateways) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(gatewaysResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha3.GatewayList{})
return err
}
// Patch applies the patch and returns the patched gateway.
func (c *FakeGateways) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Gateway, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, name, pt, data, subresources...), &v1alpha3.Gateway{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Gateway), err
}

View File

@@ -0,0 +1,44 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "istio.io/client-go/pkg/clientset/versioned/typed/networking/v1alpha3"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeNetworkingV1alpha3 struct {
*testing.Fake
}
func (c *FakeNetworkingV1alpha3) DestinationRules(namespace string) v1alpha3.DestinationRuleInterface {
return &FakeDestinationRules{c, namespace}
}
func (c *FakeNetworkingV1alpha3) EnvoyFilters(namespace string) v1alpha3.EnvoyFilterInterface {
return &FakeEnvoyFilters{c, namespace}
}
func (c *FakeNetworkingV1alpha3) Gateways(namespace string) v1alpha3.GatewayInterface {
return &FakeGateways{c, namespace}
}
func (c *FakeNetworkingV1alpha3) ServiceEntries(namespace string) v1alpha3.ServiceEntryInterface {
return &FakeServiceEntries{c, namespace}
}
func (c *FakeNetworkingV1alpha3) Sidecars(namespace string) v1alpha3.SidecarInterface {
return &FakeSidecars{c, namespace}
}
func (c *FakeNetworkingV1alpha3) VirtualServices(namespace string) v1alpha3.VirtualServiceInterface {
return &FakeVirtualServices{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeNetworkingV1alpha3) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeServiceEntries implements ServiceEntryInterface
type FakeServiceEntries struct {
Fake *FakeNetworkingV1alpha3
ns string
}
var serviceentriesResource = schema.GroupVersionResource{Group: "networking", Version: "v1alpha3", Resource: "serviceentries"}
var serviceentriesKind = schema.GroupVersionKind{Group: "networking", Version: "v1alpha3", Kind: "ServiceEntry"}
// Get takes name of the serviceEntry, and returns the corresponding serviceEntry object, and an error if there is any.
func (c *FakeServiceEntries) Get(name string, options v1.GetOptions) (result *v1alpha3.ServiceEntry, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(serviceentriesResource, c.ns, name), &v1alpha3.ServiceEntry{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ServiceEntry), err
}
// List takes label and field selectors, and returns the list of ServiceEntries that match those selectors.
func (c *FakeServiceEntries) List(opts v1.ListOptions) (result *v1alpha3.ServiceEntryList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(serviceentriesResource, serviceentriesKind, c.ns, opts), &v1alpha3.ServiceEntryList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.ServiceEntryList{ListMeta: obj.(*v1alpha3.ServiceEntryList).ListMeta}
for _, item := range obj.(*v1alpha3.ServiceEntryList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested serviceEntries.
func (c *FakeServiceEntries) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(serviceentriesResource, c.ns, opts))
}
// Create takes the representation of a serviceEntry and creates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
func (c *FakeServiceEntries) Create(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(serviceentriesResource, c.ns, serviceEntry), &v1alpha3.ServiceEntry{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ServiceEntry), err
}
// Update takes the representation of a serviceEntry and updates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
func (c *FakeServiceEntries) Update(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(serviceentriesResource, c.ns, serviceEntry), &v1alpha3.ServiceEntry{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ServiceEntry), err
}
// Delete takes name of the serviceEntry and deletes it. Returns an error if one occurs.
func (c *FakeServiceEntries) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(serviceentriesResource, c.ns, name), &v1alpha3.ServiceEntry{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeServiceEntries) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(serviceentriesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha3.ServiceEntryList{})
return err
}
// Patch applies the patch and returns the patched serviceEntry.
func (c *FakeServiceEntries) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.ServiceEntry, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(serviceentriesResource, c.ns, name, pt, data, subresources...), &v1alpha3.ServiceEntry{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.ServiceEntry), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeSidecars implements SidecarInterface
type FakeSidecars struct {
Fake *FakeNetworkingV1alpha3
ns string
}
var sidecarsResource = schema.GroupVersionResource{Group: "networking", Version: "v1alpha3", Resource: "sidecars"}
var sidecarsKind = schema.GroupVersionKind{Group: "networking", Version: "v1alpha3", Kind: "Sidecar"}
// Get takes name of the sidecar, and returns the corresponding sidecar object, and an error if there is any.
func (c *FakeSidecars) Get(name string, options v1.GetOptions) (result *v1alpha3.Sidecar, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(sidecarsResource, c.ns, name), &v1alpha3.Sidecar{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Sidecar), err
}
// List takes label and field selectors, and returns the list of Sidecars that match those selectors.
func (c *FakeSidecars) List(opts v1.ListOptions) (result *v1alpha3.SidecarList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(sidecarsResource, sidecarsKind, c.ns, opts), &v1alpha3.SidecarList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.SidecarList{ListMeta: obj.(*v1alpha3.SidecarList).ListMeta}
for _, item := range obj.(*v1alpha3.SidecarList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested sidecars.
func (c *FakeSidecars) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(sidecarsResource, c.ns, opts))
}
// Create takes the representation of a sidecar and creates it. Returns the server's representation of the sidecar, and an error, if there is any.
func (c *FakeSidecars) Create(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(sidecarsResource, c.ns, sidecar), &v1alpha3.Sidecar{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Sidecar), err
}
// Update takes the representation of a sidecar and updates it. Returns the server's representation of the sidecar, and an error, if there is any.
func (c *FakeSidecars) Update(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(sidecarsResource, c.ns, sidecar), &v1alpha3.Sidecar{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Sidecar), err
}
// Delete takes name of the sidecar and deletes it. Returns an error if one occurs.
func (c *FakeSidecars) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(sidecarsResource, c.ns, name), &v1alpha3.Sidecar{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeSidecars) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(sidecarsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha3.SidecarList{})
return err
}
// Patch applies the patch and returns the patched sidecar.
func (c *FakeSidecars) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Sidecar, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(sidecarsResource, c.ns, name, pt, data, subresources...), &v1alpha3.Sidecar{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.Sidecar), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeVirtualServices implements VirtualServiceInterface
type FakeVirtualServices struct {
Fake *FakeNetworkingV1alpha3
ns string
}
var virtualservicesResource = schema.GroupVersionResource{Group: "networking", Version: "v1alpha3", Resource: "virtualservices"}
var virtualservicesKind = schema.GroupVersionKind{Group: "networking", Version: "v1alpha3", Kind: "VirtualService"}
// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any.
func (c *FakeVirtualServices) Get(name string, options v1.GetOptions) (result *v1alpha3.VirtualService, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.VirtualService), err
}
// List takes label and field selectors, and returns the list of VirtualServices that match those selectors.
func (c *FakeVirtualServices) List(opts v1.ListOptions) (result *v1alpha3.VirtualServiceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(virtualservicesResource, virtualservicesKind, c.ns, opts), &v1alpha3.VirtualServiceList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.VirtualServiceList{ListMeta: obj.(*v1alpha3.VirtualServiceList).ListMeta}
for _, item := range obj.(*v1alpha3.VirtualServiceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested virtualServices.
func (c *FakeVirtualServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(virtualservicesResource, c.ns, opts))
}
// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any.
func (c *FakeVirtualServices) Create(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.VirtualService), err
}
// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any.
func (c *FakeVirtualServices) Update(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.VirtualService), err
}
// Delete takes name of the virtualService and deletes it. Returns an error if one occurs.
func (c *FakeVirtualServices) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeVirtualServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(virtualservicesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha3.VirtualServiceList{})
return err
}
// Patch applies the patch and returns the patched virtualService.
func (c *FakeVirtualServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(virtualservicesResource, c.ns, name, pt, data, subresources...), &v1alpha3.VirtualService{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha3.VirtualService), err
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"time"
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// GatewaysGetter has a method to return a GatewayInterface.
// A group's client should implement this interface.
type GatewaysGetter interface {
Gateways(namespace string) GatewayInterface
}
// GatewayInterface has methods to work with Gateway resources.
type GatewayInterface interface {
Create(*v1alpha3.Gateway) (*v1alpha3.Gateway, error)
Update(*v1alpha3.Gateway) (*v1alpha3.Gateway, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha3.Gateway, error)
List(opts v1.ListOptions) (*v1alpha3.GatewayList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Gateway, err error)
GatewayExpansion
}
// gateways implements GatewayInterface
type gateways struct {
client rest.Interface
ns string
}
// newGateways returns a Gateways
func newGateways(c *NetworkingV1alpha3Client, namespace string) *gateways {
return &gateways{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
func (c *gateways) Get(name string, options v1.GetOptions) (result *v1alpha3.Gateway, err error) {
result = &v1alpha3.Gateway{}
err = c.client.Get().
Namespace(c.ns).
Resource("gateways").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Gateways that match those selectors.
func (c *gateways) List(opts v1.ListOptions) (result *v1alpha3.GatewayList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.GatewayList{}
err = c.client.Get().
Namespace(c.ns).
Resource("gateways").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested gateways.
func (c *gateways) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("gateways").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *gateways) Create(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
result = &v1alpha3.Gateway{}
err = c.client.Post().
Namespace(c.ns).
Resource("gateways").
Body(gateway).
Do().
Into(result)
return
}
// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *gateways) Update(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) {
result = &v1alpha3.Gateway{}
err = c.client.Put().
Namespace(c.ns).
Resource("gateways").
Name(gateway.Name).
Body(gateway).
Do().
Into(result)
return
}
// Delete takes name of the gateway and deletes it. Returns an error if one occurs.
func (c *gateways) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("gateways").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *gateways) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("gateways").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched gateway.
func (c *gateways) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Gateway, err error) {
result = &v1alpha3.Gateway{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("gateways").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,15 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
type DestinationRuleExpansion interface{}
type EnvoyFilterExpansion interface{}
type GatewayExpansion interface{}
type ServiceEntryExpansion interface{}
type SidecarExpansion interface{}
type VirtualServiceExpansion interface{}

View File

@@ -0,0 +1,98 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
"istio.io/client-go/pkg/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type NetworkingV1alpha3Interface interface {
RESTClient() rest.Interface
DestinationRulesGetter
EnvoyFiltersGetter
GatewaysGetter
ServiceEntriesGetter
SidecarsGetter
VirtualServicesGetter
}
// NetworkingV1alpha3Client is used to interact with features provided by the networking group.
type NetworkingV1alpha3Client struct {
restClient rest.Interface
}
func (c *NetworkingV1alpha3Client) DestinationRules(namespace string) DestinationRuleInterface {
return newDestinationRules(c, namespace)
}
func (c *NetworkingV1alpha3Client) EnvoyFilters(namespace string) EnvoyFilterInterface {
return newEnvoyFilters(c, namespace)
}
func (c *NetworkingV1alpha3Client) Gateways(namespace string) GatewayInterface {
return newGateways(c, namespace)
}
func (c *NetworkingV1alpha3Client) ServiceEntries(namespace string) ServiceEntryInterface {
return newServiceEntries(c, namespace)
}
func (c *NetworkingV1alpha3Client) Sidecars(namespace string) SidecarInterface {
return newSidecars(c, namespace)
}
func (c *NetworkingV1alpha3Client) VirtualServices(namespace string) VirtualServiceInterface {
return newVirtualServices(c, namespace)
}
// NewForConfig creates a new NetworkingV1alpha3Client for the given config.
func NewForConfig(c *rest.Config) (*NetworkingV1alpha3Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &NetworkingV1alpha3Client{client}, nil
}
// NewForConfigOrDie creates a new NetworkingV1alpha3Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *NetworkingV1alpha3Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new NetworkingV1alpha3Client for the given RESTClient.
func New(c rest.Interface) *NetworkingV1alpha3Client {
return &NetworkingV1alpha3Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha3.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *NetworkingV1alpha3Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"time"
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ServiceEntriesGetter has a method to return a ServiceEntryInterface.
// A group's client should implement this interface.
type ServiceEntriesGetter interface {
ServiceEntries(namespace string) ServiceEntryInterface
}
// ServiceEntryInterface has methods to work with ServiceEntry resources.
type ServiceEntryInterface interface {
Create(*v1alpha3.ServiceEntry) (*v1alpha3.ServiceEntry, error)
Update(*v1alpha3.ServiceEntry) (*v1alpha3.ServiceEntry, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha3.ServiceEntry, error)
List(opts v1.ListOptions) (*v1alpha3.ServiceEntryList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.ServiceEntry, err error)
ServiceEntryExpansion
}
// serviceEntries implements ServiceEntryInterface
type serviceEntries struct {
client rest.Interface
ns string
}
// newServiceEntries returns a ServiceEntries
func newServiceEntries(c *NetworkingV1alpha3Client, namespace string) *serviceEntries {
return &serviceEntries{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the serviceEntry, and returns the corresponding serviceEntry object, and an error if there is any.
func (c *serviceEntries) Get(name string, options v1.GetOptions) (result *v1alpha3.ServiceEntry, err error) {
result = &v1alpha3.ServiceEntry{}
err = c.client.Get().
Namespace(c.ns).
Resource("serviceentries").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of ServiceEntries that match those selectors.
func (c *serviceEntries) List(opts v1.ListOptions) (result *v1alpha3.ServiceEntryList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.ServiceEntryList{}
err = c.client.Get().
Namespace(c.ns).
Resource("serviceentries").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested serviceEntries.
func (c *serviceEntries) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("serviceentries").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a serviceEntry and creates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
func (c *serviceEntries) Create(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
result = &v1alpha3.ServiceEntry{}
err = c.client.Post().
Namespace(c.ns).
Resource("serviceentries").
Body(serviceEntry).
Do().
Into(result)
return
}
// Update takes the representation of a serviceEntry and updates it. Returns the server's representation of the serviceEntry, and an error, if there is any.
func (c *serviceEntries) Update(serviceEntry *v1alpha3.ServiceEntry) (result *v1alpha3.ServiceEntry, err error) {
result = &v1alpha3.ServiceEntry{}
err = c.client.Put().
Namespace(c.ns).
Resource("serviceentries").
Name(serviceEntry.Name).
Body(serviceEntry).
Do().
Into(result)
return
}
// Delete takes name of the serviceEntry and deletes it. Returns an error if one occurs.
func (c *serviceEntries) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("serviceentries").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *serviceEntries) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("serviceentries").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched serviceEntry.
func (c *serviceEntries) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.ServiceEntry, err error) {
result = &v1alpha3.ServiceEntry{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("serviceentries").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"time"
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// SidecarsGetter has a method to return a SidecarInterface.
// A group's client should implement this interface.
type SidecarsGetter interface {
Sidecars(namespace string) SidecarInterface
}
// SidecarInterface has methods to work with Sidecar resources.
type SidecarInterface interface {
Create(*v1alpha3.Sidecar) (*v1alpha3.Sidecar, error)
Update(*v1alpha3.Sidecar) (*v1alpha3.Sidecar, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha3.Sidecar, error)
List(opts v1.ListOptions) (*v1alpha3.SidecarList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Sidecar, err error)
SidecarExpansion
}
// sidecars implements SidecarInterface
type sidecars struct {
client rest.Interface
ns string
}
// newSidecars returns a Sidecars
func newSidecars(c *NetworkingV1alpha3Client, namespace string) *sidecars {
return &sidecars{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the sidecar, and returns the corresponding sidecar object, and an error if there is any.
func (c *sidecars) Get(name string, options v1.GetOptions) (result *v1alpha3.Sidecar, err error) {
result = &v1alpha3.Sidecar{}
err = c.client.Get().
Namespace(c.ns).
Resource("sidecars").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Sidecars that match those selectors.
func (c *sidecars) List(opts v1.ListOptions) (result *v1alpha3.SidecarList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.SidecarList{}
err = c.client.Get().
Namespace(c.ns).
Resource("sidecars").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested sidecars.
func (c *sidecars) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("sidecars").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a sidecar and creates it. Returns the server's representation of the sidecar, and an error, if there is any.
func (c *sidecars) Create(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
result = &v1alpha3.Sidecar{}
err = c.client.Post().
Namespace(c.ns).
Resource("sidecars").
Body(sidecar).
Do().
Into(result)
return
}
// Update takes the representation of a sidecar and updates it. Returns the server's representation of the sidecar, and an error, if there is any.
func (c *sidecars) Update(sidecar *v1alpha3.Sidecar) (result *v1alpha3.Sidecar, err error) {
result = &v1alpha3.Sidecar{}
err = c.client.Put().
Namespace(c.ns).
Resource("sidecars").
Name(sidecar.Name).
Body(sidecar).
Do().
Into(result)
return
}
// Delete takes name of the sidecar and deletes it. Returns an error if one occurs.
func (c *sidecars) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("sidecars").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *sidecars) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("sidecars").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched sidecar.
func (c *sidecars) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Sidecar, err error) {
result = &v1alpha3.Sidecar{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("sidecars").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha3
import (
"time"
v1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// VirtualServicesGetter has a method to return a VirtualServiceInterface.
// A group's client should implement this interface.
type VirtualServicesGetter interface {
VirtualServices(namespace string) VirtualServiceInterface
}
// VirtualServiceInterface has methods to work with VirtualService resources.
type VirtualServiceInterface interface {
Create(*v1alpha3.VirtualService) (*v1alpha3.VirtualService, error)
Update(*v1alpha3.VirtualService) (*v1alpha3.VirtualService, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha3.VirtualService, error)
List(opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error)
VirtualServiceExpansion
}
// virtualServices implements VirtualServiceInterface
type virtualServices struct {
client rest.Interface
ns string
}
// newVirtualServices returns a VirtualServices
func newVirtualServices(c *NetworkingV1alpha3Client, namespace string) *virtualServices {
return &virtualServices{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any.
func (c *virtualServices) Get(name string, options v1.GetOptions) (result *v1alpha3.VirtualService, err error) {
result = &v1alpha3.VirtualService{}
err = c.client.Get().
Namespace(c.ns).
Resource("virtualservices").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of VirtualServices that match those selectors.
func (c *virtualServices) List(opts v1.ListOptions) (result *v1alpha3.VirtualServiceList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha3.VirtualServiceList{}
err = c.client.Get().
Namespace(c.ns).
Resource("virtualservices").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested virtualServices.
func (c *virtualServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("virtualservices").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any.
func (c *virtualServices) Create(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
result = &v1alpha3.VirtualService{}
err = c.client.Post().
Namespace(c.ns).
Resource("virtualservices").
Body(virtualService).
Do().
Into(result)
return
}
// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any.
func (c *virtualServices) Update(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) {
result = &v1alpha3.VirtualService{}
err = c.client.Put().
Namespace(c.ns).
Resource("virtualservices").
Name(virtualService.Name).
Body(virtualService).
Do().
Into(result)
return
}
// Delete takes name of the virtualService and deletes it. Returns an error if one occurs.
func (c *virtualServices) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("virtualservices").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *virtualServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("virtualservices").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched virtualService.
func (c *virtualServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error) {
result = &v1alpha3.VirtualService{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("virtualservices").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,148 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"time"
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ClusterRbacConfigsGetter has a method to return a ClusterRbacConfigInterface.
// A group's client should implement this interface.
type ClusterRbacConfigsGetter interface {
ClusterRbacConfigs() ClusterRbacConfigInterface
}
// ClusterRbacConfigInterface has methods to work with ClusterRbacConfig resources.
type ClusterRbacConfigInterface interface {
Create(*v1alpha1.ClusterRbacConfig) (*v1alpha1.ClusterRbacConfig, error)
Update(*v1alpha1.ClusterRbacConfig) (*v1alpha1.ClusterRbacConfig, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRbacConfig, error)
List(opts v1.ListOptions) (*v1alpha1.ClusterRbacConfigList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRbacConfig, err error)
ClusterRbacConfigExpansion
}
// clusterRbacConfigs implements ClusterRbacConfigInterface
type clusterRbacConfigs struct {
client rest.Interface
}
// newClusterRbacConfigs returns a ClusterRbacConfigs
func newClusterRbacConfigs(c *RbacV1alpha1Client) *clusterRbacConfigs {
return &clusterRbacConfigs{
client: c.RESTClient(),
}
}
// Get takes name of the clusterRbacConfig, and returns the corresponding clusterRbacConfig object, and an error if there is any.
func (c *clusterRbacConfigs) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRbacConfig, err error) {
result = &v1alpha1.ClusterRbacConfig{}
err = c.client.Get().
Resource("clusterrbacconfigs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of ClusterRbacConfigs that match those selectors.
func (c *clusterRbacConfigs) List(opts v1.ListOptions) (result *v1alpha1.ClusterRbacConfigList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ClusterRbacConfigList{}
err = c.client.Get().
Resource("clusterrbacconfigs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested clusterRbacConfigs.
func (c *clusterRbacConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("clusterrbacconfigs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a clusterRbacConfig and creates it. Returns the server's representation of the clusterRbacConfig, and an error, if there is any.
func (c *clusterRbacConfigs) Create(clusterRbacConfig *v1alpha1.ClusterRbacConfig) (result *v1alpha1.ClusterRbacConfig, err error) {
result = &v1alpha1.ClusterRbacConfig{}
err = c.client.Post().
Resource("clusterrbacconfigs").
Body(clusterRbacConfig).
Do().
Into(result)
return
}
// Update takes the representation of a clusterRbacConfig and updates it. Returns the server's representation of the clusterRbacConfig, and an error, if there is any.
func (c *clusterRbacConfigs) Update(clusterRbacConfig *v1alpha1.ClusterRbacConfig) (result *v1alpha1.ClusterRbacConfig, err error) {
result = &v1alpha1.ClusterRbacConfig{}
err = c.client.Put().
Resource("clusterrbacconfigs").
Name(clusterRbacConfig.Name).
Body(clusterRbacConfig).
Do().
Into(result)
return
}
// Delete takes name of the clusterRbacConfig and deletes it. Returns an error if one occurs.
func (c *clusterRbacConfigs) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Resource("clusterrbacconfigs").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *clusterRbacConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("clusterrbacconfigs").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched clusterRbacConfig.
func (c *clusterRbacConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRbacConfig, err error) {
result = &v1alpha1.ClusterRbacConfig{}
err = c.client.Patch(pt).
Resource("clusterrbacconfigs").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha1

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,104 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeClusterRbacConfigs implements ClusterRbacConfigInterface
type FakeClusterRbacConfigs struct {
Fake *FakeRbacV1alpha1
}
var clusterrbacconfigsResource = schema.GroupVersionResource{Group: "rbac", Version: "v1alpha1", Resource: "clusterrbacconfigs"}
var clusterrbacconfigsKind = schema.GroupVersionKind{Group: "rbac", Version: "v1alpha1", Kind: "ClusterRbacConfig"}
// Get takes name of the clusterRbacConfig, and returns the corresponding clusterRbacConfig object, and an error if there is any.
func (c *FakeClusterRbacConfigs) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(clusterrbacconfigsResource, name), &v1alpha1.ClusterRbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterRbacConfig), err
}
// List takes label and field selectors, and returns the list of ClusterRbacConfigs that match those selectors.
func (c *FakeClusterRbacConfigs) List(opts v1.ListOptions) (result *v1alpha1.ClusterRbacConfigList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(clusterrbacconfigsResource, clusterrbacconfigsKind, opts), &v1alpha1.ClusterRbacConfigList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ClusterRbacConfigList{ListMeta: obj.(*v1alpha1.ClusterRbacConfigList).ListMeta}
for _, item := range obj.(*v1alpha1.ClusterRbacConfigList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested clusterRbacConfigs.
func (c *FakeClusterRbacConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(clusterrbacconfigsResource, opts))
}
// Create takes the representation of a clusterRbacConfig and creates it. Returns the server's representation of the clusterRbacConfig, and an error, if there is any.
func (c *FakeClusterRbacConfigs) Create(clusterRbacConfig *v1alpha1.ClusterRbacConfig) (result *v1alpha1.ClusterRbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(clusterrbacconfigsResource, clusterRbacConfig), &v1alpha1.ClusterRbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterRbacConfig), err
}
// Update takes the representation of a clusterRbacConfig and updates it. Returns the server's representation of the clusterRbacConfig, and an error, if there is any.
func (c *FakeClusterRbacConfigs) Update(clusterRbacConfig *v1alpha1.ClusterRbacConfig) (result *v1alpha1.ClusterRbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(clusterrbacconfigsResource, clusterRbacConfig), &v1alpha1.ClusterRbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterRbacConfig), err
}
// Delete takes name of the clusterRbacConfig and deletes it. Returns an error if one occurs.
func (c *FakeClusterRbacConfigs) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(clusterrbacconfigsResource, name), &v1alpha1.ClusterRbacConfig{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeClusterRbacConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(clusterrbacconfigsResource, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.ClusterRbacConfigList{})
return err
}
// Patch applies the patch and returns the patched clusterRbacConfig.
func (c *FakeClusterRbacConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clusterrbacconfigsResource, name, pt, data, subresources...), &v1alpha1.ClusterRbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterRbacConfig), err
}

View File

@@ -0,0 +1,36 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/clientset/versioned/typed/rbac/v1alpha1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeRbacV1alpha1 struct {
*testing.Fake
}
func (c *FakeRbacV1alpha1) ClusterRbacConfigs() v1alpha1.ClusterRbacConfigInterface {
return &FakeClusterRbacConfigs{c}
}
func (c *FakeRbacV1alpha1) RbacConfigs(namespace string) v1alpha1.RbacConfigInterface {
return &FakeRbacConfigs{c, namespace}
}
func (c *FakeRbacV1alpha1) ServiceRoles(namespace string) v1alpha1.ServiceRoleInterface {
return &FakeServiceRoles{c, namespace}
}
func (c *FakeRbacV1alpha1) ServiceRoleBindings(namespace string) v1alpha1.ServiceRoleBindingInterface {
return &FakeServiceRoleBindings{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeRbacV1alpha1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeRbacConfigs implements RbacConfigInterface
type FakeRbacConfigs struct {
Fake *FakeRbacV1alpha1
ns string
}
var rbacconfigsResource = schema.GroupVersionResource{Group: "rbac", Version: "v1alpha1", Resource: "rbacconfigs"}
var rbacconfigsKind = schema.GroupVersionKind{Group: "rbac", Version: "v1alpha1", Kind: "RbacConfig"}
// Get takes name of the rbacConfig, and returns the corresponding rbacConfig object, and an error if there is any.
func (c *FakeRbacConfigs) Get(name string, options v1.GetOptions) (result *v1alpha1.RbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(rbacconfigsResource, c.ns, name), &v1alpha1.RbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.RbacConfig), err
}
// List takes label and field selectors, and returns the list of RbacConfigs that match those selectors.
func (c *FakeRbacConfigs) List(opts v1.ListOptions) (result *v1alpha1.RbacConfigList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(rbacconfigsResource, rbacconfigsKind, c.ns, opts), &v1alpha1.RbacConfigList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.RbacConfigList{ListMeta: obj.(*v1alpha1.RbacConfigList).ListMeta}
for _, item := range obj.(*v1alpha1.RbacConfigList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested rbacConfigs.
func (c *FakeRbacConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(rbacconfigsResource, c.ns, opts))
}
// Create takes the representation of a rbacConfig and creates it. Returns the server's representation of the rbacConfig, and an error, if there is any.
func (c *FakeRbacConfigs) Create(rbacConfig *v1alpha1.RbacConfig) (result *v1alpha1.RbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(rbacconfigsResource, c.ns, rbacConfig), &v1alpha1.RbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.RbacConfig), err
}
// Update takes the representation of a rbacConfig and updates it. Returns the server's representation of the rbacConfig, and an error, if there is any.
func (c *FakeRbacConfigs) Update(rbacConfig *v1alpha1.RbacConfig) (result *v1alpha1.RbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(rbacconfigsResource, c.ns, rbacConfig), &v1alpha1.RbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.RbacConfig), err
}
// Delete takes name of the rbacConfig and deletes it. Returns an error if one occurs.
func (c *FakeRbacConfigs) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(rbacconfigsResource, c.ns, name), &v1alpha1.RbacConfig{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeRbacConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(rbacconfigsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.RbacConfigList{})
return err
}
// Patch applies the patch and returns the patched rbacConfig.
func (c *FakeRbacConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RbacConfig, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(rbacconfigsResource, c.ns, name, pt, data, subresources...), &v1alpha1.RbacConfig{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.RbacConfig), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeServiceRoles implements ServiceRoleInterface
type FakeServiceRoles struct {
Fake *FakeRbacV1alpha1
ns string
}
var servicerolesResource = schema.GroupVersionResource{Group: "rbac", Version: "v1alpha1", Resource: "serviceroles"}
var servicerolesKind = schema.GroupVersionKind{Group: "rbac", Version: "v1alpha1", Kind: "ServiceRole"}
// Get takes name of the serviceRole, and returns the corresponding serviceRole object, and an error if there is any.
func (c *FakeServiceRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ServiceRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(servicerolesResource, c.ns, name), &v1alpha1.ServiceRole{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRole), err
}
// List takes label and field selectors, and returns the list of ServiceRoles that match those selectors.
func (c *FakeServiceRoles) List(opts v1.ListOptions) (result *v1alpha1.ServiceRoleList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(servicerolesResource, servicerolesKind, c.ns, opts), &v1alpha1.ServiceRoleList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ServiceRoleList{ListMeta: obj.(*v1alpha1.ServiceRoleList).ListMeta}
for _, item := range obj.(*v1alpha1.ServiceRoleList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested serviceRoles.
func (c *FakeServiceRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(servicerolesResource, c.ns, opts))
}
// Create takes the representation of a serviceRole and creates it. Returns the server's representation of the serviceRole, and an error, if there is any.
func (c *FakeServiceRoles) Create(serviceRole *v1alpha1.ServiceRole) (result *v1alpha1.ServiceRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(servicerolesResource, c.ns, serviceRole), &v1alpha1.ServiceRole{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRole), err
}
// Update takes the representation of a serviceRole and updates it. Returns the server's representation of the serviceRole, and an error, if there is any.
func (c *FakeServiceRoles) Update(serviceRole *v1alpha1.ServiceRole) (result *v1alpha1.ServiceRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(servicerolesResource, c.ns, serviceRole), &v1alpha1.ServiceRole{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRole), err
}
// Delete takes name of the serviceRole and deletes it. Returns an error if one occurs.
func (c *FakeServiceRoles) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(servicerolesResource, c.ns, name), &v1alpha1.ServiceRole{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeServiceRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(servicerolesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.ServiceRoleList{})
return err
}
// Patch applies the patch and returns the patched serviceRole.
func (c *FakeServiceRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ServiceRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(servicerolesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ServiceRole{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRole), err
}

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeServiceRoleBindings implements ServiceRoleBindingInterface
type FakeServiceRoleBindings struct {
Fake *FakeRbacV1alpha1
ns string
}
var servicerolebindingsResource = schema.GroupVersionResource{Group: "rbac", Version: "v1alpha1", Resource: "servicerolebindings"}
var servicerolebindingsKind = schema.GroupVersionKind{Group: "rbac", Version: "v1alpha1", Kind: "ServiceRoleBinding"}
// Get takes name of the serviceRoleBinding, and returns the corresponding serviceRoleBinding object, and an error if there is any.
func (c *FakeServiceRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ServiceRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(servicerolebindingsResource, c.ns, name), &v1alpha1.ServiceRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRoleBinding), err
}
// List takes label and field selectors, and returns the list of ServiceRoleBindings that match those selectors.
func (c *FakeServiceRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ServiceRoleBindingList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(servicerolebindingsResource, servicerolebindingsKind, c.ns, opts), &v1alpha1.ServiceRoleBindingList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ServiceRoleBindingList{ListMeta: obj.(*v1alpha1.ServiceRoleBindingList).ListMeta}
for _, item := range obj.(*v1alpha1.ServiceRoleBindingList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested serviceRoleBindings.
func (c *FakeServiceRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(servicerolebindingsResource, c.ns, opts))
}
// Create takes the representation of a serviceRoleBinding and creates it. Returns the server's representation of the serviceRoleBinding, and an error, if there is any.
func (c *FakeServiceRoleBindings) Create(serviceRoleBinding *v1alpha1.ServiceRoleBinding) (result *v1alpha1.ServiceRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(servicerolebindingsResource, c.ns, serviceRoleBinding), &v1alpha1.ServiceRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRoleBinding), err
}
// Update takes the representation of a serviceRoleBinding and updates it. Returns the server's representation of the serviceRoleBinding, and an error, if there is any.
func (c *FakeServiceRoleBindings) Update(serviceRoleBinding *v1alpha1.ServiceRoleBinding) (result *v1alpha1.ServiceRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(servicerolebindingsResource, c.ns, serviceRoleBinding), &v1alpha1.ServiceRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRoleBinding), err
}
// Delete takes name of the serviceRoleBinding and deletes it. Returns an error if one occurs.
func (c *FakeServiceRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(servicerolebindingsResource, c.ns, name), &v1alpha1.ServiceRoleBinding{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeServiceRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(servicerolebindingsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.ServiceRoleBindingList{})
return err
}
// Patch applies the patch and returns the patched serviceRoleBinding.
func (c *FakeServiceRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ServiceRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(servicerolebindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ServiceRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ServiceRoleBinding), err
}

View File

@@ -0,0 +1,11 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
type ClusterRbacConfigExpansion interface{}
type RbacConfigExpansion interface{}
type ServiceRoleExpansion interface{}
type ServiceRoleBindingExpansion interface{}

View File

@@ -0,0 +1,88 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
"istio.io/client-go/pkg/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type RbacV1alpha1Interface interface {
RESTClient() rest.Interface
ClusterRbacConfigsGetter
RbacConfigsGetter
ServiceRolesGetter
ServiceRoleBindingsGetter
}
// RbacV1alpha1Client is used to interact with features provided by the rbac group.
type RbacV1alpha1Client struct {
restClient rest.Interface
}
func (c *RbacV1alpha1Client) ClusterRbacConfigs() ClusterRbacConfigInterface {
return newClusterRbacConfigs(c)
}
func (c *RbacV1alpha1Client) RbacConfigs(namespace string) RbacConfigInterface {
return newRbacConfigs(c, namespace)
}
func (c *RbacV1alpha1Client) ServiceRoles(namespace string) ServiceRoleInterface {
return newServiceRoles(c, namespace)
}
func (c *RbacV1alpha1Client) ServiceRoleBindings(namespace string) ServiceRoleBindingInterface {
return newServiceRoleBindings(c, namespace)
}
// NewForConfig creates a new RbacV1alpha1Client for the given config.
func NewForConfig(c *rest.Config) (*RbacV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &RbacV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new RbacV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *RbacV1alpha1Client {
return &RbacV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *RbacV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"time"
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// RbacConfigsGetter has a method to return a RbacConfigInterface.
// A group's client should implement this interface.
type RbacConfigsGetter interface {
RbacConfigs(namespace string) RbacConfigInterface
}
// RbacConfigInterface has methods to work with RbacConfig resources.
type RbacConfigInterface interface {
Create(*v1alpha1.RbacConfig) (*v1alpha1.RbacConfig, error)
Update(*v1alpha1.RbacConfig) (*v1alpha1.RbacConfig, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.RbacConfig, error)
List(opts v1.ListOptions) (*v1alpha1.RbacConfigList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RbacConfig, err error)
RbacConfigExpansion
}
// rbacConfigs implements RbacConfigInterface
type rbacConfigs struct {
client rest.Interface
ns string
}
// newRbacConfigs returns a RbacConfigs
func newRbacConfigs(c *RbacV1alpha1Client, namespace string) *rbacConfigs {
return &rbacConfigs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the rbacConfig, and returns the corresponding rbacConfig object, and an error if there is any.
func (c *rbacConfigs) Get(name string, options v1.GetOptions) (result *v1alpha1.RbacConfig, err error) {
result = &v1alpha1.RbacConfig{}
err = c.client.Get().
Namespace(c.ns).
Resource("rbacconfigs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of RbacConfigs that match those selectors.
func (c *rbacConfigs) List(opts v1.ListOptions) (result *v1alpha1.RbacConfigList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.RbacConfigList{}
err = c.client.Get().
Namespace(c.ns).
Resource("rbacconfigs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested rbacConfigs.
func (c *rbacConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("rbacconfigs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a rbacConfig and creates it. Returns the server's representation of the rbacConfig, and an error, if there is any.
func (c *rbacConfigs) Create(rbacConfig *v1alpha1.RbacConfig) (result *v1alpha1.RbacConfig, err error) {
result = &v1alpha1.RbacConfig{}
err = c.client.Post().
Namespace(c.ns).
Resource("rbacconfigs").
Body(rbacConfig).
Do().
Into(result)
return
}
// Update takes the representation of a rbacConfig and updates it. Returns the server's representation of the rbacConfig, and an error, if there is any.
func (c *rbacConfigs) Update(rbacConfig *v1alpha1.RbacConfig) (result *v1alpha1.RbacConfig, err error) {
result = &v1alpha1.RbacConfig{}
err = c.client.Put().
Namespace(c.ns).
Resource("rbacconfigs").
Name(rbacConfig.Name).
Body(rbacConfig).
Do().
Into(result)
return
}
// Delete takes name of the rbacConfig and deletes it. Returns an error if one occurs.
func (c *rbacConfigs) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("rbacconfigs").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *rbacConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("rbacconfigs").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched rbacConfig.
func (c *rbacConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RbacConfig, err error) {
result = &v1alpha1.RbacConfig{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("rbacconfigs").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"time"
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ServiceRolesGetter has a method to return a ServiceRoleInterface.
// A group's client should implement this interface.
type ServiceRolesGetter interface {
ServiceRoles(namespace string) ServiceRoleInterface
}
// ServiceRoleInterface has methods to work with ServiceRole resources.
type ServiceRoleInterface interface {
Create(*v1alpha1.ServiceRole) (*v1alpha1.ServiceRole, error)
Update(*v1alpha1.ServiceRole) (*v1alpha1.ServiceRole, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.ServiceRole, error)
List(opts v1.ListOptions) (*v1alpha1.ServiceRoleList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ServiceRole, err error)
ServiceRoleExpansion
}
// serviceRoles implements ServiceRoleInterface
type serviceRoles struct {
client rest.Interface
ns string
}
// newServiceRoles returns a ServiceRoles
func newServiceRoles(c *RbacV1alpha1Client, namespace string) *serviceRoles {
return &serviceRoles{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the serviceRole, and returns the corresponding serviceRole object, and an error if there is any.
func (c *serviceRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ServiceRole, err error) {
result = &v1alpha1.ServiceRole{}
err = c.client.Get().
Namespace(c.ns).
Resource("serviceroles").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of ServiceRoles that match those selectors.
func (c *serviceRoles) List(opts v1.ListOptions) (result *v1alpha1.ServiceRoleList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ServiceRoleList{}
err = c.client.Get().
Namespace(c.ns).
Resource("serviceroles").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested serviceRoles.
func (c *serviceRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("serviceroles").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a serviceRole and creates it. Returns the server's representation of the serviceRole, and an error, if there is any.
func (c *serviceRoles) Create(serviceRole *v1alpha1.ServiceRole) (result *v1alpha1.ServiceRole, err error) {
result = &v1alpha1.ServiceRole{}
err = c.client.Post().
Namespace(c.ns).
Resource("serviceroles").
Body(serviceRole).
Do().
Into(result)
return
}
// Update takes the representation of a serviceRole and updates it. Returns the server's representation of the serviceRole, and an error, if there is any.
func (c *serviceRoles) Update(serviceRole *v1alpha1.ServiceRole) (result *v1alpha1.ServiceRole, err error) {
result = &v1alpha1.ServiceRole{}
err = c.client.Put().
Namespace(c.ns).
Resource("serviceroles").
Name(serviceRole.Name).
Body(serviceRole).
Do().
Into(result)
return
}
// Delete takes name of the serviceRole and deletes it. Returns an error if one occurs.
func (c *serviceRoles) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("serviceroles").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *serviceRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("serviceroles").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched serviceRole.
func (c *serviceRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ServiceRole, err error) {
result = &v1alpha1.ServiceRole{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("serviceroles").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"time"
v1alpha1 "istio.io/client-go/pkg/apis/rbac/v1alpha1"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// ServiceRoleBindingsGetter has a method to return a ServiceRoleBindingInterface.
// A group's client should implement this interface.
type ServiceRoleBindingsGetter interface {
ServiceRoleBindings(namespace string) ServiceRoleBindingInterface
}
// ServiceRoleBindingInterface has methods to work with ServiceRoleBinding resources.
type ServiceRoleBindingInterface interface {
Create(*v1alpha1.ServiceRoleBinding) (*v1alpha1.ServiceRoleBinding, error)
Update(*v1alpha1.ServiceRoleBinding) (*v1alpha1.ServiceRoleBinding, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1alpha1.ServiceRoleBinding, error)
List(opts v1.ListOptions) (*v1alpha1.ServiceRoleBindingList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ServiceRoleBinding, err error)
ServiceRoleBindingExpansion
}
// serviceRoleBindings implements ServiceRoleBindingInterface
type serviceRoleBindings struct {
client rest.Interface
ns string
}
// newServiceRoleBindings returns a ServiceRoleBindings
func newServiceRoleBindings(c *RbacV1alpha1Client, namespace string) *serviceRoleBindings {
return &serviceRoleBindings{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the serviceRoleBinding, and returns the corresponding serviceRoleBinding object, and an error if there is any.
func (c *serviceRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ServiceRoleBinding, err error) {
result = &v1alpha1.ServiceRoleBinding{}
err = c.client.Get().
Namespace(c.ns).
Resource("servicerolebindings").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of ServiceRoleBindings that match those selectors.
func (c *serviceRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ServiceRoleBindingList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ServiceRoleBindingList{}
err = c.client.Get().
Namespace(c.ns).
Resource("servicerolebindings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested serviceRoleBindings.
func (c *serviceRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("servicerolebindings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a serviceRoleBinding and creates it. Returns the server's representation of the serviceRoleBinding, and an error, if there is any.
func (c *serviceRoleBindings) Create(serviceRoleBinding *v1alpha1.ServiceRoleBinding) (result *v1alpha1.ServiceRoleBinding, err error) {
result = &v1alpha1.ServiceRoleBinding{}
err = c.client.Post().
Namespace(c.ns).
Resource("servicerolebindings").
Body(serviceRoleBinding).
Do().
Into(result)
return
}
// Update takes the representation of a serviceRoleBinding and updates it. Returns the server's representation of the serviceRoleBinding, and an error, if there is any.
func (c *serviceRoleBindings) Update(serviceRoleBinding *v1alpha1.ServiceRoleBinding) (result *v1alpha1.ServiceRoleBinding, err error) {
result = &v1alpha1.ServiceRoleBinding{}
err = c.client.Put().
Namespace(c.ns).
Resource("servicerolebindings").
Name(serviceRoleBinding.Name).
Body(serviceRoleBinding).
Do().
Into(result)
return
}
// Delete takes name of the serviceRoleBinding and deletes it. Returns an error if one occurs.
func (c *serviceRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("servicerolebindings").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *serviceRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("servicerolebindings").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched serviceRoleBinding.
func (c *serviceRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ServiceRoleBinding, err error) {
result = &v1alpha1.ServiceRoleBinding{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("servicerolebindings").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,158 @@
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"time"
v1beta1 "istio.io/client-go/pkg/apis/security/v1beta1"
scheme "istio.io/client-go/pkg/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
)
// AuthorizationPoliciesGetter has a method to return a AuthorizationPolicyInterface.
// A group's client should implement this interface.
type AuthorizationPoliciesGetter interface {
AuthorizationPolicies(namespace string) AuthorizationPolicyInterface
}
// AuthorizationPolicyInterface has methods to work with AuthorizationPolicy resources.
type AuthorizationPolicyInterface interface {
Create(*v1beta1.AuthorizationPolicy) (*v1beta1.AuthorizationPolicy, error)
Update(*v1beta1.AuthorizationPolicy) (*v1beta1.AuthorizationPolicy, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.AuthorizationPolicy, error)
List(opts v1.ListOptions) (*v1beta1.AuthorizationPolicyList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.AuthorizationPolicy, err error)
AuthorizationPolicyExpansion
}
// authorizationPolicies implements AuthorizationPolicyInterface
type authorizationPolicies struct {
client rest.Interface
ns string
}
// newAuthorizationPolicies returns a AuthorizationPolicies
func newAuthorizationPolicies(c *SecurityV1beta1Client, namespace string) *authorizationPolicies {
return &authorizationPolicies{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the authorizationPolicy, and returns the corresponding authorizationPolicy object, and an error if there is any.
func (c *authorizationPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.AuthorizationPolicy, err error) {
result = &v1beta1.AuthorizationPolicy{}
err = c.client.Get().
Namespace(c.ns).
Resource("authorizationpolicies").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of AuthorizationPolicies that match those selectors.
func (c *authorizationPolicies) List(opts v1.ListOptions) (result *v1beta1.AuthorizationPolicyList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.AuthorizationPolicyList{}
err = c.client.Get().
Namespace(c.ns).
Resource("authorizationpolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested authorizationPolicies.
func (c *authorizationPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("authorizationpolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
// Create takes the representation of a authorizationPolicy and creates it. Returns the server's representation of the authorizationPolicy, and an error, if there is any.
func (c *authorizationPolicies) Create(authorizationPolicy *v1beta1.AuthorizationPolicy) (result *v1beta1.AuthorizationPolicy, err error) {
result = &v1beta1.AuthorizationPolicy{}
err = c.client.Post().
Namespace(c.ns).
Resource("authorizationpolicies").
Body(authorizationPolicy).
Do().
Into(result)
return
}
// Update takes the representation of a authorizationPolicy and updates it. Returns the server's representation of the authorizationPolicy, and an error, if there is any.
func (c *authorizationPolicies) Update(authorizationPolicy *v1beta1.AuthorizationPolicy) (result *v1beta1.AuthorizationPolicy, err error) {
result = &v1beta1.AuthorizationPolicy{}
err = c.client.Put().
Namespace(c.ns).
Resource("authorizationpolicies").
Name(authorizationPolicy.Name).
Body(authorizationPolicy).
Do().
Into(result)
return
}
// Delete takes name of the authorizationPolicy and deletes it. Returns an error if one occurs.
func (c *authorizationPolicies) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("authorizationpolicies").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *authorizationPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("authorizationpolicies").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched authorizationPolicy.
func (c *authorizationPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.AuthorizationPolicy, err error) {
result = &v1beta1.AuthorizationPolicy{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("authorizationpolicies").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1beta1

View File

@@ -0,0 +1,4 @@
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,112 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "istio.io/client-go/pkg/apis/security/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeAuthorizationPolicies implements AuthorizationPolicyInterface
type FakeAuthorizationPolicies struct {
Fake *FakeSecurityV1beta1
ns string
}
var authorizationpoliciesResource = schema.GroupVersionResource{Group: "security", Version: "v1beta1", Resource: "authorizationpolicies"}
var authorizationpoliciesKind = schema.GroupVersionKind{Group: "security", Version: "v1beta1", Kind: "AuthorizationPolicy"}
// Get takes name of the authorizationPolicy, and returns the corresponding authorizationPolicy object, and an error if there is any.
func (c *FakeAuthorizationPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.AuthorizationPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(authorizationpoliciesResource, c.ns, name), &v1beta1.AuthorizationPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.AuthorizationPolicy), err
}
// List takes label and field selectors, and returns the list of AuthorizationPolicies that match those selectors.
func (c *FakeAuthorizationPolicies) List(opts v1.ListOptions) (result *v1beta1.AuthorizationPolicyList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(authorizationpoliciesResource, authorizationpoliciesKind, c.ns, opts), &v1beta1.AuthorizationPolicyList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.AuthorizationPolicyList{ListMeta: obj.(*v1beta1.AuthorizationPolicyList).ListMeta}
for _, item := range obj.(*v1beta1.AuthorizationPolicyList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested authorizationPolicies.
func (c *FakeAuthorizationPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(authorizationpoliciesResource, c.ns, opts))
}
// Create takes the representation of a authorizationPolicy and creates it. Returns the server's representation of the authorizationPolicy, and an error, if there is any.
func (c *FakeAuthorizationPolicies) Create(authorizationPolicy *v1beta1.AuthorizationPolicy) (result *v1beta1.AuthorizationPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(authorizationpoliciesResource, c.ns, authorizationPolicy), &v1beta1.AuthorizationPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.AuthorizationPolicy), err
}
// Update takes the representation of a authorizationPolicy and updates it. Returns the server's representation of the authorizationPolicy, and an error, if there is any.
func (c *FakeAuthorizationPolicies) Update(authorizationPolicy *v1beta1.AuthorizationPolicy) (result *v1beta1.AuthorizationPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(authorizationpoliciesResource, c.ns, authorizationPolicy), &v1beta1.AuthorizationPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.AuthorizationPolicy), err
}
// Delete takes name of the authorizationPolicy and deletes it. Returns an error if one occurs.
func (c *FakeAuthorizationPolicies) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(authorizationpoliciesResource, c.ns, name), &v1beta1.AuthorizationPolicy{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeAuthorizationPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(authorizationpoliciesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.AuthorizationPolicyList{})
return err
}
// Patch applies the patch and returns the patched authorizationPolicy.
func (c *FakeAuthorizationPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.AuthorizationPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(authorizationpoliciesResource, c.ns, name, pt, data, subresources...), &v1beta1.AuthorizationPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.AuthorizationPolicy), err
}

View File

@@ -0,0 +1,24 @@
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "istio.io/client-go/pkg/clientset/versioned/typed/security/v1beta1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeSecurityV1beta1 struct {
*testing.Fake
}
func (c *FakeSecurityV1beta1) AuthorizationPolicies(namespace string) v1beta1.AuthorizationPolicyInterface {
return &FakeAuthorizationPolicies{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeSecurityV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,5 @@
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
type AuthorizationPolicyExpansion interface{}

View File

@@ -0,0 +1,73 @@
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "istio.io/client-go/pkg/apis/security/v1beta1"
"istio.io/client-go/pkg/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type SecurityV1beta1Interface interface {
RESTClient() rest.Interface
AuthorizationPoliciesGetter
}
// SecurityV1beta1Client is used to interact with features provided by the security group.
type SecurityV1beta1Client struct {
restClient rest.Interface
}
func (c *SecurityV1beta1Client) AuthorizationPolicies(namespace string) AuthorizationPolicyInterface {
return newAuthorizationPolicies(c, namespace)
}
// NewForConfig creates a new SecurityV1beta1Client for the given config.
func NewForConfig(c *rest.Config) (*SecurityV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &SecurityV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new SecurityV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *SecurityV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new SecurityV1beta1Client for the given RESTClient.
func New(c rest.Interface) *SecurityV1beta1Client {
return &SecurityV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1beta1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *SecurityV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@@ -0,0 +1,30 @@
// Code generated by informer-gen. DO NOT EDIT.
package authentication
import (
v1alpha1 "istio.io/client-go/pkg/informers/externalversions/authentication/v1alpha1"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
}
type group struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@@ -0,0 +1,36 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// MeshPolicies returns a MeshPolicyInformer.
MeshPolicies() MeshPolicyInformer
// Policies returns a PolicyInformer.
Policies() PolicyInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// MeshPolicies returns a MeshPolicyInformer.
func (v *version) MeshPolicies() MeshPolicyInformer {
return &meshPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// Policies returns a PolicyInformer.
func (v *version) Policies() PolicyInformer {
return &policyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@@ -0,0 +1,72 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
time "time"
authenticationv1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha1 "istio.io/client-go/pkg/listers/authentication/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// MeshPolicyInformer provides access to a shared informer and lister for
// MeshPolicies.
type MeshPolicyInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.MeshPolicyLister
}
type meshPolicyInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewMeshPolicyInformer constructs a new informer for MeshPolicy type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewMeshPolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredMeshPolicyInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredMeshPolicyInformer constructs a new informer for MeshPolicy type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredMeshPolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AuthenticationV1alpha1().MeshPolicies().List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AuthenticationV1alpha1().MeshPolicies().Watch(options)
},
},
&authenticationv1alpha1.MeshPolicy{},
resyncPeriod,
indexers,
)
}
func (f *meshPolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredMeshPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *meshPolicyInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&authenticationv1alpha1.MeshPolicy{}, f.defaultInformer)
}
func (f *meshPolicyInformer) Lister() v1alpha1.MeshPolicyLister {
return v1alpha1.NewMeshPolicyLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
time "time"
authenticationv1alpha1 "istio.io/client-go/pkg/apis/authentication/v1alpha1"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha1 "istio.io/client-go/pkg/listers/authentication/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// PolicyInformer provides access to a shared informer and lister for
// Policies.
type PolicyInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.PolicyLister
}
type policyInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewPolicyInformer constructs a new informer for Policy type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewPolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredPolicyInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredPolicyInformer constructs a new informer for Policy type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredPolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AuthenticationV1alpha1().Policies(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AuthenticationV1alpha1().Policies(namespace).Watch(options)
},
},
&authenticationv1alpha1.Policy{},
resyncPeriod,
indexers,
)
}
func (f *policyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredPolicyInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *policyInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&authenticationv1alpha1.Policy{}, f.defaultInformer)
}
func (f *policyInformer) Lister() v1alpha1.PolicyLister {
return v1alpha1.NewPolicyLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,30 @@
// Code generated by informer-gen. DO NOT EDIT.
package config
import (
v1alpha2 "istio.io/client-go/pkg/informers/externalversions/config/v1alpha2"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha2 provides access to shared informers for resources in V1alpha2.
V1alpha2() v1alpha2.Interface
}
type group struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha2 returns a new v1alpha2.Interface.
func (g *group) V1alpha2() v1alpha2.Interface {
return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@@ -0,0 +1,73 @@
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha2
import (
time "time"
configv1alpha2 "istio.io/client-go/pkg/apis/config/v1alpha2"
versioned "istio.io/client-go/pkg/clientset/versioned"
internalinterfaces "istio.io/client-go/pkg/informers/externalversions/internalinterfaces"
v1alpha2 "istio.io/client-go/pkg/listers/config/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
)
// AttributeManifestInformer provides access to a shared informer and lister for
// AttributeManifests.
type AttributeManifestInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha2.AttributeManifestLister
}
type attributeManifestInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewAttributeManifestInformer constructs a new informer for AttributeManifest type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewAttributeManifestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredAttributeManifestInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredAttributeManifestInformer constructs a new informer for AttributeManifest type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredAttributeManifestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().AttributeManifests(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ConfigV1alpha2().AttributeManifests(namespace).Watch(options)
},
},
&configv1alpha2.AttributeManifest{},
resyncPeriod,
indexers,
)
}
func (f *attributeManifestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredAttributeManifestInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *attributeManifestInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&configv1alpha2.AttributeManifest{}, f.defaultInformer)
}
func (f *attributeManifestInformer) Lister() v1alpha2.AttributeManifestLister {
return v1alpha2.NewAttributeManifestLister(f.Informer().GetIndexer())
}

Some files were not shown because too many files have changed in this diff Show More