1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-23 06:08:46 +00:00
catalog/task/helm-conftest/0.1
Quan Zhang e294e1246b [TEP-0110] Update Tekton Catalog installation instructions
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: https://github.com/tektoncd/hub/pull/539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
2022-08-16 16:25:52 +01:00
..
helm-conftest.yaml Add linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01:00

Conftest

These tasks make it possible to use Conftest within your Tekton pipelines. Conftest is a tool for testing configuration files using Open Policy Agent.

Installation

Conftest also has a Helm plugin, which redners the Helm chart before applying the policy. For that task use:

kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/helm-conftest/0.1/raw

Helm usage

Once installed, the Helm task can be used as follows:

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: helm-conftest-example
spec:
  taskRef:
    name: helm-conftest
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source
  params:
  - name: chart
    value: stable/mysql
  - name: policy
    value: stable/mysql/policy

Parameters

  • chart: The chart to test against the specified policies (default: .)
  • policy: Where to find the policies (default: policy)
  • output: Which output format to use (default: stdout)
  • args: An array of additional arguments to pass to Conftest (_default [])

Workspaces

  • source: A Workspace containing the source to build.

Platforms

The Task can be run on linux/amd64 platform.