Giter VIP home page Giter VIP logo

crossplane-argo-demo's Introduction

crossplane-argo-demo

demo for using Crossplane with argo events, kyverno and Argo Workflows

Goal

Build a system for allowing creation of gatekeeped Github Repositories, with automated triggering of a Github Action workflow in the new repository.

overview

Prerequisites

You will some local container tooling for kind to work, like docker desktop or orbstack.

Flox is used to make this demo simple to run.

Flox activate

If you are not into nix or flox you may get started by installing the following tools:

Optional:

Create a GitHub Fine-Grained Personal Access Token

Use this guide to create a token.

It will need permissions to be able to create repositories and trigger workflows.

Once you have the token, export it as an environment variable along with your Github username (or organization name):

export GITHUB_TOKEN=token-goes-here)
export GITHUB_USERNAME=github-username-or-org
export ARGO_GITHUB_TOKEN=$(echo -n "Bearer $GITHUB_TOKEN" | base64)

This demo subsitutes these values into the manifests using envsubst .

Setup

task create <- creates the Kind cluster
task bootstrap <- Installs required tools and components
task post-bootstrap <- Configures the controllers

Usage

Optionally you may now setup some kyverno policies:

kubectl apply -f kyverno/repo-mutate-policy.yaml <- this will mutate the repository visibility to private
kubectl apply -f kyverno/repo-names-policy.yaml <- this will enforce a naming convention

Now you are ready to create a new repository using an example template repository:

kubectl apply -f crossplane/repo-no-validation.yaml

You can port forward the Argo Workflow UI to see the workflow in action:

Note that auth is disabled in the UI in this demo

kubectl -n argo-events port-forward deployment/argo-server 2746:2746

Open your browser to http://localhost:2746 and you should see the workflow running.

workflow

And in your new repository you should see the workflow running:

img

crossplane-argo-demo's People

Contributors

markopolo123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.