Documentation
¶
Index ¶
- func CreateJob(ctx context.Context, clientSet *kubernetes.Clientset, opts JobCreateOptions) error
- func CreateSecret(ctx context.Context, clientSet *kubernetes.Clientset, name string, ...) error
- func NewDeployer(_ context.Context, opts deptypes.CreateOptions) (deptypes.Deployer, error)
- func StreamJobLogs(ctx context.Context, opts StreamJobLogsOptions) error
- type Deployer
- func (d Deployer) Apply(ctx context.Context, mc model.ClientSet, run *model.ResourceRun, ...) (err error)
- func (d Deployer) Destroy(ctx context.Context, mc model.ClientSet, run *model.ResourceRun, ...) (err error)
- func (d Deployer) Plan(ctx context.Context, mc model.ClientSet, run *model.ResourceRun, ...) (err error)
- func (d Deployer) Type() deptypes.Type
- type JobCreateOptions
- type StreamJobLogsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJob ¶
func CreateJob(ctx context.Context, clientSet *kubernetes.Clientset, opts JobCreateOptions) error
CreateJob create a job to run terraform deployment.
func CreateSecret ¶
func CreateSecret(ctx context.Context, clientSet *kubernetes.Clientset, name string, data map[string][]byte) error
CreateSecret create a secret to store terraform config.
func NewDeployer ¶
func StreamJobLogs ¶
func StreamJobLogs(ctx context.Context, opts StreamJobLogsOptions) error
StreamJobLogs streams the logs of a job.
Types ¶
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
Deployer terraform deployer to deploy the resource.
func (Deployer) Apply ¶
func (d Deployer) Apply( ctx context.Context, mc model.ClientSet, run *model.ResourceRun, opts deptypes.ApplyOptions, ) (err error)
Apply creates a new resource run by the given resource, and drives the Kubernetes Job to create components of the resource.
func (Deployer) Destroy ¶
func (d Deployer) Destroy( ctx context.Context, mc model.ClientSet, run *model.ResourceRun, opts deptypes.DestroyOptions, ) (err error)
Destroy creates a new resource run by the given resource, and drives the Kubernetes Job to clean the components of the resource.
type JobCreateOptions ¶
type JobCreateOptions struct { // Type is the deployment type of job, apply or destroy or other. Type types.RunJobType Image string Env []corev1.EnvVar DockerMode bool ResourceRun *model.ResourceRun Token string ServerURL string }
type StreamJobLogsOptions ¶
type StreamJobLogsOptions struct { Cli *coreclient.CoreV1Client RunID object.ID JobType string Out io.Writer }
Click to show internal directories.
Click to hide internal directories.