mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 12:06:37 +00:00
Handle private docker registry auth
This adds support for private docker registries, by adding an optional `registryAuth` field in the CreateFunctionRequest. Auth must be passed as base64-encoded basic auth, similar to how done in Docker file store credentials (~/.docker/config.json). Credentials are then passed to swarm at service creation.
This commit is contained in:
committed by
Alex Ellis
parent
6f68b72c21
commit
9e711b3b5d
@ -18,6 +18,11 @@ type CreateFunctionRequest struct {
|
||||
|
||||
// EnvVars provides overrides for functions.
|
||||
EnvVars map[string]string `json:"envVars"`
|
||||
|
||||
// RegistryAuth is the registry authentication (optional)
|
||||
// in the same encoded format as Docker native credentials
|
||||
// (see ~/.docker/config.json)
|
||||
RegistryAuth string `json:"registryAuth,omitempty"`
|
||||
}
|
||||
|
||||
type DeleteFunctionRequest struct {
|
||||
|
Reference in New Issue
Block a user