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 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
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 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