Documentation ¶
Index ¶
- Constants
- 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 ParseModuleAttributes(ctx context.Context, mc model.ClientSet, attributes map[string]any, ...) (attrs map[string]any, variables model.Variables, ...)
- func StreamJobLogs(ctx context.Context, opts StreamJobLogsOptions) error
- func SyncResourceRevisionStatus(ctx context.Context, bm revisionbus.BusMessage) (err error)
- type Deployer
- type JobCreateOptions
- type JobReconciler
- type RevisionOpts
- type StreamJobLogsOptions
Constants ¶
View Source
const ( JobTypeApply = "apply" JobTypeDestroy = "destroy" )
View Source
const DeployerType = types.DeployerTypeTF
DeployerType the type of deployer.
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 ParseModuleAttributes ¶ added in v0.3.1
func ParseModuleAttributes( ctx context.Context, mc model.ClientSet, attributes map[string]any, onlyValidated bool, opts RevisionOpts, ) (attrs map[string]any, variables model.Variables, outputs map[string]parser.OutputState, err error)
ParseModuleAttributes parse module variables and dependencies.
func StreamJobLogs ¶
func StreamJobLogs(ctx context.Context, opts StreamJobLogsOptions) error
StreamJobLogs streams the logs of a job.
func SyncResourceRevisionStatus ¶ added in v0.4.0
func SyncResourceRevisionStatus(ctx context.Context, bm revisionbus.BusMessage) (err error)
SyncResourceRevisionStatus updates the status of the service according to its recent finished service revision.
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, resource *model.Resource, opts deptypes.ApplyOptions, ) (err error)
Apply creates a new resource revision by the given resource, and drives the Kubernetes Job to create components of the resource.
type JobCreateOptions ¶
type JobReconciler ¶
type JobReconciler struct { Logger logr.Logger Kubeconfig *rest.Config KubeClient client.Client ModelClient *model.Client }
type RevisionOpts ¶ added in v0.4.0
type StreamJobLogsOptions ¶
type StreamJobLogsOptions struct { Cli *coreclient.CoreV1Client RevisionID object.ID JobType string Out io.Writer }
Click to show internal directories.
Click to hide internal directories.