Coder Social home page Coder Social logo

miheinr / argocd-namespace-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhat-gpte-devopsautomation/argocd-namespace-operator

0.0 0.0 0.0 24 KB

Operator to add a namespace to be managed by a namespaced ArgoCD deployment

Dockerfile 14.65% Makefile 85.35%

argocd-namespace-operator's Introduction

ArgoCD Namepace Operator

This operator allows a regular user to add the ArgoCD label to any namespace that they are authorized to create objects in.

If ArgoCD is installed into a custom namespace via the OpenShift GitOps operator it can only manage the namespace it is deployed into.

However often developers want to create additional namespaces and manage those with that namespaced ArgoCD installation. This is possible by adding the label argocd.argoproj.io/managed-by: <argocd namespace> to the namespace to be managed. However only cluster administrators are allowed to add labels to a namespace.

This is where this operator helps. A Cluster administrator can deploy this operator to allow regular users to add the label to their namespaces.

Installation

  1. As a cluster administrator deploy the catalog source:

    oc apply -f https://raw.githubusercontent.com/redhat-gpte-devopsautomation/argocd-namespace-operator/main/catalogsource.yaml
  2. Also as a cluster administrator create a subscription to deploy the operator:

    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: argocd-namespace-operator
      namespace: openshift-operators
    spec:
      channel: stable
      installPlanApproval: Automatic
      name: argocd-namespace-operator
      source: argocd-namespace-operator-catalogsource
      sourceNamespace: openshift-operators
  3. Once the operator is running regular users can add their namespaces to their ArgoCD installations.

Usage

In order to use this operator a user will need to create a custom resource, ArgoCDManaged into any namespace to be managed by their ArgoCD.

  1. To add namespace user-development to be managed by ArgoCD deployed into user-argocd deploy the following ArgoCDManaged resource:

    apiVersion: pfe.opentlc.com/v1
    kind: ArgoCDManaged
    metadata:
      name: argocdmanaged
      namespace: user-development
    spec:
      argocdNamespace: user-argocd
  2. The operator will add the label argocd.argoproj.io/managed-by: user-argocd to the namespace user-development.

  3. Deleting the custom resource will remove the label from the namespace again.

argocd-namespace-operator's People

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.