Documentation ¶
Index ¶
- Constants
- Variables
- func ArtifactFactoryForSettings(ctx context.Context, settings *v1.Settings, ...) (factory.ResourceClientFactory, error)
- func ConfigFactoryForSettings(params ConfigFactoryParams, resourceCrd crd.Crd) (factory.ResourceClientFactory, error)
- func ConsulClientForSettings(ctx context.Context, settings *v1.Settings) (*consulapi.Client, error)
- func KubeServiceClientForSettings(ctx context.Context, settings *v1.Settings, ...) (skkube.ServiceClient, error)
- func NewVaultSecretClientFactory(client *api.Client, pathPrefix, rootKey string) factory.ResourceClientFactory
- func SecretFactoryForSettings(ctx context.Context, settings *v1.Settings, ...) (factory.ResourceClientFactory, error)
- func VaultClientForSettings(vaultSettings *v1.Settings_VaultSecrets) (*api.Client, error)
- type ConfigFactoryParams
Constants ¶
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 )
const DefaultPathPrefix = "secret"
The DefaultPathPrefix may be overridden to allow for non-standard vault mount paths
Variables ¶
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 ¶
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