Giter Club home page Giter Club logo

om-env-example's Introduction

Red Hat Marketplace - Operator Spec

Operator Onboarding Steps

  1. Remove any reference of image locations from the operator code.
    • I.e. if you have hard coded references to images in your operator for downloads.
  2. Add the env vars to the with RELATED_IMAGE_<dentifier> to the operator CSV.
  3. Reference the env variable in the operator source code.'
  4. Update your operator images and metadata in Red Hat's Container Certification tool.

Description of the repo

This repo contains example operator code and metadata (for deployment using the Operator Lifecycle Manager or OLM) used to showcase the override of an operator image source using environment variables.

Refactoring your operator code to use env vars for the operand(s) image source will help ensure that your operator will work in disconnected/offline or proxied Kubernetes environments such as OpenShift Container Platform (when installed in such an environment).

Proposed Naming Convention for Environment Variables

For compatibility with OpenShift Container Platform and the K8s platform-agnostic Operator Lifecycle Manager, the following convention is suggested when naming your environment variables:

  • All env vars should start with the prefix RELATED_IMAGE_
  • The convention follows the rough form of RELATED_IMAGE_<identifier>
  • Any friendly name can be used for the latter part of the environment variable, however any alpha characters should be upper case (eg: RELATED_IMAGE_DATABASE) per bourne/bash shell conventions
  • Alphanumeric or purely numeric identifiers can also be used (eg: RELATED_IMAGE_DB0 or simply RELATED_IMAGE_0)
  • Numerous environment variables can be defined and utilized as needed to allow any number of operand types (unique container images)
  • Extended identifiers can be used by including additional underscores in the identifier (eg: RELATED_IMAGE_ISTIO_SIDECAR)

Example Implementation - Quick Links

See ubinoop_controller.go for an example go source implementation.

Also see clusterserviceversion.yaml for an example of setting these environment variables in the operator metadata.

om-env-example's People

Contributors

jsm84 avatar zach-source 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.