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, likeDeploymentConfig.build.openshift.io- OpenShiftBuildsandBuildConfigs.image.openshift.io-ImageStreamsandImages.project.openshift.io- Projects, OpenShift's wrapper forNamespaces.template.openshift.io- OpenShiftTemplates- 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.
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.
Follow this checklist and copy into the PR:
- Select the desired kubernetes release branch, and use its
go.modandCHANGELOGas references for the rest of the work. - Bump go version if needed.
- Bump
requires andreplaces fork8s.io/,github.com/openshift/, and relevant deps. - Run
go mod vendor && go mod tidy, commitvendorfolder 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.
This repository is compatible with the "OpenShift Tests Extension (OTE)" framework.
make build# 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# 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/allThe test extension binary is included in the production image for CI/CD integration.