tlsconfig

package
v2.10.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

+kubebuilder:validation:Optional

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module is a fx module that constructs annotated instance of *tls.Config.

Types

type ClientTLSConfig

type ClientTLSConfig struct {
	CertFile           string `json:"cert_file"`
	KeyFile            string `json:"key_file"`
	CAFile             string `json:"ca_file"`
	KeyLogWriter       string `json:"key_log_file"`
	InsecureSkipVerify bool   `json:"insecure_skip_verify"`
}

ClientTLSConfig is the configuration for client TLS. swagger:model +kubebuilder:object:generate=true

func (*ClientTLSConfig) DeepCopy

func (in *ClientTLSConfig) DeepCopy() *ClientTLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTLSConfig.

func (*ClientTLSConfig) DeepCopyInto

func (in *ClientTLSConfig) DeepCopyInto(out *ClientTLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClientTLSConfig) GetGRPCDialOptions

func (c *ClientTLSConfig) GetGRPCDialOptions(insecureEnabled bool) ([]grpc.DialOption, error)

GetGRPCDialOptions creates GRPC DialOptions for TLS.

func (*ClientTLSConfig) GetTLSConfig

func (c *ClientTLSConfig) GetTLSConfig() (*tls.Config, error)

GetTLSConfig initializes tls.Config from config options.

type Constructor

type Constructor struct {
	Name          string
	ConfigKey     string
	DefaultConfig ServerTLSConfig
}

Constructor holds fields to create an annotated instance of *tls.Config.

func (Constructor) Annotate

func (constructor Constructor) Annotate() fx.Option

Annotate creates an annotated instance of *tls.Config.

type ServerTLSConfig

type ServerTLSConfig struct {
	// Server Cert file path
	CertFile string `json:"cert_file"`
	// Server Key file path
	KeyFile string `json:"key_file"`
	// Client CA file path
	ClientCAFile string `json:"client_ca_file"`
	// Allowed CN
	AllowedCN string `json:"allowed_cn" validate:"omitempty,fqdn"`
	// Enabled TLS
	Enabled bool `json:"enabled" default:"false"`
}

ServerTLSConfig holds configuration for setting up server TLS support. swagger:model +kubebuilder:object:generate=true

func (*ServerTLSConfig) DeepCopy

func (in *ServerTLSConfig) DeepCopy() *ServerTLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerTLSConfig.

func (*ServerTLSConfig) DeepCopyInto

func (in *ServerTLSConfig) DeepCopyInto(out *ServerTLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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