GithubHelp home page GithubHelp logo

raffis / ceasing-kustomize-controller Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 63 KB

flux kustomization with expiration

Dockerfile 2.63% Makefile 8.31% Go 89.06%
k8s-controller fluxcd flux gitops-toolkit gitops kustomize

ceasing-kustomize-controller's Introduction

Ceasing kustomization controller

Go Report Card Coverage Status Docker Pulls Artifact HUB

A ceasing kustomization is a wrapper around flux2 kustomization CRD. It introduces a kustomization with an expiration time. After the expiration is reached the managed kustomization is removed from the cluster and all resources created by the kustomization. The CeasingKustomization continues to gate the managed kustomization and will not recreate it. That way you can also distribute CeasingKustomizations via GitOps as you might already do with Kustomizations.

Note: A CeasingKustomization always deploys the underlying kustomization as prunable no matter if it is set to true or false.

Use cases

The use case is primarily to create temporary resources so you don't need to remember it needs to be removed again, for example:

  • Grant temporary RBAC rules, for example give a user temporary exec permission
  • Create temporary user accounts
  • Temporary preview tenants
  • ...

Example CeasingKustomization

apiVersion: kustomize.raffis.github.io/v1beta2
kind: CeasingKustomization
metadata:
  name: admin-access
spec:
  ttl: 1d
  kustomizationTemplate:
    spec:
      interval: 5m
      path: "./base/admin-access"
      prune: false
      sourceRef:
        kind: GitRepository
        name: gitops
      timeout: 80s

Configure the controller

You may change base settings for the controller using env variables (or alternatively command line arguments).

Available env variables:

Name Description Default
METRICS_ADDR The address of the metric endpoint binds to. :9556
PROBE_ADDR The address of the probe endpoints binds to. :9557
ENABLE_LEADER_ELECTION Enable leader election for controller manager. true
LEADER_ELECTION_NAMESPACE Change the leader election namespace. This is by default the same where the controller is deployed. ``
NAMESPACES The controller listens by default for all namespaces. This may be limited to a comma delimited list of dedicated namespaces. ``
CONCURRENT The number of concurrent reconcile workers. 4

ceasing-kustomize-controller's People

Contributors

raffis avatar

Watchers

 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.