Certified Operator Build Guide
  • Introduction
  • What is an Operator?
  • Pre-Requisites
  • Helm Operators
    • Building a Helm Operator
      • Using a Single Image Variable (Red Hat Marketplace)
      • Dockerfile Requirements
      • Update the Controller Manager
      • Building and Pushing Image
  • Ansible Operators
    • Building an Ansible Operator
      • Using a Single Image Variable (Red Hat Marketplace)
      • Dockerfile Requirements
      • Update the Controller Manager
      • Building and Pushing Image
  • Golang Operator Gotcha's
    • Writing to the Status Subresource
  • OpenShift Deployment
    • Operator Metadata
      • Update CRDs from v1beta1
      • Creating the Metadata Bundle
      • Adjusting the ClusterServiceVersion
      • Reviewing your Metadata Bundle
      • Metadata Bundle Image
        • Managing OpenShift Versions
    • Installing an OpenShift Environment
    • Deploying onto OpenShift
  • Troubleshooting and Resources
    • Creating an Ansible Role From a Helm Chart
    • Security Context Constraints
    • Connect Metadata Test Results
    • Red Hat Marketplace Requirements
  • Appendix
    • What if I've already published a Community Operator?
      • Consuming Applications from RHCC
      • Applying Security Context Constraints
      • Choosing a Unique Package Name
      • Assembling the Metadata Bundle
    • Community Operators
    • AWS OpenShift 4 Cluster Quick Start Guide
    • Using Third Party Network Operators with OpenShift
      • Appendix A - CNI Operator Manifests
      • Appendix B - Cluster Network Status
      • Appendix C - Operator Group Manifest
      • Appendix D - Subscription Manifest
    • Bundle Maintenance After Migration
    • Frequently Asked Questions (FAQ)
    • Multi-Arch Operator Certification
      • Glossary of Terms
      • Requirements and Limitations
      • Building a Multi-Arch Operator Image
      • Scanning and Publishing
      • Updating the Bundle Image
Powered by GitBook
On this page
  • Setup Quay.io account
  • Building and Pushing the Operator
  • Editing your Image and ImagePullPolicy
  1. Ansible Operators
  2. Building an Ansible Operator

Building and Pushing Image

PreviousUpdate the Controller ManagerNextWriting to the Status Subresource

Last updated 4 years ago

Setup Quay.io account

Before we build our operator image we will want to setup an account on . We will need to push this image to quay.io so that we can test the Metadata Files discussed in the next section. To setup an account on quay.io:

  1. Go to:

  2. Click on the SIGN IN button located on the upper right side

  3. You can either Sign In with your GitHub account or click Create Account

  4. Once logged into Quay, click CREATE REPOSITORY to create a place to push your operator image for testing (example name: mongodb-operator)

Building and Pushing the Operator

Build the mongodb-operator image and push it to a registry:

make docker-build docker-push IMG=quay.io/example/mongodb-operator:v0.0.1

Editing your Image and ImagePullPolicy

Now that you have built and pushed the image to quay.io it is necessary to edit config/manager/manager.yaml and replace the following fields:

  • image - your new image on quay.io

  • imagePullPolicy - Always

quay.io
quay.io
This is the edited example of deploy/operator.yaml