Documentation
¶
Index ¶
- Constants
- func CreateCliArgs(eventData *Action) []string
- func CreateEnvVars(eventData *Action) []string
- func CreateExposedNetworkPorts(eventData *Action) nat.PortSet
- func CreateHostConfig(eventContext event.EventContext, eventData *Action) *container.HostConfig
- func CreateImagePullOptions(eventData *Action) (image.PullOptions, error)
- func CreateLabels(eventContext event.EventContext, eventData *Action) map[string]string
- func CreatePortBindings(eventData *Action) nat.PortMap
- func CreateWgHostConfig(containerName string, eventData *Action) *container.HostConfig
- func CreateWgLabels(eventContext event.EventContext, eventData *Action) map[string]string
- type Action
- type Controller
- func (c *Controller) CreateContainerConfig(eventContext event.EventContext, eventData *Action) *container.Config
- func (c *Controller) CreateWgContainerConfig(eventContext event.EventContext, eventData *Action) *container.Config
- func (c *Controller) CreateWireguardConfigVolume(eventData *Action) error
- func (c *Controller) HandleAction(eventContext event.EventContext, eventData *Action) error
- func (c *Controller) HandleCreate(eventContext event.EventContext, eventData *Action) error
- func (c *Controller) HandleDelete(eventContext event.EventContext, eventData *Action) error
- func (c *Controller) HandleUpdate(eventContext event.EventContext, eventData *Action) error
- func (c *Controller) ProcessMessage(msg jetstream.Msg)
- type ImageRegistry
- type KeyValue
- type Labels
- type NetworkOverlay
- type NetworkPort
Constants ¶
View Source
const ( ActionCreate = "create" ActionDelete = "delete" ActionUpdate = "update" )
Variables ¶
This section is empty.
Functions ¶
func CreateCliArgs ¶
func CreateEnvVars ¶
func CreateHostConfig ¶
func CreateHostConfig(eventContext event.EventContext, eventData *Action) *container.HostConfig
func CreateImagePullOptions ¶
func CreateImagePullOptions(eventData *Action) (image.PullOptions, error)
func CreateLabels ¶
func CreateLabels(eventContext event.EventContext, eventData *Action) map[string]string
TODO include app.docker.io. prefix? (e.g. app.docker.io.name)
func CreatePortBindings ¶
func CreateWgHostConfig ¶
func CreateWgHostConfig(containerName string, eventData *Action) *container.HostConfig
func CreateWgLabels ¶
func CreateWgLabels(eventContext event.EventContext, eventData *Action) map[string]string
Types ¶
type Action ¶
type Action struct {
Component string `json:"component"`
Service string `json:"service"`
Action string `json:"action"`
Image string `json:"image,omitempty"`
// Configuration to use a private container image registry
ImageRegistry ImageRegistry `json:"imageRegistry,omitempty"`
// Deploy as a "K8s Job"
IsJob bool `json:"isJob,omitempty"`
// Ports to expose
Ports []NetworkPort `json:"ports,omitempty"`
// Expose the network ports outside the node
ExposePorts bool `json:"exposePorts,omitempty"`
// Environment variables
EnvVars []KeyValue `json:"envVars,omitempty"`
// CLI arguments
CliArgs []KeyValue `json:"cliArgs,omitempty"`
// Privileged opt
Privileged bool `json:"privileged,omitempty"`
// aeriOS network overlay configuration
NetworkOverlay NetworkOverlay `json:"networkOverlay,omitempty"`
}
type Controller ¶
type Controller struct {
DockerClient *docker.DockerClient
}
func (*Controller) CreateContainerConfig ¶
func (c *Controller) CreateContainerConfig(eventContext event.EventContext, eventData *Action) *container.Config
func (*Controller) CreateWgContainerConfig ¶
func (c *Controller) CreateWgContainerConfig(eventContext event.EventContext, eventData *Action) *container.Config
func (*Controller) CreateWireguardConfigVolume ¶
func (c *Controller) CreateWireguardConfigVolume(eventData *Action) error
func (*Controller) HandleAction ¶
func (c *Controller) HandleAction(eventContext event.EventContext, eventData *Action) error
func (*Controller) HandleCreate ¶
func (c *Controller) HandleCreate(eventContext event.EventContext, eventData *Action) error
func (*Controller) HandleDelete ¶
func (c *Controller) HandleDelete(eventContext event.EventContext, eventData *Action) error
func (*Controller) HandleUpdate ¶
func (c *Controller) HandleUpdate(eventContext event.EventContext, eventData *Action) error
func (*Controller) ProcessMessage ¶
func (c *Controller) ProcessMessage(msg jetstream.Msg)
type ImageRegistry ¶
type NetworkOverlay ¶
type NetworkOverlay struct {
InternalIp string `json:"internalIp,omitempty"`
Dns string `json:"dns,omitempty"`
PublicKey string `json:"publicKey,omitempty"`
PrivateKey string `json:"privateKey,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
Mtu int `json:"mtu,omitempty"`
AllowedIps string `json:"allowedIps,omitempty"`
PersistentKeepalive int `json:"persistentKeepalive,omitempty"`
}
type NetworkPort ¶
Click to show internal directories.
Click to hide internal directories.