clients

package
v1.15.0-beta8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultK8sQPS   = 50     // 10x the k8s-recommended default; gloo gets busy writing status updates
	DefaultK8sBurst = 100    // 10x the k8s-recommended default; gloo gets busy writing status updates
	DefaultRootKey  = "gloo" // used for vault and consul key-value storage
)
View Source
const DefaultPathPrefix = "secret"

The DefaultPathPrefix may be overridden to allow for non-standard vault mount paths

Variables

View Source
var DefaultConsulQueryOptions = &consulapi.QueryOptions{RequireConsistent: true, AllowStale: false}

DefaultConsulQueryOptions provides default query options for consul

Functions

func ArtifactFactoryForSettings

func ArtifactFactoryForSettings(ctx context.Context,
	settings *v1.Settings,
	sharedCache memory.InMemoryResourceCache,
	cfg **rest.Config,
	clientset *kubernetes.Interface,
	kubeCoreCache *cache.KubeCoreCache,
	consulClient *consulapi.Client,
	pluralName string) (factory.ResourceClientFactory, error)

ArtifactFactoryForSettings constructs a new ResourceClientFactory for Artifacts using Kubernetes, Directory, or Consul. settings.ArtifactSource or sharedCache must be non-nil

func ConfigFactoryForSettings

func ConfigFactoryForSettings(params ConfigFactoryParams, resourceCrd crd.Crd) (factory.ResourceClientFactory, error)

ConfigFactoryForSettings constructs a new ResourceClientFactory for Config using Kubernetes, Directory, or Consul. params.memory.sharedCache, resourceCrd+params.kube.restCfg OR params.consul.consulClient must be non-nil

func ConsulClientForSettings

func ConsulClientForSettings(ctx context.Context, settings *v1.Settings) (*consulapi.Client, error)

ConsulClientForSettings constructs a Consul API client for the configuration provided in the settings parameter.

func KubeServiceClientForSettings

func KubeServiceClientForSettings(ctx context.Context,
	settings *v1.Settings,
	sharedCache memory.InMemoryResourceCache,
	cfg **rest.Config,
	clientset *kubernetes.Interface,
	kubeCoreCache *cache.KubeCoreCache) (skkube.ServiceClient, error)

KubeServiceClientForSettings initializes a ServiceClient for the given settings. If we are using Config in Kubernetes, we use a Kubernetes ServiceClient, otherwise we use an in-memory client.

func NewVaultSecretClientFactory

func NewVaultSecretClientFactory(client *api.Client, pathPrefix, rootKey string) factory.ResourceClientFactory

NewVaultSecretClientFactory consumes a vault client along with a set of basic configurations for retrieving info with the client

func SecretFactoryForSettings

func SecretFactoryForSettings(ctx context.Context,
	settings *v1.Settings,
	sharedCache memory.InMemoryResourceCache,
	cfg **rest.Config,
	clientset *kubernetes.Interface,
	kubeCoreCache *cache.KubeCoreCache,
	vaultClient *vaultapi.Client,
	pluralName string) (factory.ResourceClientFactory, error)

SecretFactoryForSettings constructs a new ResourceClientFactory for Secrets using Kubernetes, Directory, or Vault. settings.SecretSource or sharedCache must be non-nil

func VaultClientForSettings

func VaultClientForSettings(vaultSettings *v1.Settings_VaultSecrets) (*api.Client, error)

Types

type ConfigFactoryParams

type ConfigFactoryParams struct {
	// contains filtered or unexported fields
}

func NewConfigFactoryParams

func NewConfigFactoryParams(settings *v1.Settings,
	sharedCache memory.InMemoryResourceCache,
	cache kube.SharedCache,
	cfg **rest.Config,
	consulClient *consulapi.Client) ConfigFactoryParams

NewConfigFactoryParams constructs a ConfigFactoryParams to pass into ConfigFactoryForSettings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL