Documentation ¶
Index ¶
- Constants
- Variables
- func DevCloneName(name string) string
- func ExpandStackEnvs(file []byte) ([]byte, error)
- func GetAvailablePort(iface string) (int, error)
- func GetStackConfigMapName(stackName string) string
- func GetTimeout() (time.Duration, error)
- func GroupWarningsBySvc(fields []string) []string
- func IsAlreadyAdded(p PortInterface, ports []Port) bool
- func IsAlreadyAddedExpose(p Port, ports []Port) bool
- func IsPortAvailable(iface string, port int) bool
- func IsPortInService(port int32, ports []Port) bool
- func IsSkippablePort(port int32) bool
- func MergeDevWithDevRc(dev *Dev, devRc *DevRC)
- func SerializeEnvironmentVars(envs env.Environment) []string
- type Affinity
- type AffinityRaw
- type Annotations
- type Archetype
- type Args
- type ArgsStack
- type Artifact
- type Capabilities
- type Command
- type CommandStack
- type ComposeInfo
- type ComposeInfoList
- type ComposeSectionInfo
- type ComposeServices
- type ContextResource
- type DependsOn
- type DependsOnCondition
- type DependsOnConditionSpec
- type DeployCommand
- type DeployComposeResources
- type DeployInfo
- type DeployInfoRaw
- type DestroyInfo
- type Dev
- func (dev *Dev) AreDefaultPersistentVolumeValues() bool
- func (dev *Dev) GetVolumeName() string
- func (dev *Dev) HasDefaultPersistentVolumeSize() bool
- func (dev *Dev) IsHybridModeEnabled() bool
- func (dev *Dev) IsInteractive() bool
- func (dev *Dev) IsSubPathFolder(path string) (bool, error)
- func (dev *Dev) LabelsSelector() string
- func (dev *Dev) LoadForcePull()
- func (dev *Dev) LoadRemote(pubKeyPath string)
- func (d *Dev) MarshalYAML() (interface{}, error)
- func (dev *Dev) PersistentVolumeEnabled() bool
- func (dev *Dev) PersistentVolumeSize() string
- func (dev *Dev) PersistentVolumeStorageClass() string
- func (dev *Dev) PreparePathsAndExpandEnvFiles(manifestPath string, fs afero.Fs) error
- func (dev *Dev) RemoteModeEnabled() bool
- func (dev *Dev) RunAsNonRoot() bool
- func (dev *Dev) Save(path string) error
- func (dev *Dev) SetDefaults() error
- func (dev *Dev) SetLastBuiltAnnotation()
- func (dev *Dev) ToTranslationRule(main *Dev, reset bool) *TranslationRule
- func (d *Dev) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (dev *Dev) Validate() error
- type DevRC
- type DivertDeploy
- type DivertHost
- type DivertVirtualService
- type Duration
- type Endpoint
- type EndpointRule
- type EndpointSpec
- type Entrypoint
- type Envs
- type ExternalVolume
- type HTTPHealtcheck
- type HealtcheckTest
- type HealthCheck
- type ImageFromManifest
- type InitContainer
- type LabelSelector
- type LabelSelectorRequirement
- type Labels
- type Lifecycle
- type Manifest
- func Get(devPath string, fs afero.Fs) (*Manifest, error)
- func GetInferredManifest(cwd string, fs afero.Fs) (*Manifest, error)
- func GetManifestV1(manifestPath string, fs afero.Fs) (*Manifest, error)
- func GetManifestV2(manifestPath string, fs afero.Fs) (*Manifest, error)
- func NewManifest() *Manifest
- func NewManifestFromDev(dev *Dev) *Manifest
- func NewManifestFromStack(stack *Stack) *Manifest
- func Read(bytes []byte) (*Manifest, error)
- func (manifest *Manifest) ExpandEnvVars() error
- func (m *Manifest) GetBuildServices() map[string]bool
- func (m *Manifest) GetStack() *Stack
- func (m *Manifest) HasBuildSection() bool
- func (m *Manifest) HasDependencies() bool
- func (m *Manifest) HasDependenciesSection() bool
- func (m *Manifest) HasDeploySection() bool
- func (m *Manifest) InferFromStack(cwd string) (*Manifest, error)
- func (m *Manifest) IsDeployDefault() bool
- func (m *Manifest) MarshalYAML() (interface{}, error)
- func (m *Manifest) SanitizeSvcNames() error
- func (m *Manifest) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (m *Manifest) WriteToFile(filePath string) error
- type ManifestDevs
- type ManifestTests
- type Metadata
- type NodeAffinity
- type NodeSelector
- type NodeSelectorRequirement
- type NodeSelectorTerm
- type PersistentVolumeInfo
- type PodAffinity
- type PodAffinityTerm
- type PodAntiAffinity
- type Port
- type PortInterface
- type PortRaw
- type PreferredSchedulingTerm
- type Probes
- type Quantity
- type RawMessage
- type ResourceList
- type ResourceRequirements
- type ResourcesRaw
- type RestartPolicyRaw
- type Reverse
- type Secret
- type SecurityContext
- type Selector
- type Service
- type ServiceRaw
- type ServiceResources
- type ServicesToDeploy
- type Stack
- type StackRaw
- type StackResources
- type StackSecurityContext
- type StackWarnings
- type StorageResource
- type Sync
- type SyncFolder
- type Test
- type TestCommand
- type Timeout
- type TranslationRule
- type Volume
- type VolumeMount
- type VolumeSpec
- type VolumeTopLevel
- type WarningType
- type WeightedPodAffinityTerm
Constants ¶
const ( // DevCloneLabel indicates it is a dev pod clone DevCloneLabel = "dev.okteto.com/clone" // AppReplicasAnnotation indicates the number of replicas before dev mode was activated AppReplicasAnnotation = "dev.okteto.com/replicas" // InteractiveDevLabel indicates the interactive dev pod InteractiveDevLabel = "interactive.dev.okteto.com" // OktetoSampleAnnotation indicates that the repo is a okteto sample OktetoSampleAnnotation = "dev.okteto.com/sample" // OktetoComposeUpdateStrategyAnnotation indicates how a compose service must be updated OktetoComposeUpdateStrategyAnnotation = "dev.okteto.com/update" // DetachedDevLabel indicates the detached dev pods DetachedDevLabel = "detached.dev.okteto.com" // DeploymentRevisionAnnotation indicates the revision when the development container was activated DeploymentRevisionAnnotation = "deployment.kubernetes.io/revision" // OktetoRevisionAnnotation indicates the revision when the development container was activated OktetoRevisionAnnotation = "dev.okteto.com/revision" // DeploymentAnnotation indicates the original deployment manifest when the development container was activated DeploymentAnnotation = "dev.okteto.com/deployment" // StatefulsetAnnotation indicates the original statefulset manifest when the development container was activated StatefulsetAnnotation = "dev.okteto.com/statefulset" // LastBuiltAnnotation indicates the timestamp of an operation LastBuiltAnnotation = "dev.okteto.com/last-built" // TranslationAnnotation sets the translation rules TranslationAnnotation = "dev.okteto.com/translation" // OktetoRepositoryAnnotation indicates the git repo url with the source code of this component OktetoRepositoryAnnotation = "dev.okteto.com/repository" // OktetoDevNameAnnotation indicates the name of the dev to be deployed OktetoDevNameAnnotation = "dev.okteto.com/name" // FluxAnnotation indicates if the deployment ha been deployed by Flux FluxAnnotation = "helm.fluxcd.io/antecedent" // DefaultStorageClassAnnotation indicates the defaault storage class DefaultStorageClassAnnotation = "storageclass.kubernetes.io/is-default-class" // StateBeforeSleepingAnnontation indicates the state of the resource prior to scale it to zero StateBeforeSleepingAnnontation = "dev.okteto.com/state-before-sleeping" // DeployedByLabel indicates the service account that deployed an object DeployedByLabel = "dev.okteto.com/deployed-by" // GitDeployLabel indicates the object is an app GitDeployLabel = "dev.okteto.com/git-deploy" // StackLabel indicates the object is a stack StackLabel = "stack.okteto.com" // StackNameLabel indicates the name of the stack an object belongs to StackNameLabel = "stack.okteto.com/name" // StackServiceNameLabel indicates the name of the stack service an object belongs to StackServiceNameLabel = "stack.okteto.com/service" // StackEndpointNameLabel indicates the name of the endpoint an object belongs to StackEndpointNameLabel = "stack.okteto.com/endpoint" // OktetoIngressAutoGenerateHost generates a ingress host for OktetoIngressAutoGenerateHost = "dev.okteto.com/generate-host" // OktetoAutoIngressAnnotation indicates an ingress must be created for a service OktetoAutoIngressAnnotation = "dev.okteto.com/auto-ingress" // OktetoPrivateSvcAnnotation indicates an ingress must be created private OktetoPrivateSvcAnnotation = "dev.okteto.com/private" // OktetoInstallerRunningLabel indicates the okteto installer is running on this resource OktetoInstallerRunningLabel = "dev.okteto.com/installer-running" // StackVolumeNameLabel indicates the name of the stack volume an object belongs to StackVolumeNameLabel = "stack.okteto.com/volume" // Localhost localhost Localhost = "localhost" // PrivilegedLocalhost localhost PrivilegedLocalhost = "0.0.0.0" // OktetoUpCmd up command OktetoUpCmd = "up" // OktetoPushCmd push command OktetoPushCmd = "push" // OktetoVolumeNameTemplate name template of the development container persistent volume OktetoVolumeNameTemplate = "%s-okteto" // DataSubPath subpath in the development container persistent volume for the data volumes DataSubPath = "data" // SourceCodeSubPath subpath in the development container persistent volume for the source code SourceCodeSubPath = "src" // OktetoSyncthingMountPath syncthing volume mount path OktetoSyncthingMountPath = "/var/syncthing" // RemoteMountPath remote volume mount path RemoteMountPath = "/var/okteto/remote" // SyncthingSubPath subpath in the development container persistent volume for the syncthing data SyncthingSubPath = "syncthing" // DefaultSyncthingRescanInterval default syncthing re-scan interval DefaultSyncthingRescanInterval = 300 // RemoteSubPath subpath in the development container persistent volume for the remote data RemoteSubPath = "okteto-remote" // OktetoAutoCreateAnnotation indicates if the deployment was auto generated by okteto up OktetoAutoCreateAnnotation = "dev.okteto.com/auto-create" // OktetoRestartAnnotation indicates the dev pod must be recreated to pull the latest version of its image OktetoRestartAnnotation = "dev.okteto.com/restart" // OktetoSyncAnnotation indicates the hash of the sync folders to force redeployment OktetoSyncAnnotation = "dev.okteto.com/sync" // OktetoStignoreAnnotation indicates the hash of the stignore files to force redeployment OktetoStignoreAnnotation = "dev.okteto.com/stignore" // DefaultImage default image for sandboxes DefaultImage = "okteto/dev:latest" // HelmSecretType indicates the type for secrets created by Helm HelmSecretType = "helm.sh/release.v1" // OktetoRegistryURLEnvVar is the url of the Okteto Registry OktetoRegistryURLEnvVar = "OKTETO_REGISTRY_URL" // OktetoBuildkitHostURLEnvVar is the url of the Okteto Buildkit instance OktetoBuildkitHostURLEnvVar = "BUILDKIT_HOST" // OktetoBinEnvVar defines the okteto binary that should be used OktetoBinEnvVar = "OKTETO_BIN" // OktetoSkipCleanupEnvVar defines the okteto binary that should be used OktetoSkipCleanupEnvVar = "OKTETO_SKIP_CLEANUP" // OktetoUserEnvVar defines the user using okteto OktetoUserEnvVar = "OKTETO_USER" // OktetoUserNameEnvVar defines the user is using okteto OktetoUserNameEnvVar = "OKTETO_USERNAME" // OktetoTokenEnvVar defines the environmental variable that stores the okteto user token OktetoTokenEnvVar = "OKTETO_TOKEN" // OktetoURLEnvVar defines the cluster url the user is using OktetoURLEnvVar = "OKTETO_URL" // OktetoContextEnvVar defines the k8s context the user is using OktetoContextEnvVar = "OKTETO_CONTEXT" // OktetoNamespaceEnvVar defines the namespace the user is using OktetoNamespaceEnvVar = "OKTETO_NAMESPACE" // OktetoDomainEnvVar defines the domain the user is using OktetoDomainEnvVar = "OKTETO_DOMAIN" // SyncthingVersionEnvVar defines the syncthing version okteto should use SyncthingVersionEnvVar = "OKTETO_SYNCTHING_VERSION" // OktetoSkipContextTestEnvVar if set skips the context test OktetoSkipContextTestEnvVar = "OKTETO_SKIP_CONTEXT_TEST" // OktetoAutoDeployEnvVar if set the application will be deployed while running okteto up OktetoAutoDeployEnvVar = "OKTETO_AUTODEPLOY" // OktetoAppsSubdomainEnvVar defines which is the subdomain for urls OktetoAppsSubdomainEnvVar = "OKTETO_APPS_SUBDOMAIN" // OktetoPathEnvVar defines where is okteto binary OktetoPathEnvVar = "OKTETO_PATH" // OktetoExecuteSSHEnvVar defines if the command should be executed through ssh OktetoExecuteSSHEnvVar = "OKTETO_EXECUTE_SSH" // OktetoSSHTimeoutEnvVar defines the timeout for ssh operations OktetoSSHTimeoutEnvVar = "OKTETO_SSH_TIMEOUT" // OktetoRescanIntervalEnvVar defines the time between scans for syncthing OktetoRescanIntervalEnvVar = "OKTETO_RESCAN_INTERVAL" // DeprecatedOktetoCurrentDeployBelongsToPreviewEnvVar if set the current okteto deploy belongs // to a preview environment DeprecatedOktetoCurrentDeployBelongsToPreviewEnvVar = "OKTETO_CURRENT_DEPLOY_BELONGS_TO_PREVIEW" // OktetoTimeoutEnvVar defines the timeout for okteto commands OktetoTimeoutEnvVar = "OKTETO_TIMEOUT" // SshAuthSockEnvVar contains the path of the unix file socket that the agent uses for communication with other processes SshAuthSockEnvVar = "SSH_AUTH_SOCK" // TermEnvVar defines the type of terminal the user is using TermEnvVar = "TERM" // GithubRepositoryEnvVar defines the repository to be used GithubRepositoryEnvVar = "GITHUB_REPOSITORY" // GithubRefEnvVar defines the branch to be used GithubRefEnvVar = "GITHUB_REF" // GithubServerURLEnvVar defines the server to be used GithubServerURLEnvVar = "GITHUB_SERVER_URL" // ComposeFileEnvVar defines the compose files to use ComposeFileEnvVar = "COMPOSE_FILE" // BuildkitProgressEnvVar defines the output of buildkit BuildkitProgressEnvVar = "BUILDKIT_PROGRESS" // OktetoActionNameEnvVar defines the name of the pipeline action name OktetoActionNameEnvVar = "OKTETO_ACTION_NAME" // OktetoComposeUpdateStrategyEnvVar defines the strategy on compose to update the services OktetoComposeUpdateStrategyEnvVar = "OKTETO_COMPOSE_UPDATE_STRATEGY" // OktetoAutogenerateStignoreEnvVar skips the autogenerate stignore dialog and creates the default one OktetoAutogenerateStignoreEnvVar = "OKTETO_AUTOGENERATE_STIGNORE" // OktetoDefaultImageTag default tag assigned to image to build OktetoDefaultImageTag = "okteto" // IgnoreFilename is the name of the okteto ignore file IgnoreFilename = ".oktetoignore" )
const (
DefaultReplicasNumber = 1
)
const (
// FakeCommand prints into terminal a fake command
FakeCommand = "echo 'Replace this line with the proper 'helm' or 'kubectl' commands to deploy your development environment'"
)
Variables ¶
var ( // OktetoBinImageTag image tag with okteto internal binaries OktetoBinImageTag = "okteto/bin:1.5.0" // ValidKubeNameRegex is the regex to validate a kubernetes resource name ValidKubeNameRegex = regexp.MustCompile(`[^a-z0-9\-]+`) )
var (
ErrNoTestsDefined = fmt.Errorf("no tests defined")
)
Functions ¶
func DevCloneName ¶
DevCloneName returns the name of the mirrored version of a given resource
func ExpandStackEnvs ¶
ExpandStackEnvs returns the stack manifest with expanded envs
func GetAvailablePort ¶
GetAvailablePort returns a random port that's available
func GetStackConfigMapName ¶
GetStackConfigMapName returns the label selector for the stack name
func GroupWarningsBySvc ¶
func IsAlreadyAdded ¶
func IsAlreadyAdded(p PortInterface, ports []Port) bool
IsAlreadyAdded checks if a port is already on port list
func IsAlreadyAddedExpose ¶
func IsPortAvailable ¶
IsPortAvailable returns true if the port is already taken
func IsPortInService ¶
func IsSkippablePort ¶
func MergeDevWithDevRc ¶
func SerializeEnvironmentVars ¶
func SerializeEnvironmentVars(envs env.Environment) []string
SerializeEnvironmentVars returns environment variables as a list of strings
Types ¶
type Affinity ¶
func (*Affinity) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg. Unmarshal into our yaml affinity to marshal it into json and unmarshal it with the apiv1.Affinity.
type AffinityRaw ¶
type AffinityRaw struct { NodeAffinity *NodeAffinity `yaml:"nodeAffinity,omitempty" json:"nodeAffinity,omitempty"` PodAffinity *PodAffinity `yaml:"podAffinity,omitempty" json:"podAffinity,omitempty"` PodAntiAffinity *PodAntiAffinity `yaml:"podAntiAffinity,omitempty" json:"podAntiAffinity,omitempty"` }
type Annotations ¶
Annotations is a set of (key, value) pairs.
func (*Annotations) UnmarshalYAML ¶
func (a *Annotations) UnmarshalYAML(unmarshal func(interface{}) error) error
type Archetype ¶
type Archetype string
Archetype represents the type of manifest
var ( // StackType represents a stack manifest type StackType Archetype = "compose" // OktetoType represents a okteto manifest type OktetoType Archetype = "okteto" // OktetoManifestType represents a okteto manifest type OktetoManifestType Archetype = "manifest" // PipelineType represents a okteto pipeline manifest type PipelineType Archetype = "pipeline" // KubernetesType represents a k8s manifest type KubernetesType Archetype = "kubernetes" // ChartType represents a k8s manifest type ChartType Archetype = "chart" )
type Args ¶
type Args struct {
Values []string
}
Args represents the args of a development container
func (Args) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Args) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type ArgsStack ¶
type ArgsStack struct {
Values []string
}
ArgsStack represents an okteto stack args
func (*ArgsStack) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Artifact ¶
type Artifact struct { Path string `yaml:"path,omitempty"` Destination string `yaml:"destination,omitempty"` }
func (*Artifact) UnmarshalYAML ¶
type Capabilities ¶
type Capabilities struct { Add []apiv1.Capability `json:"add,omitempty" yaml:"add,omitempty"` Drop []apiv1.Capability `json:"drop,omitempty" yaml:"drop,omitempty"` }
Capabilities sets the linux capabilities of a container
type Command ¶
type Command struct {
Values []string
}
Command represents the start command of a development container
func (Command) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Command) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type CommandStack ¶
type CommandStack struct {
Values []string
}
CommandStack represents an okteto stack command
func (*CommandStack) UnmarshalYAML ¶
func (c *CommandStack) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type ComposeInfo ¶
type ComposeInfo struct { File string `json:"file,omitempty" yaml:"file,omitempty"` ServicesToDeploy ServicesToDeploy `json:"services,omitempty" yaml:"services,omitempty"` }
func (*ComposeInfo) UnmarshalYAML ¶
func (c *ComposeInfo) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type ComposeInfoList ¶
type ComposeInfoList []ComposeInfo
func (*ComposeInfoList) UnmarshalYAML ¶
func (c *ComposeInfoList) UnmarshalYAML(unmarshal func(interface{}) error) error
type ComposeSectionInfo ¶
type ComposeSectionInfo struct { Stack *Stack `json:"-" yaml:"-"` ComposesInfo ComposeInfoList `json:"manifest,omitempty" yaml:"manifest,omitempty"` }
ComposeSectionInfo represents information about compose file
func (*ComposeSectionInfo) MarshalYAML ¶
func (c *ComposeSectionInfo) MarshalYAML() (interface{}, error)
MarshalYAML Implements the Unmarshaler interface of the yaml pkg.
func (*ComposeSectionInfo) UnmarshalYAML ¶
func (c *ComposeSectionInfo) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type ComposeServices ¶
ComposeServices represents the services declared in the compose
func (ComposeServices) ValidateDependsOn ¶
func (cs ComposeServices) ValidateDependsOn(svcs []string) error
type ContextResource ¶
ContextResource provides the context and namespace to operate within a manifest
func GetContextResource ¶
func GetContextResource(path string) (*ContextResource, error)
GetContextResource returns a ContextResource object from a given file
func (*ContextResource) UpdateContext ¶
func (c *ContextResource) UpdateContext(okCtx string) error
UpdateContext updates the context from the resource
func (*ContextResource) UpdateNamespace ¶
func (c *ContextResource) UpdateNamespace(okNs string) error
UpdateNamespace updates the namespace from the resource
type DependsOn ¶
type DependsOn map[string]DependsOnConditionSpec
func (*DependsOn) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type DependsOnCondition ¶
type DependsOnCondition string
const ( DependsOnServiceHealthy DependsOnCondition = "service_healthy" DependsOnServiceRunning DependsOnCondition = "service_started" DependsOnServiceCompleted DependsOnCondition = "service_completed_successfully" )
type DependsOnConditionSpec ¶
type DependsOnConditionSpec struct {
Condition DependsOnCondition `json:"condition,omitempty" yaml:"condition,omitempty"`
}
type DeployCommand ¶
type DeployCommand struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Command string `json:"command,omitempty" yaml:"command,omitempty"` }
DeployCommand represents a command to be executed
func (*DeployCommand) UnmarshalYAML ¶
func (d *DeployCommand) UnmarshalYAML(unmarshal func(interface{}) error) error
type DeployComposeResources ¶
type DeployComposeResources struct { Devices *WarningType `json:"devices,omitempty" yaml:"devices,omitempty"` Extensions map[string]interface{} `yaml:",inline" json:"-"` Cpus Quantity `json:"cpus,omitempty" yaml:"cpus,omitempty"` Memory Quantity `json:"memory,omitempty" yaml:"memory,omitempty"` }
type DeployInfo ¶
type DeployInfo struct { ComposeSection *ComposeSectionInfo `json:"compose,omitempty" yaml:"compose,omitempty"` Endpoints EndpointSpec `json:"endpoints,omitempty" yaml:"endpoints,omitempty"` Divert *DivertDeploy `json:"divert,omitempty" yaml:"divert,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` Commands []DeployCommand `json:"commands,omitempty" yaml:"commands,omitempty"` Remote bool `json:"remote,omitempty" yaml:"remote,omitempty"` }
DeployInfo represents what must be deployed for the app to work
func (*DeployInfo) MarshalYAML ¶
func (d *DeployInfo) MarshalYAML() (interface{}, error)
func (*DeployInfo) UnmarshalYAML ¶
func (d *DeployInfo) UnmarshalYAML(unmarshal func(interface{}) error) error
type DeployInfoRaw ¶
type DeployInfoRaw struct { Replicas *int32 `yaml:"replicas,omitempty"` Labels Labels `yaml:"labels,omitempty"` RestartPolicy *RestartPolicyRaw `yaml:"restart_policy,omitempty"` EndpointMode *WarningType `yaml:"endpoint_mode,omitempty"` Mode *WarningType `yaml:"mode,omitempty"` Placement *WarningType `yaml:"placement,omitempty"` Constraints *WarningType `yaml:"constraints,omitempty"` Preferences *WarningType `yaml:"preferences,omitempty"` RollbackConfig *WarningType `yaml:"rollback_config,omitempty"` UpdateConfig *WarningType `yaml:"update_config,omitempty"` Extensions map[string]interface{} `yaml:",inline" json:"-"` Resources ResourcesRaw `yaml:"resources,omitempty"` }
type DestroyInfo ¶
type DestroyInfo struct { Image string `json:"image,omitempty" yaml:"image,omitempty"` Commands []DeployCommand `json:"commands,omitempty" yaml:"commands,omitempty"` Remote bool `json:"remote,omitempty" yaml:"remote,omitempty"` }
DestroyInfo represents what must be destroyed for the app
func (*DestroyInfo) MarshalYAML ¶
func (d *DestroyInfo) MarshalYAML() (interface{}, error)
func (*DestroyInfo) UnmarshalYAML ¶
func (d *DestroyInfo) UnmarshalYAML(unmarshal func(interface{}) error) error
type Dev ¶
type Dev struct { Resources ResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"` Selector Selector `json:"selector,omitempty" yaml:"selector,omitempty"` PersistentVolumeInfo *PersistentVolumeInfo `json:"persistentVolume,omitempty" yaml:"persistentVolume,omitempty"` SecurityContext *SecurityContext `json:"securityContext,omitempty" yaml:"securityContext,omitempty"` Annotations Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` Labels Labels `json:"labels,omitempty" yaml:"labels,omitempty"` // Deprecated field Probes *Probes `json:"probes,omitempty" yaml:"probes,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` Affinity *Affinity `json:"affinity,omitempty" yaml:"affinity,omitempty"` Image *build.Info `json:"image,omitempty" yaml:"image,omitempty"` Push *build.Info `json:"-" yaml:"push,omitempty"` Lifecycle *Lifecycle `json:"lifecycle,omitempty" yaml:"lifecycle,omitempty"` Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty"` InitContainer InitContainer `json:"initContainer,omitempty" yaml:"initContainer,omitempty"` Workdir string `json:"workdir,omitempty" yaml:"workdir,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Username string `json:"-" yaml:"-"` RegistryURL string `json:"-" yaml:"-"` Context string `json:"context,omitempty" yaml:"context,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` Container string `json:"container,omitempty" yaml:"container,omitempty"` ServiceAccount string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"` Interface string `json:"interface,omitempty" yaml:"interface,omitempty"` Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` ImagePullPolicy apiv1.PullPolicy `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` Tolerations []apiv1.Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"` Command Command `json:"command,omitempty" yaml:"command,omitempty"` Forward []forward.Forward `json:"forward,omitempty" yaml:"forward,omitempty"` Reverse []Reverse `json:"reverse,omitempty" yaml:"reverse,omitempty"` ExternalVolumes []ExternalVolume `json:"externalVolumes,omitempty" yaml:"externalVolumes,omitempty"` Secrets []Secret `json:"secrets,omitempty" yaml:"secrets,omitempty"` Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"` EnvFiles env.Files `json:"envFiles,omitempty" yaml:"envFiles,omitempty"` Environment env.Environment `json:"environment,omitempty" yaml:"environment,omitempty"` Services []*Dev `json:"services,omitempty" yaml:"services,omitempty"` Args Command `json:"args,omitempty" yaml:"args,omitempty"` Sync Sync `json:"sync,omitempty" yaml:"sync,omitempty"` Timeout Timeout `json:"timeout,omitempty" yaml:"timeout,omitempty"` RemotePort int `json:"remote,omitempty" yaml:"remote,omitempty"` SSHServerPort int `json:"sshServerPort,omitempty" yaml:"sshServerPort,omitempty"` EmptyImage bool `json:"-" yaml:"-"` InitFromImage bool `json:"initFromImage,omitempty" yaml:"initFromImage,omitempty"` Autocreate bool `json:"autocreate,omitempty" yaml:"autocreate,omitempty"` Healthchecks bool `json:"healthchecks,omitempty" yaml:"healthchecks,omitempty"` // Deprecated field // contains filtered or unexported fields }
Dev represents a development container
func (*Dev) AreDefaultPersistentVolumeValues ¶
func (*Dev) GetVolumeName ¶
GetVolumeName returns the okteto volume name for a given development container
func (*Dev) HasDefaultPersistentVolumeSize ¶
func (*Dev) IsHybridModeEnabled ¶
func (*Dev) IsInteractive ¶
func (*Dev) IsSubPathFolder ¶
IsSubPathFolder checks if a sync folder is a subpath of another sync folder
func (*Dev) LabelsSelector ¶
LabelsSelector returns the labels of a Deployment as a k8s selector
func (*Dev) LoadForcePull ¶
func (dev *Dev) LoadForcePull()
LoadForcePull force the dev pods to be recreated and pull the latest version of their image
func (*Dev) LoadRemote ¶
LoadRemote configures remote execution
func (*Dev) MarshalYAML ¶
func (*Dev) PersistentVolumeEnabled ¶
PersistentVolumeEnabled returns true if persistent volumes are enabled for dev
func (*Dev) PersistentVolumeSize ¶
PersistentVolumeSize returns the persistent volume size
func (*Dev) PersistentVolumeStorageClass ¶
PersistentVolumeStorageClass returns the persistent volume storage class
func (*Dev) PreparePathsAndExpandEnvFiles ¶
PreparePathsAndExpandEnvFiles calls other methods required to have the dev ready to use
func (*Dev) RemoteModeEnabled ¶
RemoteModeEnabled returns true if remote is enabled
func (*Dev) RunAsNonRoot ¶
RunAsNonRoot returns true if the development container must run as a non-root user
func (*Dev) SetDefaults ¶
func (*Dev) SetLastBuiltAnnotation ¶
func (dev *Dev) SetLastBuiltAnnotation()
SetLastBuiltAnnotation sets the dev timestacmp
func (*Dev) ToTranslationRule ¶
func (dev *Dev) ToTranslationRule(main *Dev, reset bool) *TranslationRule
ToTranslationRule translates a dev struct into a translation rule
func (*Dev) UnmarshalYAML ¶
type DevRC ¶
type DevRC struct { Resources ResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"` Annotations Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` Selector Selector `json:"selector,omitempty" yaml:"selector,omitempty"` PersistentVolumeInfo *PersistentVolumeInfo `json:"persistentVolume,omitempty" yaml:"persistentVolume,omitempty"` Labels Labels `json:"labels,omitempty" yaml:"labels,omitempty"` Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` InitContainer InitContainer `json:"initContainer,omitempty" yaml:"initContainer,omitempty"` Context string `json:"context,omitempty" yaml:"context,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` Command Command `json:"command,omitempty" yaml:"command,omitempty"` Environment env.Environment `json:"environment,omitempty" yaml:"environment,omitempty"` Forward []forward.Forward `json:"forward,omitempty" yaml:"forward,omitempty"` Reverse []Reverse `json:"reverse,omitempty" yaml:"reverse,omitempty"` Secrets []Secret `json:"secrets,omitempty" yaml:"secrets,omitempty"` Sync Sync `json:"sync,omitempty" yaml:"sync,omitempty"` Timeout Timeout `json:"timeout,omitempty" yaml:"timeout,omitempty"` }
DevRC represents the default properties for dev containers
type DivertDeploy ¶
type DivertDeploy struct { Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` DeprecatedService string `json:"service,omitempty" yaml:"service,omitempty"` DeprecatedDeployment string `json:"deployment,omitempty" yaml:"deployment,omitempty"` VirtualServices []DivertVirtualService `json:"virtualServices,omitempty" yaml:"virtualServices,omitempty"` Hosts []DivertHost `json:"hosts,omitempty" yaml:"hosts,omitempty"` DeprecatedPort int `json:"port,omitempty" yaml:"port,omitempty"` }
DivertDeploy represents information about the deploy divert configuration
type DivertHost ¶
type DivertHost struct { VirtualService string `json:"virtualService,omitempty" yaml:"virtualService,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` }
DivertHost represents a host from a virtual service in a namespace to be diverted
type DivertVirtualService ¶
type DivertVirtualService struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` Routes []string `json:"routes,omitempty" yaml:"routes,omitempty"` }
DivertVirtualService represents a virtual service in a namespace to be diverted
type Duration ¶
Duration represents a duration
func (*Duration) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Endpoint ¶
type Endpoint struct { Labels Labels `json:"labels,omitempty" yaml:"labels,omitempty"` Annotations Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` Rules []EndpointRule `yaml:"rules,omitempty"` }
Endpoint represents an okteto stack ingress
func (*Endpoint) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type EndpointRule ¶
type EndpointRule struct { Path string `yaml:"path,omitempty"` Service string `yaml:"service,omitempty"` Port int32 `yaml:"port,omitempty"` }
EndpointRule represents an okteto ingress rule
type EndpointSpec ¶
func (*EndpointSpec) UnmarshalYAML ¶
func (endpoint *EndpointSpec) UnmarshalYAML(unmarshal func(interface{}) error) error
type Entrypoint ¶
type Entrypoint struct {
Values []string
}
Entrypoint represents the start command of a development container
func (Entrypoint) MarshalYAML ¶
func (e Entrypoint) MarshalYAML() (interface{}, error)
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Entrypoint) UnmarshalYAML ¶
func (e *Entrypoint) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Envs ¶
type Envs struct {
List env.Environment
}
type ExternalVolume ¶
ExternalVolume represents a external volume in the development container
func (ExternalVolume) MarshalYAML ¶
func (v ExternalVolume) MarshalYAML() (interface{}, error)
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*ExternalVolume) UnmarshalYAML ¶
func (v *ExternalVolume) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type HTTPHealtcheck ¶
type HTTPHealtcheck struct { Path string `yaml:"path,omitempty"` Port int32 `yaml:"port,omitempty"` }
func (*HTTPHealtcheck) UnmarshalYAML ¶
func (httpHealtcheck *HTTPHealtcheck) UnmarshalYAML(unmarshal func(interface{}) error) error
type HealtcheckTest ¶
type HealtcheckTest []string
func (*HealtcheckTest) UnmarshalYAML ¶
func (healthcheckTest *HealtcheckTest) UnmarshalYAML(unmarshal func(interface{}) error) error
type HealthCheck ¶
type HealthCheck struct { HTTP *HTTPHealtcheck `yaml:"http,omitempty"` Test HealtcheckTest `yaml:"test,omitempty"` Interval time.Duration `yaml:"interval,omitempty"` Timeout time.Duration `yaml:"timeout,omitempty"` Retries int `yaml:"retries,omitempty"` StartPeriod time.Duration `yaml:"start_period,omitempty"` Disable bool `yaml:"disable,omitempty"` Liveness bool `yaml:"x-okteto-liveness,omitempty"` Readiness bool `default:"true" yaml:"x-okteto-readiness,omitempty"` }
func (*HealthCheck) UnmarshalYAML ¶
func (hc *HealthCheck) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type ImageFromManifest ¶
ImageFromManifest is a thunk that returns an image value from a parsed manifest This allows to implement general purpose logic on images without necessarily referencing a specific image, for eg manifest.Deploy.Image or manifest.Destroy.Image
type InitContainer ¶
type InitContainer struct { Resources ResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` }
InitContainer represents the initial container
type LabelSelector ¶
type LabelSelector struct { MatchLabels map[string]string `yaml:"matchLabels,omitempty" json:"matchLabels,omitempty"` MatchExpressions []LabelSelectorRequirement `yaml:"matchExpressions,omitempty" json:"matchExpressions,omitempty"` }
type LabelSelectorRequirement ¶
type LabelSelectorRequirement struct { Key string `yaml:"key" json:"key"` Operator metav1.LabelSelectorOperator `yaml:"operator" json:"operator"` Values []string `yaml:"values,omitempty" json:"values,omitempty"` }
type Lifecycle ¶
type Lifecycle struct { PostStart bool `json:"postStart,omitempty" yaml:"postStart,omitempty"` PostStop bool `json:"postStop,omitempty" yaml:"postStop,omitempty"` }
Lifecycle defines the lifecycle for containers
func (Lifecycle) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Lifecycle) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Manifest ¶
type Manifest struct { Fs afero.Fs `json:"-" yaml:"-"` External externalresource.Section `json:"external,omitempty" yaml:"external,omitempty"` Dependencies deps.ManifestSection `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` Build build.ManifestBuild `json:"build,omitempty" yaml:"build,omitempty"` Deploy *DeployInfo `json:"deploy,omitempty" yaml:"deploy,omitempty"` Dev ManifestDevs `json:"dev,omitempty" yaml:"dev,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` Context string `json:"context,omitempty" yaml:"context,omitempty"` Icon string `json:"icon,omitempty" yaml:"icon,omitempty"` ManifestPath string `json:"-" yaml:"-"` Destroy *DestroyInfo `json:"destroy,omitempty" yaml:"destroy,omitempty"` Test ManifestTests `json:"test,omitempty" yaml:"test,omitempty"` Type Archetype `json:"-" yaml:"-"` GlobalForward []forward.GlobalForward `json:"forward,omitempty" yaml:"forward,omitempty"` Manifest []byte `json:"-" yaml:"-"` IsV2 bool `json:"-" yaml:"-"` }
Manifest represents an okteto manifest
func GetInferredManifest ¶
GetInferredManifest infers the manifest from a directory
func GetManifestV1 ¶
GetManifestV1 gets a manifest from a path or search for the files to generate it
func GetManifestV2 ¶
GetManifestV2 gets a manifest from a path or search for the files to generate it
func NewManifestFromDev ¶
NewManifestFromDev creates a manifest from a dev
func NewManifestFromStack ¶
NewManifestFromStack creates a new manifest from a stack struct
func (*Manifest) ExpandEnvVars ¶
ExpandEnvVars expands env vars to be set on the manifest
func (*Manifest) GetBuildServices ¶
func (*Manifest) HasBuildSection ¶
func (*Manifest) HasDependencies ¶
HasDependencies returns true if the manifest has dependencies
func (*Manifest) HasDependenciesSection ¶
func (*Manifest) HasDeploySection ¶
func (*Manifest) InferFromStack ¶
InferFromStack infers data, mainly dev services and build information from services defined in the stackfile
func (*Manifest) IsDeployDefault ¶
IsDeployDefault returns true if the command is empty or if it has the default one
func (*Manifest) MarshalYAML ¶
func (*Manifest) SanitizeSvcNames ¶
SanitizeSvcNames sanitize service names in 'dev', 'build' and 'global forward' sections
func (*Manifest) UnmarshalYAML ¶
func (*Manifest) WriteToFile ¶
WriteToFile writes a manifest to a file with comments to make it easier to understand
type ManifestDevs ¶
ManifestDevs defines all the dev section
func (ManifestDevs) GetDevs ¶
func (d ManifestDevs) GetDevs() []string
GetDevs returns a list of strings with the keys of devs defined
func (ManifestDevs) HasDev ¶
func (d ManifestDevs) HasDev(name string) bool
HasDev checks if manifestDevs has a dev name as key
func (*ManifestDevs) UnmarshalYAML ¶
func (d *ManifestDevs) UnmarshalYAML(unmarshal func(interface{}) error) error
type ManifestTests ¶
ManifestTests defines all the test sections
func (ManifestTests) Validate ¶
func (test ManifestTests) Validate() error
type Metadata ¶
type Metadata struct { Labels Labels `json:"labels,omitempty" yaml:"labels,omitempty"` Annotations Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` }
type NodeAffinity ¶
type NodeAffinity struct { RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `` /* 127-byte string literal not displayed */ PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `` /* 129-byte string literal not displayed */ }
NodeAffinity describes node affinity scheduling rules for the pod.
type NodeSelector ¶
type NodeSelector struct {
NodeSelectorTerms []NodeSelectorTerm `yaml:"nodeSelectorTerms" json:"nodeSelectorTerms"`
}
type NodeSelectorRequirement ¶
type NodeSelectorRequirement struct { Key string `yaml:"key" json:"key"` Operator apiv1.NodeSelectorOperator `yaml:"operator" json:"operator"` Values []string `yaml:"values,omitempty" json:"values,omitempty"` }
type NodeSelectorTerm ¶
type NodeSelectorTerm struct { MatchExpressions []NodeSelectorRequirement `yaml:"matchExpressions,omitempty" json:"matchExpressions,omitempty"` MatchFields []NodeSelectorRequirement `yaml:"matchFields,omitempty" json:"matchFields,omitempty"` }
type PersistentVolumeInfo ¶
type PersistentVolumeInfo struct { StorageClass string `json:"storageClass,omitempty" yaml:"storageClass,omitempty"` Size string `json:"size,omitempty" yaml:"size,omitempty"` Enabled bool `json:"enabled,omitempty" yaml:"enabled"` }
PersistentVolumeInfo info about the persistent volume
type PodAffinity ¶
type PodAffinity struct { RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `` /* 127-byte string literal not displayed */ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `` /* 129-byte string literal not displayed */ }
PodAffinity describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
type PodAffinityTerm ¶
type PodAffinityTerm struct { LabelSelector *LabelSelector `yaml:"labelSelector,omitempty" json:"labelSelector,omitempty"` TopologyKey string `yaml:"topologyKey" json:"topologyKey"` Namespaces []string `yaml:"namespaces,omitempty" json:"namespaces,omitempty"` }
type PodAntiAffinity ¶
type PodAntiAffinity struct { RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `` /* 127-byte string literal not displayed */ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `` /* 129-byte string literal not displayed */ }
PodAntiAffinity describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
type Port ¶
func (Port) GetContainerPort ¶
func (Port) GetHostPort ¶
func (Port) GetProtocol ¶
func (*Port) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
type PortInterface ¶
type PortRaw ¶
type PortRaw struct { Extensions map[string]interface{} `yaml:",inline" json:"-"` Protocol apiv1.Protocol ContainerPort int32 HostPort int32 ContainerFrom int32 ContainerTo int32 HostFrom int32 HostTo int32 }
func (*PortRaw) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type PreferredSchedulingTerm ¶
type PreferredSchedulingTerm struct { // A node selector term, associated with the corresponding weight. Preference NodeSelectorTerm `yaml:"preference" json:"preference"` // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. Weight int32 `yaml:"weight" json:"weight"` }
type Probes ¶
type Probes struct { Liveness bool `json:"liveness,omitempty" yaml:"liveness,omitempty"` Readiness bool `json:"readiness,omitempty" yaml:"readiness,omitempty"` Startup bool `json:"startup,omitempty" yaml:"startup,omitempty"` }
Probes defines probes for containers
func (Probes) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Probes) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Quantity ¶
Quantity represents an okteto stack service storage resource
func (Quantity) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Quantity) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type RawMessage ¶
type RawMessage struct {
// contains filtered or unexported fields
}
func (*RawMessage) Unmarshal ¶
func (msg *RawMessage) Unmarshal(v interface{}) error
func (*RawMessage) UnmarshalYAML ¶
func (msg *RawMessage) UnmarshalYAML(unmarshal func(interface{}) error) error
type ResourceList ¶
type ResourceList map[apiv1.ResourceName]resource.Quantity
ResourceList is a set of (resource name, quantity) pairs.
func (ResourceList) MarshalYAML ¶
func (r ResourceList) MarshalYAML() (interface{}, error)
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*ResourceList) UnmarshalYAML ¶
func (r *ResourceList) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type ResourceRequirements ¶
type ResourceRequirements struct { Limits ResourceList `json:"limits,omitempty" yaml:"limits,omitempty"` Requests ResourceList `json:"requests,omitempty" yaml:"requests,omitempty"` }
ResourceRequirements describes the compute resource requirements.
type ResourcesRaw ¶
type ResourcesRaw struct { Extensions map[string]interface{} `yaml:",inline" json:"-"` Limits DeployComposeResources `json:"limits,omitempty" yaml:"limits,omitempty"` Reservations DeployComposeResources `json:"reservations,omitempty" yaml:"reservations,omitempty"` }
type RestartPolicyRaw ¶
type RestartPolicyRaw struct { Delay *WarningType `yaml:"delay,omitempty"` Window *WarningType `yaml:"window,omitempty"` Extensions map[string]interface{} `yaml:",inline" json:"-"` Condition string `yaml:"condition,omitempty"` MaxAttempts int32 `yaml:"max_attempts,omitempty"` }
type Reverse ¶
Reverse represents a remote forward port
func (Reverse) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Reverse) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Secret ¶
Secret represents a development secret
func (*Secret) GetFileName ¶
GetFileName returns the secret file name
func (*Secret) GetKeyName ¶
GetKeyName returns the secret key name
func (Secret) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Secret) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type SecurityContext ¶
type SecurityContext struct { RunAsUser *int64 `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"` FSGroup *int64 `json:"fsGroup,omitempty" yaml:"fsGroup,omitempty"` Capabilities *Capabilities `json:"capabilities,omitempty" yaml:"capabilities,omitempty"` RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"` AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" yaml:"allowPrivilegeEscalation,omitempty"` }
SecurityContext represents a pod security context
type Service ¶
type Service struct { Healtcheck *HealthCheck `yaml:"healthcheck,omitempty"` Labels Labels `json:"labels,omitempty" yaml:"labels,omitempty"` Resources *StackResources `yaml:"resources,omitempty"` // For okteto stack only NodeSelector Selector `json:"x-node-selector,omitempty" yaml:"x-node-selector,omitempty"` User *StackSecurityContext `yaml:"user,omitempty"` DependsOn DependsOn `yaml:"depends_on,omitempty"` Build *build.Info `yaml:"build,omitempty"` Workdir string `yaml:"workdir,omitempty"` Image string `yaml:"image,omitempty"` RestartPolicy apiv1.RestartPolicy `yaml:"restart,omitempty"` Environment env.Environment `yaml:"environment,omitempty"` Ports []Port `yaml:"ports,omitempty"` Volumes []build.VolumeMounts `yaml:"volumes,omitempty"` CapAdd []apiv1.Capability `yaml:"cap_add,omitempty"` CapDrop []apiv1.Capability `yaml:"cap_drop,omitempty"` VolumeMounts []build.VolumeMounts `yaml:"-"` EnvFiles env.Files `yaml:"env_file,omitempty"` Command Command `yaml:"command,omitempty"` Annotations Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` Entrypoint Entrypoint `yaml:"entrypoint,omitempty"` StopGracePeriod int64 `yaml:"stop_grace_period,omitempty"` Replicas int32 `yaml:"replicas,omitempty"` // For okteto stack only BackOffLimit int32 `yaml:"max_attempts,omitempty"` Public bool `yaml:"public,omitempty"` // For okteto stack only }
Service represents an okteto stack service
func (*Service) IsDeployment ¶
func (*Service) IsStatefulset ¶
func (*Service) SetLastBuiltAnnotation ¶
func (svc *Service) SetLastBuiltAnnotation()
SetLastBuiltAnnotation sets the dev timestamp
type ServiceRaw ¶
type ServiceRaw struct { MemSwappiness *WarningType `yaml:"mem_swappiness,omitempty"` CredentialSpec *WarningType `yaml:"credential_spec,omitempty"` Extensions map[string]interface{} `yaml:",inline" json:"-"` VolumesFrom *WarningType `yaml:"volumes_from,omitempty"` UsernsMode *WarningType `yaml:"userns_mode,omitempty"` Ulimits *WarningType `yaml:"ulimits,omitempty"` Tty *WarningType `yaml:"tty,omitempty"` Tmpfs *WarningType `yaml:"tmpfs,omitempty"` Sysctls *WarningType `yaml:"sysctls,omitempty"` StorageOpts *WarningType `yaml:"storage_opts,omitempty"` StopSignal *WarningType `yaml:"stop_signal,omitempty"` StdinOpen *WarningType `yaml:"stdin_open,omitempty"` ShmSize *WarningType `yaml:"shm_size,omitempty"` SecurityOpt *WarningType `yaml:"security_opt,omitempty"` Secrets *WarningType `yaml:"secrets,omitempty"` Healthcheck *HealthCheck `yaml:"healthcheck,omitempty"` Runtime *WarningType `yaml:"runtime,omitempty"` Labels Labels `json:"labels,omitempty" yaml:"labels,omitempty"` Annotations Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` NodeSelector Selector `json:"x-node-selector,omitempty" yaml:"x-node-selector,omitempty"` ReadOnly *WarningType `yaml:"read_only,omitempty"` PullPolicy *WarningType `yaml:"pull_policy,omitempty"` ContainerName *WarningType `yaml:"container_name,omitempty"` Profiles *WarningType `yaml:"profiles,omitempty"` Scale *int32 `yaml:"scale"` StopGracePeriodSneakCase *RawMessage `yaml:"stop_grace_period,omitempty"` StopGracePeriod *RawMessage `yaml:"stopGracePeriod,omitempty"` User *StackSecurityContext `yaml:"user,omitempty"` Privileged *WarningType `yaml:"privileged,omitempty"` Platform *WarningType `yaml:"platform,omitempty"` PidLimit *WarningType `yaml:"pid_limit,omitempty"` DependsOn DependsOn `yaml:"depends_on,omitempty"` Pid *WarningType `yaml:"pid,omitempty"` Replicas *int32 `yaml:"replicas"` Resources *StackResources `yaml:"resources,omitempty"` BlkioConfig *WarningType `yaml:"blkio_config,omitempty"` CpuPercent *WarningType `yaml:"cpu_percent,omitempty"` CpuPeriod *WarningType `yaml:"cpu_period,omitempty"` CpuQuota *WarningType `yaml:"cpu_quota,omitempty"` CpuRtRuntime *WarningType `yaml:"cpu_rt_runtime,omitempty"` CpuRtPeriod *WarningType `yaml:"cpu_rt_period,omitempty"` Cpuset *WarningType `yaml:"cpuset,omitempty"` CgroupParent *WarningType `yaml:"cgroup_parent,omitempty"` Networks *WarningType `yaml:"networks,omitempty"` Build *composeBuildInfo `yaml:"build,omitempty"` OomScoreAdj *WarningType `yaml:"oom_score_adj,omitempty"` DeviceCgroupRules *WarningType `yaml:"device_cgroup_rules,omitempty"` Devices *WarningType `yaml:"devices,omitempty"` Dns *WarningType `yaml:"dns,omitempty"` DnsOpt *WarningType `yaml:"dns_opt,omitempty"` DnsSearch *WarningType `yaml:"dns_search,omitempty"` DomainName *WarningType `yaml:"domainname,omitempty"` Extends *WarningType `yaml:"extends,omitempty"` ExternalLinks *WarningType `yaml:"external_links,omitempty"` ExtraHosts *WarningType `yaml:"extra_hosts,omitempty"` GroupAdd *WarningType `yaml:"group_add,omitempty"` Hostname *WarningType `yaml:"hostname,omitempty"` Init *WarningType `yaml:"init,omitempty"` Ipc *WarningType `yaml:"ipc,omitempty"` Isolation *WarningType `yaml:"isolation,omitempty"` Links *WarningType `yaml:"links,omitempty"` Logging *WarningType `yaml:"logging,omitempty"` Network_mode *WarningType `yaml:"network_mode,omitempty"` Configs *WarningType `yaml:"configs,omitempty"` MacAddress *WarningType `yaml:"mac_address,omitempty"` Deploy *DeployInfoRaw `yaml:"deploy,omitempty"` MemswapLimit *WarningType `yaml:"memswap_limit,omitempty"` OomKillDisable *WarningType `yaml:"oom_kill_disable,omitempty"` MemReservation Quantity `yaml:"mem_reservation,omitempty"` CpuCount Quantity `yaml:"cpu_count,omitempty"` Cpus Quantity `yaml:"cpus,omitempty"` MemLimit Quantity `yaml:"mem_limit,omitempty"` Restart string `yaml:"restart,omitempty"` Image string `yaml:"image,omitempty"` Workdir string `yaml:"workdir,omitempty"` WorkingDirSneakCase string `yaml:"working_dir,omitempty"` Command CommandStack `yaml:"command,omitempty"` Volumes []build.VolumeMounts `yaml:"volumes,omitempty"` CapAddSneakCase []apiv1.Capability `yaml:"cap_add,omitempty"` EnvFiles env.Files `yaml:"envFile,omitempty"` EnvFilesSneakCase env.Files `yaml:"env_file,omitempty"` Args ArgsStack `yaml:"args,omitempty"` Entrypoint CommandStack `yaml:"entrypoint,omitempty"` Environment env.Environment `yaml:"environment,omitempty"` Expose []PortRaw `yaml:"expose,omitempty"` Ports []PortRaw `yaml:"ports,omitempty"` CapDrop []apiv1.Capability `yaml:"capDrop,omitempty"` CapDropSneakCase []apiv1.Capability `yaml:"cap_drop,omitempty"` CapAdd []apiv1.Capability `yaml:"capAdd,omitempty"` Public bool `yaml:"public,omitempty"` }
ServiceRaw represents an okteto stack service
type ServiceResources ¶
type ServiceResources struct { CPU Quantity `json:"cpu,omitempty" yaml:"cpu,omitempty"` Memory Quantity `json:"memory,omitempty" yaml:"memory,omitempty"` Storage StorageResource `json:"storage,omitempty" yaml:"storage,omitempty"` }
ServiceResources represents an okteto stack service resources
func (*ServiceResources) IsDefaultValue ¶
func (svcResources *ServiceResources) IsDefaultValue() bool
type ServicesToDeploy ¶
type ServicesToDeploy []string
func (*ServicesToDeploy) UnmarshalYAML ¶
func (s *ServicesToDeploy) UnmarshalYAML(unmarshal func(interface{}) error) error
type Stack ¶
type Stack struct { Volumes map[string]*VolumeSpec `yaml:"volumes,omitempty"` Services ComposeServices `yaml:"services,omitempty"` Endpoints EndpointSpec `yaml:"endpoints,omitempty"` Name string `yaml:"name"` Namespace string `yaml:"namespace,omitempty"` Context string `yaml:"context,omitempty"` Warnings StackWarnings `yaml:"-"` Manifest []byte `yaml:"-"` Paths []string `yaml:"-"` IsCompose bool `yaml:"-"` }
Stack represents an okteto stack
func GetStackFromPath ¶
GetStackFromPath returns an okteto stack object from a given file
func (*Stack) GetLabelSelector ¶
GetLabelSelector returns the label selector for the stack name
func (*Stack) GetServicesWithBuildSection ¶
func (*Stack) UnmarshalYAML ¶
type StackRaw ¶
type StackRaw struct { Version string `yaml:"version,omitempty"` Name string `yaml:"name"` Namespace string `yaml:"namespace,omitempty"` Context string `yaml:"context,omitempty"` Services map[string]*ServiceRaw `yaml:"services,omitempty"` Endpoints EndpointSpec `yaml:"endpoints,omitempty"` Volumes map[string]*VolumeTopLevel `yaml:"volumes,omitempty"` // Extensions Extensions map[string]interface{} `yaml:",inline" json:"-"` // Docker-compose not implemented Networks *WarningType `yaml:"networks,omitempty"` Configs *WarningType `yaml:"configs,omitempty"` Secrets *WarningType `yaml:"secrets,omitempty"` Warnings StackWarnings }
StackRaw represents an okteto stack
type StackResources ¶
type StackResources struct { Limits ServiceResources `json:"limits,omitempty" yaml:"limits,omitempty"` Requests ServiceResources `json:"requests,omitempty" yaml:"requests,omitempty"` }
StackResources represents an okteto stack resources
func (*StackResources) IsDefaultValue ¶
func (r *StackResources) IsDefaultValue() bool
func (*StackResources) UnmarshalYAML ¶
func (s *StackResources) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type StackSecurityContext ¶
type StackSecurityContext struct { RunAsUser *int64 `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"` }
StackSecurityContext defines which user and group use
func (*StackSecurityContext) UnmarshalYAML ¶
func (sc *StackSecurityContext) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type StackWarnings ¶
type StorageResource ¶
type StorageResource struct { Size Quantity `json:"size,omitempty" yaml:"size,omitempty"` Class string `json:"class,omitempty" yaml:"class,omitempty"` }
StorageResource represents an okteto stack service storage resource
func (*StorageResource) UnmarshalYAML ¶
func (s *StorageResource) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Sync ¶
type Sync struct { LocalPath string `json:"-" yaml:"-"` RemotePath string `json:"-" yaml:"-"` Folders []SyncFolder `json:"folders,omitempty" yaml:"folders,omitempty"` RescanInterval int `json:"rescanInterval,omitempty" yaml:"rescanInterval,omitempty"` Compression bool `json:"compression" yaml:"compression"` Verbose bool `json:"verbose" yaml:"verbose"` }
Sync represents a sync info in the development container
func (Sync) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Sync) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type SyncFolder ¶
type SyncFolder struct { LocalPath string `json:"localPath,omitempty" yaml:"localPath,omitempty"` RemotePath string `json:"remotePath,omitempty" yaml:"remotePath,omitempty"` }
SyncFolder represents a sync folder in the development container
func (SyncFolder) MarshalYAML ¶
func (s SyncFolder) MarshalYAML() (interface{}, error)
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*SyncFolder) UnmarshalYAML ¶
func (s *SyncFolder) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type Test ¶
type Test struct { Image string `yaml:"image,omitempty"` Context string `yaml:"context,omitempty"` Commands []TestCommand `yaml:"commands,omitempty"` DependsOn []string `yaml:"depends_on,omitempty"` Caches []string `yaml:"caches,omitempty"` Artifacts []Artifact `yaml:"artifacts,omitempty"` }
func (*Test) UnmarshalYAML ¶
type TestCommand ¶
type TestCommand struct { Name string `yaml:"name,omitempty"` Command string `yaml:"command,omitempty"` }
func (*TestCommand) UnmarshalYAML ¶
func (t *TestCommand) UnmarshalYAML(unmarshal func(interface{}) error) error
type Timeout ¶
type Timeout struct { Default time.Duration `json:"default,omitempty" yaml:"default,omitempty"` Resources time.Duration `json:"resources,omitempty" yaml:"resources,omitempty"` }
Timeout represents the timeout for the command
func (*Timeout) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type TranslationRule ¶
type TranslationRule struct { InitContainer InitContainer `json:"initContainers,omitempty"` Resources ResourceRequirements `json:"resources,omitempty"` SecurityContext *SecurityContext `json:"securityContext,omitempty"` Probes *Probes `json:"probes" yaml:"probes"` Lifecycle *Lifecycle `json:"lifecycle" yaml:"lifecycle"` Labels Labels `json:"labels,omitempty"` NodeSelector map[string]string `json:"nodeSelector" yaml:"nodeSelector"` Affinity *apiv1.Affinity `json:"affinity" yaml:"affinity"` ServiceAccount string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"` WorkDir string `json:"workdir"` Marker string `json:"marker"` OktetoBinImageTag string `json:"oktetoBinImageTag"` Node string `json:"node,omitempty"` Container string `json:"container,omitempty"` Image string `json:"image,omitempty"` ImagePullPolicy apiv1.PullPolicy `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` Environment env.Environment `json:"environment,omitempty"` Secrets []Secret `json:"secrets,omitempty"` Command []string `json:"command,omitempty"` Args []string `json:"args,omitempty"` Volumes []VolumeMount `json:"volumes,omitempty"` Healthchecks bool `json:"healthchecks" yaml:"healthchecks"` PersistentVolume bool `json:"persistentVolume" yaml:"persistentVolume"` }
TranslationRule represents how to apply a container translation in a deployment
func (*TranslationRule) IsMainDevContainer ¶
func (r *TranslationRule) IsMainDevContainer() bool
IsMainDevContainer returns true if the translation rule applies to the main dev container of the okteto manifest
type Volume ¶
Volume represents a volume in the development container
func (Volume) MarshalYAML ¶
MarshalYAML Implements the marshaler interface of the yaml pkg.
func (*Volume) UnmarshalYAML ¶
UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.
type VolumeMount ¶
type VolumeMount struct { Name string `json:"name,omitempty"` MountPath string `json:"mountpath,omitempty"` SubPath string `json:"subpath,omitempty"` }
VolumeMount represents a volume mount
func (*VolumeMount) IsSyncthing ¶
func (v *VolumeMount) IsSyncthing() bool
IsSyncthing returns the volume mount is for syncthing
type VolumeSpec ¶
type VolumeSpec struct { Labels Labels `yaml:"labels,omitempty"` Annotations Annotations `yaml:"annotations,omitempty"` Size Quantity `json:"size,omitempty" yaml:"size,omitempty"` Class string `json:"class,omitempty" yaml:"class,omitempty"` }
type VolumeTopLevel ¶
type VolumeTopLevel struct { Labels Labels `json:"labels,omitempty" yaml:"labels,omitempty"` Annotations Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` DriverOpts map[string]string `json:"driver_opts,omitempty" yaml:"driver_opts,omitempty"` Driver *WarningType `json:"driver,omitempty" yaml:"driver,omitempty"` External *WarningType `json:"external,omitempty" yaml:"external,omitempty"` Extensions map[string]interface{} `yaml:",inline" json:"-"` Size Quantity `json:"size,omitempty" yaml:"size,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Class string `json:"class,omitempty" yaml:"class,omitempty"` }
type WarningType ¶
type WarningType struct {
// contains filtered or unexported fields
}
func (*WarningType) UnmarshalYAML ¶
func (warning *WarningType) UnmarshalYAML(unmarshal func(interface{}) error) error
type WeightedPodAffinityTerm ¶
type WeightedPodAffinityTerm struct { PodAffinityTerm PodAffinityTerm `yaml:"podAffinityTerm" json:"podAffinityTerm"` Weight int32 `yaml:"weight" json:"weight"` }