Git Product home page Git Product logo

addon-metadata-operator's Introduction

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

mtcli

The external Jenkins integration will run the build_tag.sh script after you push a tag. The script runs goreleaser, which is responsible for building the binaries and publishing them as a Github Release.

$ git tag vX.X.X
$ git push upstream --tags

A tag can't be built twice, you will need to add a new commit and a new tag referencing the latest commit.

addon-metadata-operator image

The container image is built on every merge to the master branch. The external Jenkins integration will run the build_deploy.sh script, effectively building and pushing to: https://quay.io/repository/app-sre/addon-metadata-operator.

License

Apache License 2.0, see LICENSE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.