addon-metadata-operator

module
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0

README

addon-metadata-operator

Operator responsible for managing AddOn resources in OSD

Developer Guide

Getting Started

The initial scaffolding is done using kubebuilder which doesn't work with go1.17. Here is how to download and setup go1.16 for this project:

# https://golang.org/doc/manage-install#installing-multiple
$ go install golang.org/dl/go1.16.7@latest
$ go1.16.7 download

$ cat <<EOF > .envrc
export GOROOT=$(go1.16.7 env GOROOT)
export PATH=${GOROOT}/bin:${PATH}
EOF

$ direnv allow .
.envrc

Use .envrc with direnv to make sure your environment is set properly:

export GOROOT=$(go1.16.7 env GOROOT)
export GOBIN=${PWD}/.cache/bin
export PATH=${GOROOT}/bin:${GOBIN}:${PATH}
export KUBECONFIG=${PWD}/.cache/kubeconfig

Develop

Useful make commands

Install pre-commit hooks:

$ pre-commit install

Run code checks:

$ make check

Run tests:

$ make test

Regenerate manifests and CRDs (./config/crd/bases/addons.managed.openshift.io_addonmetadata.yaml whenever you modify the AddonMetadata type:

$ make manifest

You can also use the Dockerfile.test for a more stable environment:

$ ./pr_check.sh

Release

License

Apache License 2.0, see LICENSE.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the addons v1alpha1 API group +kubebuilder:object:generate=true +groupName=addons.managed.openshift.io
Package v1alpha1 contains API Schema definitions for the addons v1alpha1 API group +kubebuilder:object:generate=true +groupName=addons.managed.openshift.io
cmd
internal
cmd
pkg

Jump to

Keyboard shortcuts

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