Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefAuthDirectory default directory used to store files // to authenticate request in NGINX DefAuthDirectory = "/etc/nginx/auth" )
Variables ¶
View Source
var ( // ErrInvalidAuthType is return in case of unsupported authentication type ErrInvalidAuthType = errors.New("invalid authentication type") // ErrMissingAuthType is return when the annotation for authentication is missing ErrMissingAuthType = errors.New("authentication type is missing") // ErrMissingSecretName is returned when the name of the secret is missing ErrMissingSecretName = errors.New("secret name is missing") // ErrMissingAuthInSecret is returned when there is no auth key in secret data ErrMissingAuthInSecret = errors.New("the secret does not contains the auth key") // ErrMissingAnnotations is returned when the ingress rule // does not contains annotations related with authentication ErrMissingAnnotations = errors.New("missing authentication annotations") )
Functions ¶
This section is empty.
Types ¶
type Nginx ¶
Nginx returns authentication configuration for an Ingress rule
func ParseAnnotations ¶
func ParseAnnotations(kubeClient client.Interface, ing *extensions.Ingress, authDir string) (*Nginx, error)
ParseAnnotations parses the annotations contained in the ingress rule used to add authentication in the paths defined in the rule and generated an htpasswd compatible file to be used as source during the authentication process
Click to show internal directories.
Click to hide internal directories.