Skip to content

Add more CI/CD Integration examples Β #493

Open
@mclarkex

Description

@mclarkex

Description of the problem/feature request
Provide more examples of how to integrate kube-linter into other CI/CD tools for wider adoption and usage.

Description of the existing behavior vs. expected behavior

Current documentation is limited regarding how to integrate with other CI/CD tools.

I've provided a working example of getting kube-linting working for Kubernetes and Helm within Concourse CI Concourse is a popular Go-based CI tool used at a lot of large organisations.

  1. Create a new resource_type:
resource_types:
 - name: kubelinter-image
    type: docker-image 
    source: 
      repository: stackrox/kube-linter 
      tag: latest
  1. Create a resource where your Kubernetes for helm files are stored
- name: platform-code
  type: git
  icon: github
  source: 
    uri:   [email protected]:/orginisation/platform-code.git
    branch: main
    private_key: ((xxxxxx)) #Your SSH key 
  1. Create a new job pulling in your Kubernetes or helm files
jobs:
- name: kube-linting
  plan:
    - get: platform-code #Your repository with 
      trigger: true 
    - task: kube-linting
      config:
        platform: linux
        image_resource:
          type: docker-image
          source:
            repository: stackrox/kube-linter 
            tag: latest
        inputs:
          - name: platform-code
        run: 
          path: /kube-linter 
          args: 
          - lint
          - platform-code/kubernetes/kubernetes-manifiest.yaml
  • The syntax within Concourse requires kube-linter arguments to be passed on two separate lines

Syntax error
image

Working Example Output:
image

Additional context

This is a relatively simple issue, I would like to raise a PR to add it into the ReadMes, but if accepted I will raise a PR with Concourse to add kube-linter to a list of valid resource types as outlined here: https://github.com/concourse/resource-types and here https://resource-types.concourse-ci.org/

Will provide an example for Azure DevOps aswell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions