Documentation ¶
Index ¶
- Constants
- Variables
- 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
- func SyncServiceRevisionStatus(ctx context.Context, bm revisionbus.BusMessage) (err error)
- type Deployer
- type JobCreateOptions
- type JobReconciler
- type StreamJobLogsOptions
Constants ¶
View Source
const ( JobTypeApply = "apply" JobTypeDestroy = "destroy" )
View Source
const ( WalrusMetadataProjectName = "walrus_metadata_project_name" WalrusMetadataEnvironmentName = "walrus_metadata_environment_name" WalrusMetadataServiceName = "walrus_metadata_service_name" WalrusMetadataProjectID = "walrus_metadata_project_id" WalrusMetadataEnvironmentID = "walrus_metadata_environment_id" WalrusMetadataServiceID = "walrus_metadata_service_id" // WalrusMetadataNamespaceName is the managed namespace name of an environment, // valid when Kubernetes connector is used in the environment. WalrusMetadataNamespaceName = "walrus_metadata_namespace_name" )
walrus metadata indicate walrus will set value to these attribute while user module include these attribute.
View Source
const DeployerType = types.DeployerTypeTF
DeployerType the type of deployer.
Variables ¶
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.
func SyncServiceRevisionStatus ¶
func SyncServiceRevisionStatus(ctx context.Context, bm revisionbus.BusMessage) (err error)
SyncServiceRevisionStatus 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 service.
func (Deployer) Apply ¶
func (d Deployer) Apply(ctx context.Context, service *model.Service, opts deptypes.ApplyOptions) (err error)
Apply creates a new service revision by the given service, and drives the Kubernetes Job to create resources of the service.
type JobCreateOptions ¶
type JobReconciler ¶
type JobReconciler struct { Logger logr.Logger Kubeconfig *rest.Config KubeClient client.Client ModelClient *model.Client }
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.