Skip to content

Commit

Permalink
openshift-virtualization-pipelines-tasks: Auto-update tekton tasks re…
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and openshift-merge-bot[bot] committed Jun 20, 2024
1 parent fc9accb commit fe1240e
Show file tree
Hide file tree
Showing 10 changed files with 1,019 additions and 0 deletions.
96 changes: 96 additions & 0 deletions tasks/cleanup-vm/4.15.2/cleanup-vm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
annotations:
tekton.dev/source: "https://github.com/openshift-virtualization/openshift-virtualization-pipelines-tasks"
tekton.dev/pipelines.minVersion: "0.43.0"
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "OpenShift Virtualization cleanup VM"
tekton.dev/platforms: "linux/amd64"
artifacthub.io/maintainers: |
- name: KubeVirt Tekton tasks maintainers
email: [email protected]
artifacthub.io/provider: Red Hat
artifacthub.io/recommendations: |
- url: https://kubevirt.io/
artifacthub.io/category: integration-delivery
labels:
app.kubernetes.io/version: v4.15.2
name: cleanup-vm
spec:
description: >-
Run commands in KubeVirt virtual machine.
This task can stop and delete VMs
params:
- description: Name of a VM to execute the action in.
name: vmName
type: string
- description: Namespace of a VM to execute the action in. (defaults to active namespace)
name: vmNamespace
type: string
default: ""
- description: Stops the VM after executing the commands when set to true.
name: stop
type: string
default: "true"
- description: Deletes the VM after executing the commands when set to true.
name: delete
type: string
default: "false"
- description: Timeout for the command/script (includes potential VM start). The VM will be stopped or deleted accordingly once the timout expires. Should be in a 3h2m1s format.
name: timeout
type: string
default: "30m"
- description: Secret to use when connecting to a VM.
name: secretName
type: string
default: "__empty__"
- description: Command to execute in a VM.
name: command
type: array
default: []
- description: Arguments of a command.
name: args
type: array
default: []
- description: Script to execute in a VM.
name: script
type: string
default: ""
steps:
- name: execute-in-vm
image: "registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9:v4.15.2"
command:
- entrypoint
args:
- '--stop'
- $(params.stop)
- '--delete'
- $(params.delete)
- '--timeout'
- $(params.timeout)
- '--'
- $(params.command)
- $(params.args)
env:
- name: COMMAND
value: execute-in-vm
- name: VM_NAME
value: $(params.vmName)
- name: VM_NAMESPACE
value: $(params.vmNamespace)
- name: EXECUTE_SCRIPT
value: $(params.script)
- name: CONNECTION_SECRET_NAME
value: $(params.secretName)
volumeMounts:
- mountPath: /data/connectionsecret/
name: connectionsecret
readOnly: true
volumes:
- name: connectionsecret
secret:
secretName: $(params.secretName)
optional: true
70 changes: 70 additions & 0 deletions tasks/copy-template/4.15.2/copy-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
annotations:
tekton.dev/source: "https://github.com/openshift-virtualization/openshift-virtualization-pipelines-tasks"
tekton.dev/deprecated: "true"
tekton.dev/pipelines.minVersion: "0.43.0"
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "OpenShift Virtualization copy template"
tekton.dev/platforms: "linux/amd64"
artifacthub.io/maintainers: |
- name: KubeVirt Tekton tasks maintainers
email: [email protected]
artifacthub.io/provider: Red Hat
artifacthub.io/recommendations: |
- url: https://kubevirt.io/
artifacthub.io/category: integration-delivery
labels:
app.kubernetes.io/version: v4.15.2
name: copy-template
spec:
description: >-
Automates the copying of OpenShift template. The task copies original template
and saves it under new name or if parameter allowReplace is true, then it replaces
template with the same name.
params:
- name: sourceTemplateName
description: Name of an OpenShift template to copy template from.
type: string
- name: sourceTemplateNamespace
description: Namespace of an source OpenShift template to copy template from. (defaults to active namespace)
type: string
default: ""
- name: targetTemplateName
description: Name of an target OpenShift template.
type: string
default: ""
- name: targetTemplateNamespace
description: Namespace of an target OpenShift template to create in. (defaults to active namespace)
type: string
default: ""
- name: allowReplace
description: Allow replacing already existing template (same combination name/namespace). Allowed values true/false
type: string
default: "false"
results:
- name: name
description: The name of a template that was created.
- name: namespace
description: The namespace of a template that was created.
steps:
- name: copytemplate
image: "registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9:v4.15.2"
command:
- copy-template
args:
- "--output=yaml"
env:
- name: SOURCE_TEMPLATE_NAME
value: $(params.sourceTemplateName)
- name: SOURCE_TEMPLATE_NAMESPACE
value: $(params.sourceTemplateNamespace)
- name: TARGET_TEMPLATE_NAME
value: $(params.targetTemplateName)
- name: TARGET_TEMPLATE_NAMESPACE
value: $(params.targetTemplateNamespace)
- name: ALLOW_REPLACE
value: $(params.allowReplace)
70 changes: 70 additions & 0 deletions tasks/create-vm-from-manifest/4.15.2/create-vm-from-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
annotations:
tekton.dev/source: "https://github.com/openshift-virtualization/openshift-virtualization-pipelines-tasks"
tekton.dev/pipelines.minVersion: "0.43.0"
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "OpenShift Virtualization create VM from manifest"
tekton.dev/platforms: "linux/amd64"
artifacthub.io/maintainers: |
- name: KubeVirt Tekton tasks maintainers
email: [email protected]
artifacthub.io/provider: Red Hat
artifacthub.io/recommendations: |
- url: https://kubevirt.io/
artifacthub.io/category: integration-delivery
labels:
app.kubernetes.io/version: v4.15.2
name: create-vm-from-manifest
spec:
description: >-
Automates creation of the KubeVirt virtual machine.
User can create VM from manifest or with the same parameters as for virtctl.
It is possible to immediatelly start the vm after creation with startVM parameter.
params:
- name: manifest
description: YAML manifest of a VirtualMachine resource to be created.
default: ""
type: string
- name: virtctl
description: "Parameters for virtctl create vm command that will be used to create VirtualMachine."
default: ""
type: string
- name: namespace
description: Namespace where to create the VM. (defaults to manifest namespace or active namespace)
default: ""
type: string
- name: startVM
description: Set to true or false to start / not start vm after creation. In case of runStrategy is set to Always, startVM flag is ignored.
default: ""
type: string
- name: runStrategy
description: Set runStrategy to VM. If runStrategy is set, vm.spec.running attribute is set to nil.
default: ""
type: string
results:
- name: name
description: The name of a VM that was created.
- name: namespace
description: The namespace of a VM that was created.
steps:
- name: createvm
image: "registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9:v4.15.2"
command:
- create-vm
args:
- "--output=yaml"
env:
- name: VM_MANIFEST
value: $(params.manifest)
- name: VM_NAMESPACE
value: $(params.namespace)
- name: VIRTCTL
value: $(params.virtctl)
- name: START_VM
value: $(params.startVM)
- name: RUN_STRATEGY
value: $(params.runStrategy)
76 changes: 76 additions & 0 deletions tasks/create-vm-from-template/4.15.2/create-vm-from-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
annotations:
tekton.dev/source: "https://github.com/openshift-virtualization/openshift-virtualization-pipelines-tasks"
tekton.dev/pipelines.minVersion: "0.43.0"
tekton.dev/categories: Automation
tekton.dev/tags: kubevirt
tekton.dev/displayName: "OpenShift Virtualization create VM from template"
tekton.dev/platforms: "linux/amd64"
artifacthub.io/maintainers: |
- name: KubeVirt Tekton tasks maintainers
email: [email protected]
artifacthub.io/provider: Red Hat
artifacthub.io/recommendations: |
- url: https://kubevirt.io/
artifacthub.io/category: integration-delivery
tekton.dev/deprecated: "true"
labels:
app.kubernetes.io/version: v4.15.2
name: create-vm-from-template
spec:
description: >-
Automates creation of the KubeVirt virtual machine.
User can create VM from OpenShift template.
It is possible to immediatelly start the vm after creation with startVM parameter.
params:
- name: templateName
description: Name of an OKD template to create VM from.
type: string
- name: templateNamespace
description: Namespace of an OKD template to create VM from. (defaults to active namespace)
default: ""
type: string
- name: templateParams
description: Template params to pass when processing the template manifest. Each param should have KEY:VAL format. Eg ["NAME:my-vm", "DESC:blue"]
default: []
type: array
- name: vmNamespace
description: Namespace where to create the VM. (defaults to active namespace)
default: ""
type: string
- name: startVM
description: Set to true or false to start / not start vm after creation. In case of runStrategy is set to Always, startVM flag is ignored.
default: ""
type: string
- name: runStrategy
description: Set runStrategy to VM. If runStrategy is set, vm.spec.running attribute is set to nil.
default: ""
type: string
results:
- name: name
description: The name of a VM that was created.
- name: namespace
description: The namespace of a VM that was created.
steps:
- name: createvm
image: "registry.redhat.io/container-native-virtualization/kubevirt-tekton-tasks-create-datavolume-rhel9:v4.15.2"
command:
- create-vm
args:
- "--output=yaml"
- '--template-params'
- $(params.templateParams)
env:
- name: TEMPLATE_NAME
value: $(params.templateName)
- name: TEMPLATE_NAMESPACE
value: $(params.templateNamespace)
- name: VM_NAMESPACE
value: $(params.vmNamespace)
- name: START_VM
value: $(params.startVM)
- name: RUN_STRATEGY
value: $(params.runStrategy)
Loading

0 comments on commit fe1240e

Please sign in to comment.