Giter Club home page Giter Club logo

gitops-fleet-samples's Introduction

gitops-fleet-samples

This is a sample repository layout for fleet management via GitOps

Purpose

This repository is a sample layout for managing a fleet of clusters from a centralized hub. The layout contains examples related to Configurations, Policies and Applications.

Requirements

  • Open Cluster Management for Kubernetes
  • OpenShift GitOps (Argo CD)
  • Fork of the repository
  • Clusters (for import) or Cloud Provider (for provisioning) or *ks (for import)
  • Subscription Admin role. (Connect to your hub and run the ./makeAppSubAdmin script

What makes it work

The key is identifying clusters for delivery of resources. In Kubernetes resources are Configuration, Policy compliance, and Applications. This is obtained using labels to group and match resources to managed clusters. When delivering resources in GitOps, this is done from Git repositories to clusters in your fleet. The open cluster management community refers to this as subscribing your cluster to a source. This can be accomplished with subscription.apps.open-cluster-management.io or applications.argoproj.io & applicationsets.argoproj.io, these both work similarly and you can move back and forth between the two. Utilizing resources in Git is not vendor specific, so any Git resource delivery system can be leveraged.

Step 1, subscribe your orchestration resources

This is the backbone of fleet management, it instantiates the orchestration resources needed to manage the fleet. In this sample, this is made up of Open Cluster Management configuration policies, Open Cluster Management security policies and Applications (via Subscriptions and Argo CD ApplicationSets)

Subscribing your orchestration resources

Get started

  • First make sure you as a Subscription-Admin. This can be done by connetion to the ACM Hub via the oc cli, and then running the ./makeAppSubAdmin script (no additional parameters required).
  • On the hub cluster subscribe this repositories ./seeds folder. This will start to apply Configuration, Security Policies and Applications. (You can use a Subscription or Argo CD Application for this)
  • Once the Subscriptions, ApplicationSets and Policies are applied to the hub if you already have clusters available, they may start to be configured and prepared, otherwise start labeling them as described in the next step.

Step 2, label your infrastructure

  • Labels on your Open Cluster Management ManagedCluster or Argo CD cluster secrets, help drive placement. For Open Cluster Management, this allows placement decisions for subscriptions and policies. Labels on your cluster secrets in Argo CD will be leveraged by ApplicationSets.
# Supported labels for ManagedCluster or Argocd Secrets
usage: production
# and
usage: development

Step 3, expand the fleet

  • Once you've decided on a labelling strategy (labels that are leveraged by placement), as you import or provision new managed clusters, your configurations, security policies and applications will be applied

gitops-fleet-samples's People

Contributors

jnpacker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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