istio: Index | Files

package controller

import ""

Package controller provides an implementation of the config store and cache using Kubernetes Custom Resources and the informer framework from Kubernetes


Package Files

client.go controller.go


var (

    // InvalidCRDs contains a sync.Map keyed by the namespace/name of the entry, and has the error as value.
    // It can be used by tools like ctrlz to display the errors.
    InvalidCRDs atomic.Value

func NewController Uses

func NewController(client *Client, options controller2.Options) model.ConfigStoreCache

NewController creates a new Kubernetes controller for CRDs Use "" for namespace to listen for all namespace changes

type Client Uses

type Client struct {
    // contains filtered or unexported fields

Client is a basic REST client for CRDs implementing config store

func NewClient Uses

func NewClient(config string, context string, descriptor schema.Set, domainSuffix string, configLedger ledger.Ledger) (*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. You can also choose a config context by providing the desired context name.

func NewForConfig Uses

func NewForConfig(cfg *rest.Config, descriptor schema.Set, domainSuffix string, configLedger ledger.Ledger) (*Client, error)

NewForConfig creates a client to the Kubernetes API using a rest config.

func (*Client) ConfigDescriptor Uses

func (cl *Client) ConfigDescriptor() schema.Set

ConfigDescriptor for the store

func (*Client) Create Uses

func (cl *Client) Create(config model.Config) (string, error)

Create implements store interface

func (*Client) Delete Uses

func (cl *Client) Delete(typ, name, namespace string) error

Delete implements store interface

func (*Client) DeregisterResources Uses

func (cl *Client) DeregisterResources() error

DeregisterResources removes third party resources

func (*Client) Get Uses

func (cl *Client) Get(typ, name, namespace string) *model.Config

Get implements store interface

func (*Client) GetResourceAtVersion Uses

func (cl *Client) GetResourceAtVersion(version string, key string) (resourceVersion string, err error)

func (*Client) List Uses

func (cl *Client) List(typ, namespace string) ([]model.Config, error)

List implements store interface

func (*Client) RegisterResources Uses

func (cl *Client) RegisterResources() error

RegisterResources sends a request to create CRDs and waits for them to initialize

func (*Client) Update Uses

func (cl *Client) Update(config model.Config) (string, error)

Update implements store interface

func (*Client) Version Uses

func (cl *Client) Version() string

type ValidateFunc Uses

type ValidateFunc func(interface{}) error

Package controller imports 32 packages (graph) and is imported by 11 packages. Updated 2019-12-06. Refresh now. Tools for package owners.