README
¶
Nomad Jobspec
The Nomad Jobspec plugin deploys to a Nomad cluster from a pre-existing Nomad job specification file.
Components
Related Plugins
Resources
- Nomad Job
Documentation
¶
Index ¶
- Variables
- type Config
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment) GetId() string
- func (x *Deployment) GetName() string
- func (x *Deployment) GetResourceState() *opaqueany.Any
- func (*Deployment) ProtoMessage()
- func (x *Deployment) ProtoReflect() protoreflect.Message
- func (x *Deployment) Reset()
- func (x *Deployment) String() string
- type Platform
- func (p *Platform) Config() (interface{}, error)
- func (p *Platform) Deploy(ctx context.Context, log hclog.Logger, src *component.Source, ...) (*Deployment, error)
- func (p *Platform) DeployFunc() interface{}
- func (p *Platform) Destroy(ctx context.Context, log hclog.Logger, deployment *Deployment, ui terminal.UI) error
- func (p *Platform) DestroyFunc() interface{}
- func (p *Platform) Documentation() (*docs.Documentation, error)
- func (p *Platform) Generation(ctx context.Context, log hclog.Logger, src *component.Source, ...) ([]byte, error)
- func (p *Platform) GenerationFunc() interface{}
- func (p *Platform) Status(ctx context.Context, log hclog.Logger, deployment *Deployment, ui terminal.UI) (*sdk.StatusReport, error)
- func (p *Platform) StatusFunc() interface{}
- type Resource
- type Resource_Job
- func (*Resource_Job) Descriptor() ([]byte, []int)deprecated
- func (x *Resource_Job) GetId() string
- func (x *Resource_Job) GetName() string
- func (x *Resource_Job) GetNamespace() string
- func (*Resource_Job) ProtoMessage()
- func (x *Resource_Job) ProtoReflect() protoreflect.Message
- func (x *Resource_Job) Reset()
- func (x *Resource_Job) String() string
Constants ¶
This section is empty.
Variables ¶
var File_waypoint_builtin_nomad_jobspec_plugin_proto protoreflect.FileDescriptor
var Options = []sdk.Option{
sdk.WithComponents(&Platform{}),
}
Options are the SDK options to use for instantiation for the Nomad plugin.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// The path to the job specification to load.
Jobspec string `hcl:"jobspec,attr"`
// Signifies whether the jobspec should be parsed as HCL1 or not
Hcl1 bool `hcl:"hcl1,optional"`
}
Config is the configuration structure for the Platform.
type Deployment ¶ added in v0.8.0
type Deployment struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
ResourceState *opaqueany.Any `protobuf:"bytes,3,opt,name=resource_state,json=resourceState,proto3" json:"resource_state,omitempty"`
// contains filtered or unexported fields
}
func (*Deployment) Descriptor
deprecated
added in
v0.8.0
func (*Deployment) Descriptor() ([]byte, []int)
Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) GetResourceState ¶ added in v0.8.0
func (x *Deployment) GetResourceState() *opaqueany.Any
func (*Deployment) ProtoMessage ¶ added in v0.8.0
func (*Deployment) ProtoMessage()
func (*Deployment) ProtoReflect ¶ added in v0.8.0
func (x *Deployment) ProtoReflect() protoreflect.Message
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform is the Platform implementation for Nomad.
func (*Platform) Config ¶
func (p *Platform) Config() (interface{}, error)
Config implements Configurable
func (*Platform) Deploy ¶
func (p *Platform) Deploy(
ctx context.Context,
log hclog.Logger,
src *component.Source,
img *docker.Image,
deployConfig *component.DeploymentConfig,
dcr *component.DeclaredResourcesResp,
ui terminal.UI,
) (*Deployment, error)
Deploy deploys an image to Nomad.
func (*Platform) DeployFunc ¶
func (p *Platform) DeployFunc() interface{}
DeployFunc implements component.Platform
func (*Platform) Destroy ¶
func (p *Platform) Destroy(
ctx context.Context,
log hclog.Logger,
deployment *Deployment,
ui terminal.UI,
) error
Destroy deletes the Nomad job.
func (*Platform) DestroyFunc ¶
func (p *Platform) DestroyFunc() interface{}
DestroyFunc implements component.Destroyer
func (*Platform) Documentation ¶
func (p *Platform) Documentation() (*docs.Documentation, error)
func (*Platform) Generation ¶
func (p *Platform) Generation(
ctx context.Context,
log hclog.Logger,
src *component.Source,
img *docker.Image,
deployConfig *component.DeploymentConfig,
ui terminal.UI,
) ([]byte, error)
Generation returns the generation ID. The ID we use is the name of the job since this is the unique ID that determines insert vs. update behavior for Nomad.
func (*Platform) GenerationFunc ¶
func (p *Platform) GenerationFunc() interface{}
GenerationFunc implements component.Generation
func (*Platform) Status ¶ added in v0.8.0
func (p *Platform) Status(
ctx context.Context,
log hclog.Logger,
deployment *Deployment,
ui terminal.UI,
) (*sdk.StatusReport, error)
func (*Platform) StatusFunc ¶ added in v0.8.0
func (p *Platform) StatusFunc() interface{}
StatusFunc implements component.Status
type Resource ¶ added in v0.8.0
type Resource struct {
// contains filtered or unexported fields
}
Resource contains the internal resource states.
func (*Resource) Descriptor
deprecated
added in
v0.8.0
func (*Resource) Descriptor() ([]byte, []int)
Deprecated: Use Resource.ProtoReflect.Descriptor instead.
func (*Resource) ProtoMessage ¶ added in v0.8.0
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶ added in v0.8.0
func (x *Resource) ProtoReflect() protoreflect.Message
type Resource_Job ¶ added in v0.8.0
type Resource_Job struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
// contains filtered or unexported fields
}
func (*Resource_Job) Descriptor
deprecated
added in
v0.8.0
func (*Resource_Job) Descriptor() ([]byte, []int)
Deprecated: Use Resource_Job.ProtoReflect.Descriptor instead.
func (*Resource_Job) GetNamespace ¶ added in v0.10.0
func (x *Resource_Job) GetNamespace() string
func (*Resource_Job) ProtoMessage ¶ added in v0.8.0
func (*Resource_Job) ProtoMessage()
func (*Resource_Job) ProtoReflect ¶ added in v0.8.0
func (x *Resource_Job) ProtoReflect() protoreflect.Message