GithubHelp home page GithubHelp logo

argocd-uor-plugin's Introduction

argocd-uor-plugin

Argo CD Plugin to retrieve assets from Universal Object Reference (UOR) Collections.

Installing the plugin in your environment

The plugin is designed for Argo CD version 2.4+ and is designed to leverage the sidecar model of a Config Management Plugin (CMP) and the Argo CD Operator.

First, add the CMP ConfigMap to the namespace containing Argo CD:

kubectl apply -f manifests/cmp-plugin.yaml

Next, patch the repo server containers to make the plugin available to Argo CD:

kubectl apply -f manifests/argocd.yaml

NOTE: If an existing ArgoCD resource has been defined, be sure to match the name of the existing resource.

The plugin has been applied successfully when the repo-server pod has completed its' initialization and includes the necessary sidecar containers

Getting Started

The following is a simple demonstration using the plugin.

NOTE: The getting started is currently designed for use within an OpenShift environment.

The simple example that will be demonstrated as part of this getting started is located in the [examples/simple] directory.

Navigate to the [examples/simple] directory:

cd examples/simple

A Collection has previously been built and is available within a publicly accessible registry. The assets related to the collection are located in the collection directory along with a Dataset Configuration file (dataset-config.yaml).

Two Argo CD applications are available to demonstrate the retrieval of Kubernetes assets within a collection. The collection contains Kubernetes resources that have metadata associated to development (dev) and production (prod) environments through the use of attributes.

The uor-sample-dev application makes use of a plugin environment variable ATTRIBUTE_QUERY that defines the location of a AttributeQuery that retrieves resources from the collection that contain the attribute dev: true.

The Argo CD Application defines two plugin environment variable that it makes use of at runtime:

  • Location of the UOR collection
  • Location of the Attribute file within the source

Each Argo CD Application references a different Attribute Query resource located in the source directory.

Apply both Argo Applications to the cluster.

kubectl apply -f argocd

Note: Be sure to specify the namespace Argo CD is deployed within

IMPORTANT: Be sure that the Argo CD controller has the necessary permissions to create namespaces and resources within the newly created namespaces.

Once Argo CD synchronizes the repository, two namespaces will be created containing a single mircoservice application.

  • simple-uor-dev
  • simple-uor-prod

A Route exposes the application so that they can be viewed in a browser. Open a browser to view the application. Note that the background color in each deployment is different (blue vs red) that differentiates the environments as the Argo CD plugin retrieved from the UOR collection as defined by the presence of the ENVIRONMENT environment variable in the production Deployment.

Verify the application can be viewed in a browser to confirm the end to end capability of the Argo CD plugin.

argocd-uor-plugin's People

Contributors

sabre1041 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.