Categorygithub.com/devfile/registry-operator
modulepackage
0.3.0
Repository: https://github.com/devfile/registry-operator.git
Documentation: pkg.go.dev

# README

Devfile Registry Operator

Apache2.0 License OpenSSF Best Practices OpenSSF Scorecard

The Devfile Registry operator manages the lifecycle of the following custom resources:

  1. Devfile Registry
  2. Devfile Registries List
  3. Cluster Devfile Registries List

Releases

Minor releases will be scheduled roughly on a quarterly basis and will include non-feature breaking changes made between release cycles.

Patch releases are provided as needed for critical bug fixes and security patches, it is strongly recommended for users running on the same minor version of the registry operator to update when these releases become available.

Releases are available on GitHub along with bundle entries on OperatorHub.io and the OpenShift OperatorHub community catalog.

For more updates on releases, please join our communication channels.

Issue Tracking

Issue tracking repo: https://github.com/devfile/api with label area/registry

Changelog

This repository utilizes Release Notes to track and display changes, a changelog for every release can be found here.

Requirements

Deployment cluster must meet one of the following criteria:

  • OpenShift Container Platform (OCP) 4.15.x
  • Kubernetes 1.29.x

Note: Though full support for OpenShift Container Platform (OCP) 4.16.x is not currently in place, it includes Kubernetes 1.29.x APIs therefore should work in theory.

More on the support of container orchestration systems can be found here.

Deployments made by the devfile registry operator must never target the default namespace due to incompatibility with security setups.

Development

  • Go 1.21.x
  • Docker / Podman
  • Operator SDK 1.28.x

See Upgrade SDK Version for a guide on updating the Operator SDK. Ensure the Operator SDK version and the version of Kubernetes APIs match each other when updating by checking CLUSTER_SUPPORT.md.

Running the controller in a cluster

Install cert-manager to provision self-signed certificates for the validating webhooks which are used specifically for the ClusterDevfileRegistriesList and DevfileRegistriesList CRs. Cert manager needs to be installed in order for the controller manager to start.

make install-cert

The controller can be deployed to a cluster provided you are logged in with cluster-admin credentials:

make install && make deploy

The operator will be installed under the registry-operator-system namespace. However, devfile registries can be deployed in any namespace.

Deploying registry to a cluster

After the operator has been installed to a cluster you can deploy a devfile registry by following these instructions.

Development

The repository contains a Makefile; building and deploying can be configured via the environment variables

variablepurposedefault value
IMGImage used for controller (run makefile, if IMG is updated)quay.io/devfile/registry-operator:next
BUNDLE_IMGImage used for bundle OLM packagequay.io/devfile/registry-operator-bundle:<latest_version>
CERT_MANAGER_VERSIONVersion of cert-manager installed using make install-certv1.11.0
ENABLE_WEBHOOKSIf false, disables operator webhookstrue
ENABLE_WEBHOOK_HTTP2Overrides webhook HTTP server deployment to use http/2 if set to true, not recommendedfalse
BUNDLE_CHANNELSSets the list channel(s) include bundle build underalpha
BUNDLE_DEFAULT_CHANNELSets the default channel to use when installing the bundle
ENVTEST_K8S_VERSIONVersion of k8s to use for the test environment1.26 (current)
CONTROLLER_TOOLS_VERSIONVersion of the controller toolsv0.9.2
KUSTOMIZE_VERSIONVersion of kustomizev3.8.7
GOBINPath to install Go binaries to${GOPATH}/bin
K8S_CLIPath to CLI tool to use with the target cluster environment, kubectl or ocEither oc or kubectl if installed in that order
OPERATOR_SDK_CLICLI path to operator-sdk tooloperator-sdk
SHELLActive shell to use with make/usr/bin/env bash -o pipefail
LOCALBINPath to place project binaries./bin
KUSTOMIZEPath to target kustomize binary${LOCALBIN}/kustomize
CONTROLLER_GENPath to target controller-gen binary${LOCALBIN}/controller-gen
ENVTESTPath to target setup-envtest binary${LOCALBIN}/setup-envtest
TARGET_ARCHTarget architecture for operator manager builds, possible values: amd64, arm64, s390x, ppc64leamd64
TARGET_OSTarget operating system for operator manager build, only for make managerlinux
PLATFORMSTarget architecture(s) for make docker-buildxAll supported: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
KUSTOMIZE_INSTALL_SCRIPTURL of kustomize installation script, see kustomize installation instructionshttps://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh

Some of the rules supported by the makefile:

rulepurpose
controller-geninstall the controller-gen tool, used by other commands
kustomizeinstall the kustomize tool, used by other commands
docker-buildbuild registry operator container image using docker
docker-pushpush registry operator container image using docker
docker-buildx-buildbuild registry operator docker image for all supported architectures using docker
docker-buildx-pushbuild & push registry operator docker image for all supported architectures using docker
docker-bundle-buildx-buildbuild registry operator bundle docker image for all supported architectures using docker
docker-bundle-buildx-pushbuild & push registry operator bundle docker image for all supported architectures using docker
podman-buildx-buildbuild registry operator docker image for all supported architectures using podman
podman-buildx-pushpush registry operator docker image for all supported architectures using podman
podman-buildbuild registry operator container image using podman
podman-pushpush registry operator container image using podman
deploydeploy operator to cluster
undeployundeploy operator from cluster
installcreate the devfile registry CRDs on the cluster
uninstallremove the devfile registry operator and CRDs from the cluster
install-certfor validating webhooks, install cert manager on the cluster
uninstall-certfor validating webhooks, remove cert manager from the cluster
manifestsGenerate manifests e.g. CRD, RBAC etc.
generateGenerate the API type definitions. Must be run after modifying the DevfileRegistry type.
bundleGenerate bundle manifests and metadata, then validate generated files.
test-integrationRun the integration tests for the operator.
testRun the unit tests for the operator.
fmtCheck code formatting
fmt_licenseEnsure license header is set on all files
vetCheck suspicious constructs into code
gosecCheck for security problems in non-test source files

To see all rules supported by the makefile, run make help

Testing

Detailed instructions on how to run tests for the Devfile Registry Operator are found in CONTRIBUTING.md.

Run operator locally

It's possible to run an instance of the operator locally while communicating with a cluster.

  1. You may need to install the controller-gen tool before, used when building the binary:
make controller-gen
  1. Build the binary
make manager
  1. Deploy the CRDs
make install
  1. Run the controller
make run ENABLE_WEBHOOKS=false

Contributing

Please see our CONTRIBUTING.md.

Known Issues

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author