Documentation
¶
Index ¶
- Constants
- func GetBootstrapperImage() string
- func GetBuildCommand(data data.DevfileData, devfileBuildCmd string) (buildCommand common.DevfileCommand, err error)
- func GetRunCommand(data data.DevfileData, devfileRunCmd string) (runCommand common.DevfileCommand, err error)
- func GetSupportedComponents(data data.DevfileData) []common.DevfileComponent
- func ValidateAndGetPushDevfileCommands(data data.DevfileData, devfileBuildCmd, devfileRunCmd string) (pushDevfileCommands []common.DevfileCommand, err error)
- type AdapterContext
- type ComponentAdapter
- type DevfileVolume
- type PredefinedDevfileCommands
- type PushParameters
- type Storage
- type StorageAdapter
Constants ¶
const ( // DefaultDevfileBuildCommand is a predefined devfile command for build DefaultDevfileBuildCommand PredefinedDevfileCommands = "devbuild" // DefaultDevfileRunCommand is a predefined devfile command for run DefaultDevfileRunCommand PredefinedDevfileCommands = "devrun" // SupervisordInitContainerName The init container name for supervisord SupervisordInitContainerName = "copy-supervisord" // SupervisordVolumeName Create a custom name and (hope) that users don't use the *exact* same name in their deployment (occlient.go) SupervisordVolumeName = "odo-supervisord-shared-data" // SupervisordMountPath The supervisord Mount Path for the container mounting the supervisord volume SupervisordMountPath = "/opt/odo/" // SupervisordBinaryPath The supervisord binary path inside the container volume mount SupervisordBinaryPath = "/opt/odo/bin/supervisord" // SupervisordConfFile The supervisord configuration file inside the container volume mount SupervisordConfFile = "/opt/odo/conf/devfile-supervisor.conf" // OdoInitImageContents The path to the odo init image contents OdoInitImageContents = "/opt/odo-init/." )
Variables ¶
This section is empty.
Functions ¶
func GetBootstrapperImage ¶ added in v1.1.2
func GetBootstrapperImage() string
GetBootstrapperImage returns the odo-init bootstrapper image
func GetBuildCommand ¶ added in v1.1.2
func GetBuildCommand(data data.DevfileData, devfileBuildCmd string) (buildCommand common.DevfileCommand, err error)
GetBuildCommand iterates through the components in the devfile and returns the build command
func GetRunCommand ¶ added in v1.1.2
func GetRunCommand(data data.DevfileData, devfileRunCmd string) (runCommand common.DevfileCommand, err error)
GetRunCommand iterates through the components in the devfile and returns the run command
func GetSupportedComponents ¶
func GetSupportedComponents(data data.DevfileData) []common.DevfileComponent
GetSupportedComponents iterates through the components in the devfile and returns a list of odo supported components
func ValidateAndGetPushDevfileCommands ¶ added in v1.1.2
func ValidateAndGetPushDevfileCommands(data data.DevfileData, devfileBuildCmd, devfileRunCmd string) (pushDevfileCommands []common.DevfileCommand, err error)
ValidateAndGetPushDevfileCommands validates the build and the run command, if provided through odo push or else checks the devfile for devBuild and devRun. It returns the build and run commands if its validated successfully, error otherwise.
Types ¶
type AdapterContext ¶
type AdapterContext struct { ComponentName string // ComponentName is the odo component name, it is NOT related to any devfile components Devfile devfileParser.DevfileObj // Devfile is the object returned by the Devfile parser }
AdapterContext is a construct that is common to all adapters
type ComponentAdapter ¶
type ComponentAdapter interface { Push(parameters PushParameters) error DoesComponentExist(cmpName string) bool Delete(labels map[string]string) error }
ComponentAdapter defines the functions that platform-specific adapters must implement
type DevfileVolume ¶
DevfileVolume is a struct for Devfile volume that is common to all the adapters
type PredefinedDevfileCommands ¶ added in v1.1.2
type PredefinedDevfileCommands string
PredefinedDevfileCommands encapsulates constants for predefined devfile commands
type PushParameters ¶ added in v1.1.2
type PushParameters struct { Path string // Path refers to the parent folder containing the source code to push up to a component WatchFiles []string // Optional: WatchFiles is the list of changed files detected by odo watch. If empty or nil, odo will check .odo/odo-file-index.json to determine changed files WatchDeletedFiles []string // Optional: WatchDeletedFiles is the list of deleted files detected by odo watch. If empty or nil, odo will check .odo/odo-file-index.json to determine deleted files IgnoredFiles []string // IgnoredFiles is the list of files to not push up to a component ForceBuild bool // ForceBuild determines whether or not to push all of the files up to a component or just files that have changed, added or removed. Show bool // Show tells whether the devfile command output should be shown on stdout DevfileBuildCmd string // DevfileBuildCmd takes the build command through the command line and overwrites devfile build command DevfileRunCmd string // DevfileRunCmd takes the run command through the command line and overwrites devfile run command }
PushParameters is a struct containing the parameters to be used when pushing to a devfile component
type Storage ¶
type Storage struct { Name string Volume DevfileVolume }
Storage is a struct that is common to all the adapters
type StorageAdapter ¶
StorageAdapter defines the storage functions that platform-specific adapters must implement