Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LogLevel string `envconfig:"LOG_LEVEL" default:"debug"` CacaoSSHKey string `envconfig:"CACAO_SSH_KEY"` // CACAO private ssh key MessagingConfig messaging2.NatsStanMsgConfig MongoConfig db.MongoDBConfig }
Config ...
type DeploymentRun ¶
type DeploymentRun struct { ID common.ID `bson:"_id"` Deployment common.ID `bson:"deployment"` TemplateType service.TemplateTypeName `bson:"template_type"` CreatedBy deploymentcommon.Creator `bson:",inline"` // transaction ID of the create run request CreateRunTID common.TransactionID `bson:"create_run_tid"` PrimaryProvider common.ID `bson:"primary_provider"` PrerequisiteTemplate deploymentcommon.TemplateSnapshot `bson:"prerequisite_template"` TemplateSnapshot deploymentcommon.TemplateSnapshot `bson:"template"` Parameters deploymentcommon.DeploymentParameters `bson:"parameters"` CloudCredentials deploymentcommon.ProviderCredentialMappings `bson:"cloud_creds"` GitCredential string `bson:"git_cred"` Status deploymentcommon.DeploymentRunStatus `bson:"status"` ObjectMetaList []v1.ObjectMeta `bson:","` // FIXME do we want to store this? }
DeploymentRun is the storage model (mongodb) for k8s deployment run. This store additional info that is specific to k8s. FIXME This is currently NOT used, since we do not persistent anything right now.
type IncomingEvent ¶
type IncomingEvent interface { EventType() common.EventType Transaction() common.TransactionID CloudEvent() cloudevents.Event }
IncomingEvent is a incoming event to be handled
type K8SConnectionConfig ¶
type K8SConnectionConfig struct { KubeConfig *clientcmdapi.Config SSHTunnelConfig }
K8SConnectionConfig contains info needed by ports.K8SConnectionConfig to build a "connection" to k8s api
type K8SProviderMetadata ¶
type K8SProviderMetadata struct { KubeconfigCredID string `json:"kubeconfig_cred_id" mapstructure:"kubeconfig_cred_id"` K8SApiSSHTunnel bool `json:"k8s_api_ssh_tunnel" mapstructure:"k8s_api_ssh_tunnel"` K8SApiSSHTunnelConfig struct { Host string `json:"host" mapstructure:"host"` Port int `json:"port" mapstructure:"port"` Username string `json:"username" mapstructure:"username"` UseCacaoSSHKey bool `json:"use_cacao_ssh_key" mapstructure:"use_cacao_ssh_key"` SSHKeyCredID string `json:"ssh_key_cred_id" mapstructure:"ssh_key_cred_id"` SSHHostKey string `json:"ssh_host_key" mapstructure:"ssh_host_key"` } `json:"k8s_api_ssh_tunnel_config" mapstructure:"k8s_api_ssh_tunnel_config"` }
K8SProviderMetadata is the provider metadata for provider of kubernetes type
type OutgoingEvent ¶
type OutgoingEvent interface { EventType() common.EventType Transaction() common.TransactionID ToCloudEvent(source string) (cloudevents.Event, error) }
OutgoingEvent is a outgoing event to be published
type ResponseEvent ¶
type ResponseEvent struct {
// contains filtered or unexported fields
}
ResponseEvent ...
func NewEvent ¶
func NewEvent(eventType common.EventType, transaction common.TransactionID, event interface{}) ResponseEvent
NewEvent creates a new response event
func (ResponseEvent) EventType ¶
func (e ResponseEvent) EventType() common.EventType
EventType returns event type
func (ResponseEvent) ToCloudEvent ¶
func (e ResponseEvent) ToCloudEvent(source string) (cloudevents.Event, error)
ToCloudEvent converts event to cloudevent
func (ResponseEvent) Transaction ¶
func (e ResponseEvent) Transaction() common.TransactionID
Transaction ...
type SSHTunnelConfig ¶
type SSHTunnelConfig struct { SSHTunnel bool SSHTunnelHost string SSHTunnelPort int SSHTunnelUsername string SSHPrivateKey []byte SSHHostKey []byte }
SSHTunnelConfig is config for tunneling k8s api access (HTTPS) via SSH
type TemplateFile ¶
type TemplateFile struct { // path of the file relative to the sub-path specified in template source Path string // content of the file Content []byte }
TemplateFile is one file from template