github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/shim/options.go (about)

     1  // Copyright 2018 The gVisor Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     https://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package shim
    16  
    17  const optionsType = "io.containerd.runsc.v1.options"
    18  
    19  // options is runtime options for io.containerd.runsc.v1.
    20  type options struct {
    21  	// ShimCgroup is the cgroup the shim should be in.
    22  	ShimCgroup string `toml:"shim_cgroup" json:"shimCgroup"`
    23  
    24  	// IoUID is the I/O's pipes uid.
    25  	IoUID uint32 `toml:"io_uid" json:"ioUid"`
    26  
    27  	// IoGID is the I/O's pipes gid.
    28  	IoGID uint32 `toml:"io_gid" json:"ioGid"`
    29  
    30  	// BinaryName is the binary name of the runsc binary.
    31  	BinaryName string `toml:"binary_name" json:"binaryName"`
    32  
    33  	// Root is the runsc root directory.
    34  	Root string `toml:"root" json:"root"`
    35  
    36  	// LogLevel sets the logging level. Some of the possible values are: debug,
    37  	// info, warning.
    38  	//
    39  	// This configuration only applies when the shim is running as a service.
    40  	LogLevel string `toml:"log_level" json:"logLevel"`
    41  
    42  	// LogPath is the path to log directory. %ID% tags inside the string are
    43  	// replaced with the container ID.
    44  	//
    45  	// This configuration only applies when the shim is running as a service.
    46  	LogPath string `toml:"log_path" json:"logPath"`
    47  
    48  	// RunscConfig is a key/value map of all runsc flags.
    49  	RunscConfig map[string]string `toml:"runsc_config" json:"runscConfig"`
    50  }