Terraform module which deploys container task on Kubernetes.
module "example" {
source = "..."
infrastructure = {
namespace = "default"
}
task = {
type = periodic
timeout: 30 # in seconds
periodic = {
cron_expression = "*/1 * * * *" # cron expression
}
}
containers = [
{
image = "alpine"
execute = {
command = [
"/bin/sh", "-c", "date"
]
}
resources = {
cpu = 0.1
memory = 100 # in megabyte
}
}
]
}
Please read our contributing guide if you're interested in contributing to Walrus template.
Name | Version |
---|---|
terraform | >= 1.0 |
kubernetes | >= 2.23.0 |
Name | Version |
---|---|
kubernetes | >= 2.23.0 |
terraform | n/a |
No modules.
Name | Type |
---|---|
kubernetes_config_map_v1.ephemeral_files | resource |
kubernetes_cron_job_v1.task | resource |
kubernetes_job_v1.task | resource |
kubernetes_service_v1.tasks | resource |
terraform_data.replacement | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
containers | Specify the container items to deploy. Examples: containers: |
list(object({ |
n/a | yes |
context | Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field. Examples: context: |
map(any) |
{} |
no |
infrastructure | Specify the infrastructure information for deploying. Examples: infrastructure: |
object({ |
{} |
no |
task | Specify the task action, like execution, security and so on. Examples: task: |
object({ |
{ |
no |
Name | Description |
---|---|
context | The input context, a map, which is used for orchestration. |
refer | The refer, a map, including hosts, ports and account, which is used for dependencies or collaborations. |
Copyright (c) 2023 Seal, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE file for details.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.