openshift-controller-manager

module
v0.0.0-alpha.0....-26d20fe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: Apache-2.0

README

OpenShift Controller Manager

The OpenShift Controller Manager (OCM) is comprised of multiple controllers, many of which correspond to a top-level OpenShift API object, watching for changes and acting accordingly. The controllers are generally organized by API group:

  • apps.openshift.io - OpenShift-specific workloads, like DeploymentConfig.
  • build.openshift.io - OpenShift Builds and BuildConfigs.
  • image.openshift.io - ImageStreams and Images.
  • project.openshift.io - Projects, OpenShift's wrapper for Namespaces.
  • template.openshift.io - OpenShift Templates - a simple way to deploy applications.

There are additional controllers which add OpenShift-specific capabilities to the cluster:

  • authorization - provides default service account role bindings for OpenShift projects.
  • serviceaccounts - manages secrets that allow images to be pulled and pushed from the OpenShift image registry.
  • unidling - manages unidling of applications when inbound network traffic is detected. See the OpenShift docs for more information.

Metrics

Many of the controllers expose metrics which are visible in the default OpenShift monitoring system (Prometheus). See metrics for a detailed list of exposed metrics for each API group.

Rebase

Follow this checklist and copy into the PR:

  • Select the desired kubernetes release branch, and use its go.mod and CHANGELOG as references for the rest of the work.
  • Bump go version if needed.
  • Bump requires and replaces for k8s.io/, github.com/openshift/, and relevant deps.
  • Run go mod vendor && go mod tidy, commit vendor folder separately from all other changes.
  • Bump image versions (Dockerfile, ci...) if needed.
  • Run make build verify test.
  • Make code changes as needed until the above pass.
  • Any other minor update, like documentation.

Tests

This repository is compatible with the "OpenShift Tests Extension (OTE)" framework.

Building the test binary
make build
Running test suites and tests
# Run a specific test suite or test
./openshift-controller-manager-tests-ext run-suite openshift/openshift-controller-manager/all
./openshift-controller-manager-tests-ext run-test "test-name"

# Run with JUnit output
./openshift-controller-manager-tests-ext run-suite openshift/openshift-controller-manager/all --junit-path=/tmp/junit-results/junit.xml
./openshift-controller-manager-tests-ext run-test "test-name" --junit-path=/tmp/junit-results/junit.xml
Listing available tests and suites
# List all test suites
./openshift-controller-manager-tests-ext list-suites

# List tests in a specific suite
./openshift-controller-manager-tests-ext list-tests openshift/openshift-controller-manager/all

The test extension binary is included in the production image for CI/CD integration.

Directories

Path Synopsis
cmd
pkg
apps/metrics/prometheus
Package prometheus contains code for injecting apps related metrics into the prometheus registry running in the openshift master
Package prometheus contains code for injecting apps related metrics into the prometheus registry running in the openshift master
build/controller/build/defaults
Package defaults contains the BuildDefaults admission control plugin.
Package defaults contains the BuildDefaults admission control plugin.
build/controller/build/overrides
Package overrides contains the BuildOverrides admission control plugin.
Package overrides contains the BuildOverrides admission control plugin.
build/metrics/prometheus
Package prometheus contains code for injecting build related metrics into the prometheus registry running in the openshift master
Package prometheus contains code for injecting build related metrics into the prometheus registry running in the openshift master
unidling/metrics
Package metrics contains code for unidling controller metrics
Package metrics contains code for unidling controller metrics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL