Merge pull request #8270 from andylibrian/log-driver-option-for-play-kube

Add --log-driver to play kube
This commit is contained in:
OpenShift Merge Robot
2020-11-10 12:29:19 +00:00
committed by GitHub
7 changed files with 38 additions and 7 deletions

View File

@ -22,6 +22,7 @@ func PlayKube(w http.ResponseWriter, r *http.Request) {
query := struct {
Network string `schema:"reference"`
TLSVerify bool `schema:"tlsVerify"`
LogDriver string `schema:"logDriver"`
}{
TLSVerify: true,
}
@ -62,11 +63,12 @@ func PlayKube(w http.ResponseWriter, r *http.Request) {
containerEngine := abi.ContainerEngine{Libpod: runtime}
options := entities.PlayKubeOptions{
Authfile: authfile,
Username: username,
Password: password,
Network: query.Network,
Quiet: true,
Authfile: authfile,
Username: username,
Password: password,
Network: query.Network,
Quiet: true,
LogDriver: query.LogDriver,
}
if _, found := r.URL.Query()["tlsVerify"]; found {
options.SkipTLSVerify = types.NewOptionalBool(!query.TLSVerify)

View File

@ -25,6 +25,10 @@ func (s *APIServer) registerPlayHandlers(r *mux.Router) error {
// type: boolean
// default: true
// description: Require HTTPS and verify signatures when contacting registries.
// - in: query
// name: logDriver
// type: string
// description: Logging driver for the containers in the pod.
// - in: body
// name: request
// description: Kubernetes YAML file.