Documentation ¶
Overview ¶
Package crd provides an implementation of the config store and cache using Kubernetes Custom Resources and the informer framework from Kubernetes This implementation is adopted from github.com/istio/pilot/adapter/config/crd/
Index ¶
- func CreateRESTConfig(kubeconfig string) (restconfig *rest.Config, err error)
- type Client
- func (cl *Client) Create(entry config.Entry) (string, error)
- func (cl *Client) Delete(typ, name, namespace string) error
- func (cl *Client) DeregisterResources() error
- func (cl *Client) Descriptor() config.Descriptor
- func (cl *Client) Get(typ, name, namespace string) (*config.Entry, bool)
- func (cl *Client) List(typ, namespace string) ([]config.Entry, error)
- func (cl *Client) RegisterResources() error
- func (cl *Client) Update(entry config.Entry) (string, error)
- type FakeConfig
- func (in *FakeConfig) DeepCopy() *FakeConfig
- func (in *FakeConfig) DeepCopyInto(out *FakeConfig)
- func (in *FakeConfig) DeepCopyObject() runtime.Object
- func (in *FakeConfig) GetObjectMeta() meta_v1.ObjectMeta
- func (in *FakeConfig) GetSpec() map[string]interface{}
- func (in *FakeConfig) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *FakeConfig) SetSpec(spec map[string]interface{})
- type FakeConfigList
- type IstioKind
- func (in *IstioKind) DeepCopy() *IstioKind
- func (in *IstioKind) DeepCopyInto(out *IstioKind)
- func (in *IstioKind) DeepCopyObject() runtime.Object
- func (in *IstioKind) GetObjectMeta() meta_v1.ObjectMeta
- func (in *IstioKind) GetSpec() map[string]interface{}
- func (in *IstioKind) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *IstioKind) SetSpec(spec map[string]interface{})
- type IstioKindList
- type IstioObject
- type IstioObjectList
- type ServiceClass
- func (in *ServiceClass) DeepCopy() *ServiceClass
- func (in *ServiceClass) DeepCopyInto(out *ServiceClass)
- func (in *ServiceClass) DeepCopyObject() runtime.Object
- func (in *ServiceClass) GetObjectMeta() meta_v1.ObjectMeta
- func (in *ServiceClass) GetSpec() map[string]interface{}
- func (in *ServiceClass) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *ServiceClass) SetSpec(spec map[string]interface{})
- type ServiceClassList
- type ServicePlan
- func (in *ServicePlan) DeepCopy() *ServicePlan
- func (in *ServicePlan) DeepCopyInto(out *ServicePlan)
- func (in *ServicePlan) DeepCopyObject() runtime.Object
- func (in *ServicePlan) GetObjectMeta() meta_v1.ObjectMeta
- func (in *ServicePlan) GetSpec() map[string]interface{}
- func (in *ServicePlan) SetObjectMeta(metadata meta_v1.ObjectMeta)
- func (in *ServicePlan) SetSpec(spec map[string]interface{})
- type ServicePlanList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a basic REST client for CRDs implementing config store
func NewClient ¶
func NewClient(config string, descriptor config.Descriptor) (*Client, error)
NewClient creates a client to Kubernetes API using a kubeconfig file. Use an empty value for `kubeconfig` to use the in-cluster config. If the kubeconfig file is empty, defaults to in-cluster config as well.
func (*Client) DeregisterResources ¶
DeregisterResources removes third party resources
func (*Client) Descriptor ¶
func (cl *Client) Descriptor() config.Descriptor
Descriptor for the store
func (*Client) RegisterResources ¶
RegisterResources sends a request to create CRDs and waits for them to initialize
type FakeConfig ¶
type FakeConfig struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
FakeConfig is the generic Kubernetes API object wrapper
func (*FakeConfig) DeepCopy ¶
func (in *FakeConfig) DeepCopy() *FakeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FakeConfig.
func (*FakeConfig) DeepCopyInto ¶
func (in *FakeConfig) DeepCopyInto(out *FakeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FakeConfig) DeepCopyObject ¶
func (in *FakeConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*FakeConfig) GetObjectMeta ¶
func (in *FakeConfig) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*FakeConfig) GetSpec ¶
func (in *FakeConfig) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*FakeConfig) SetObjectMeta ¶
func (in *FakeConfig) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*FakeConfig) SetSpec ¶
func (in *FakeConfig) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type FakeConfigList ¶
type FakeConfigList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []*FakeConfig `json:"items"` }
FakeConfigList is the generic Kubernetes API list wrapper
func (*FakeConfigList) DeepCopy ¶
func (in *FakeConfigList) DeepCopy() *FakeConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FakeConfigList.
func (*FakeConfigList) DeepCopyInto ¶
func (in *FakeConfigList) DeepCopyInto(out *FakeConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FakeConfigList) DeepCopyObject ¶
func (in *FakeConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*FakeConfigList) GetItems ¶
func (in *FakeConfigList) GetItems() []IstioObject
GetItems from a wrapper
type IstioKind ¶
type IstioKind struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
IstioKind is the generic Kubernetes API object wrapper
func (*IstioKind) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioKind.
func (*IstioKind) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IstioKind) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IstioKind) GetObjectMeta ¶
func (in *IstioKind) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*IstioKind) SetObjectMeta ¶
func (in *IstioKind) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
type IstioKindList ¶
type IstioKindList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []*IstioKind `json:"items"` }
IstioKindList is the generic Kubernetes API list wrapper
func (*IstioKindList) DeepCopy ¶
func (in *IstioKindList) DeepCopy() *IstioKindList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioKindList.
func (*IstioKindList) DeepCopyInto ¶
func (in *IstioKindList) DeepCopyInto(out *IstioKindList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IstioKindList) DeepCopyObject ¶
func (in *IstioKindList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IstioKindList) GetItems ¶
func (in *IstioKindList) GetItems() []IstioObject
GetItems from a wrapper
type IstioObject ¶
type IstioObject interface { runtime.Object GetSpec() map[string]interface{} SetSpec(map[string]interface{}) GetObjectMeta() meta_v1.ObjectMeta SetObjectMeta(meta_v1.ObjectMeta) }
IstioObject is a k8s wrapper interface for config objects
type IstioObjectList ¶
type IstioObjectList interface { runtime.Object GetItems() []IstioObject }
IstioObjectList is a k8s wrapper interface for config lists
type ServiceClass ¶
type ServiceClass struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
ServiceClass is the generic Kubernetes API object wrapper
func (*ServiceClass) DeepCopy ¶
func (in *ServiceClass) DeepCopy() *ServiceClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceClass.
func (*ServiceClass) DeepCopyInto ¶
func (in *ServiceClass) DeepCopyInto(out *ServiceClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceClass) DeepCopyObject ¶
func (in *ServiceClass) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServiceClass) GetObjectMeta ¶
func (in *ServiceClass) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*ServiceClass) GetSpec ¶
func (in *ServiceClass) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*ServiceClass) SetObjectMeta ¶
func (in *ServiceClass) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*ServiceClass) SetSpec ¶
func (in *ServiceClass) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type ServiceClassList ¶
type ServiceClassList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []*ServiceClass `json:"items"` }
ServiceClassList is the generic Kubernetes API list wrapper
func (*ServiceClassList) DeepCopy ¶
func (in *ServiceClassList) DeepCopy() *ServiceClassList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceClassList.
func (*ServiceClassList) DeepCopyInto ¶
func (in *ServiceClassList) DeepCopyInto(out *ServiceClassList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceClassList) DeepCopyObject ¶
func (in *ServiceClassList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServiceClassList) GetItems ¶
func (in *ServiceClassList) GetItems() []IstioObject
GetItems from a wrapper
type ServicePlan ¶
type ServicePlan struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` }
ServicePlan is the generic Kubernetes API object wrapper
func (*ServicePlan) DeepCopy ¶
func (in *ServicePlan) DeepCopy() *ServicePlan
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePlan.
func (*ServicePlan) DeepCopyInto ¶
func (in *ServicePlan) DeepCopyInto(out *ServicePlan)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServicePlan) DeepCopyObject ¶
func (in *ServicePlan) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServicePlan) GetObjectMeta ¶
func (in *ServicePlan) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
func (*ServicePlan) GetSpec ¶
func (in *ServicePlan) GetSpec() map[string]interface{}
GetSpec from a wrapper
func (*ServicePlan) SetObjectMeta ¶
func (in *ServicePlan) SetObjectMeta(metadata meta_v1.ObjectMeta)
SetObjectMeta for a wrapper
func (*ServicePlan) SetSpec ¶
func (in *ServicePlan) SetSpec(spec map[string]interface{})
SetSpec for a wrapper
type ServicePlanList ¶
type ServicePlanList struct { meta_v1.TypeMeta `json:",inline"` meta_v1.ListMeta `json:"metadata"` Items []*ServicePlan `json:"items"` }
ServicePlanList is the generic Kubernetes API list wrapper
func (*ServicePlanList) DeepCopy ¶
func (in *ServicePlanList) DeepCopy() *ServicePlanList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePlanList.
func (*ServicePlanList) DeepCopyInto ¶
func (in *ServicePlanList) DeepCopyInto(out *ServicePlanList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServicePlanList) DeepCopyObject ¶
func (in *ServicePlanList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServicePlanList) GetItems ¶
func (in *ServicePlanList) GetItems() []IstioObject
GetItems from a wrapper