Documentation ¶
Index ¶
- Constants
- func KubeHTTPClient() (c http.Client, err error)
- func ListenAndServeMTLS(addr string, Handler http.Handler) error
- func NewKubeClientTLSWithoutM() (credentials.TransportCredentials, error)
- func NewKubeTLS() (*tls.Config, error)
- func NewKubeTLSCredentials() (credentials.TransportCredentials, error)
- func NewKubeTLSCredentialsOrDie() credentials.TransportCredentials
- func UserFromConnectionState(conn *tls.ConnectionState) (string, error)
- func UserFromGrpcContext(ctx context.Context) (string, error)
- func UserFromHTTPRequest(r http.Request) (string, error)
- func WithKubeTLSClientCreds() grpc.DialOption
- func WithKubeTLSClientCredsWithoutM() grpc.DialOption
- func WithKubeTLSServerCreds() grpc.ServerOption
Constants ¶
const ( KubeTLSSecretLocation = "/var/run/secrets/gauntletwizard.net/tls/" KubeTLSKeyLocation = KubeTLSSecretLocation + "tls.key" KubeTLSCertLocation = KubeTLSSecretLocation + "tls.crt" KubeTLSCALocation = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" )
Variables ¶
This section is empty.
Functions ¶
func KubeHTTPClient ¶
func ListenAndServeMTLS ¶
ListenAndServeMTLS is a wrapper like http.ListenAndServe but with sane defaults for use with KubeTLS. Specifically, it sets the TlS configuration to
func NewKubeClientTLSWithoutM ¶
func NewKubeClientTLSWithoutM() (credentials.TransportCredentials, error)
NewKubeClientTLSWithoutM is credentials.NewClientTLSFromFile with KubeTLS defaults
func NewKubeTLS ¶
NewKubeTLS constructs a TLS Configuration for use with KubeTLS, suitable for use in both client and server contexts
func NewKubeTLSCredentials ¶
func NewKubeTLSCredentials() (credentials.TransportCredentials, error)
NewKubeServerTLS is credentials.NewServerTLSFromFile with KubeTLS defaults
func NewKubeTLSCredentialsOrDie ¶
func NewKubeTLSCredentialsOrDie() credentials.TransportCredentials
NewKubeServerTLS is credentials.NewServerTLSFromFile with KubeTLS defaults
func UserFromConnectionState ¶
func UserFromConnectionState(conn *tls.ConnectionState) (string, error)
func WithKubeTLSClientCreds ¶
func WithKubeTLSClientCreds() grpc.DialOption
WithKubeTLSClientCreds is like grpc.WithTransportCredentials using KubeTLS's supplied It panics if the Kubernetes Credentials are not available
func WithKubeTLSClientCredsWithoutM ¶
func WithKubeTLSClientCredsWithoutM() grpc.DialOption
WithKubeTLSClientCreds is like grpc.WithTransportCredentials using KubeTLS's supplied It panics if the Kubernetes Credentials are not available
func WithKubeTLSServerCreds ¶
func WithKubeTLSServerCreds() grpc.ServerOption
WithKubeTLSServerCreds is like grpc.WithTransportCredentials using KubeTLS's supplied It panics if the Kubernetes Credentials are not available
Types ¶
This section is empty.