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

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, schemas collection.Schemas, domainSuffix string, configLedger ledger.Ledger, revision string) (*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, schemas collection.Schemas, domainSuffix string, configLedger ledger.Ledger, revision string) (*Client, error)

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

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 resource.GroupVersionKind, name, namespace string) error

Delete implements store interface

func (*Client) Get Uses

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

Get implements store interface

func (*Client) GetLedger Uses

func (cl *Client) GetLedger() ledger.Ledger

func (*Client) GetResourceAtVersion Uses

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

func (*Client) List Uses

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

List implements store interface

func (*Client) RegisterMockResourceCRD Uses

func (cl *Client) RegisterMockResourceCRD() error

deprecated - only used for CRD controller unit tests

func (*Client) Schemas Uses

func (cl *Client) Schemas() collection.Schemas

Schemas for the store

func (*Client) SetLedger Uses

func (cl *Client) SetLedger(l ledger.Ledger) error

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 10 packages. Updated 2020-04-05. Refresh now. Tools for package owners.