GithubHelp home page GithubHelp logo

vshn / provider-minio Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 2.0 767 KB

Crossplane Provider Minio

License: GNU Affero General Public License v3.0

Dockerfile 0.19% Makefile 15.37% Go 83.64% Shell 0.80%
vshn-project-ignore

provider-minio's Introduction

provider-minio

Build Go version Version GitHub downloads

Crossplane provider for managing resources on min.io.

Documentation: https://vshn.github.io/provider-minio/

Local Development

Requirements

  • docker
  • go
  • helm
  • kubectl
  • yq
  • sed (or gsed for Mac)

Some other requirements (e.g. kind) will be compiled on-the-fly and put in the local cache dir .kind as needed.

Common make targets

  • make build to build the binary and docker image
  • make generate to (re)generate additional code artifacts
  • make test run test suite
  • make local-install to install the operator in local cluster
  • make install-samples to run the provider in local cluster and apply sample manifests
  • make run-operator to run the code in operator mode against your current kubecontext

See all targets with make help

QuickStart Demonstration

  1. Make sure you have a kind cluster running and the config exported
  2. make local-install

Kubernetes Webhook Troubleshooting

The provider comes with mutating and validation admission webhook server.

To test and troubleshoot the webhooks on the cluster, simply apply your changes with kubectl.

  1. Make sure you have all CRDs and validation webhook registrations installed.

    make install-crd
    kubectl apply -f package/webhook
  2. To debug the webhook in an IDE, we need to generate certificates:

    make webhook-debug
    # if necessary with another endpoint name, depending on your docker setup
    # if you change the webhook_service_name variable, you need to clean out the old certificates
    make webhook-debug -e webhook_service_name=$HOSTIP
  3. Start the operator in your IDE with WEBHOOK_TLS_CERT_DIR environment set to .work/webhooks.

  4. Apply the samples to test the webhooks:

    make install-samples

Run operator in debugger

  • make crossplane-setup minio-setup install-crds to install crossplane and minio in the kind cluster
  • kubectl apply -f samples/_secret.yaml samples/minio.crossplane.io_providerconfig.yaml
  • EXPORT KUBECONFIG=.work/kind/kind-kubeconfig
  • go run . --log-level 1 operator

Crossplane Provider Mechanics

For detailed information on how Crossplane Provider works from a development perspective check provider mechanics documentation page.

e2e testing with kuttl

Some scenarios are tested with the Kubernetes E2E testing tool Kuttl. Kuttl is basically comparing the installed manifests (usually files named ##-install*.yaml) with observed objects and compares the desired output (files named ##-assert*.yaml).

To execute tests, run make test-e2e from the root dir.

If a test fails, kuttl leaves the resources in the kind-cluster intact, so you can inspect the resources and events if necessary. Please note that Kubernetes Events from cluster-scoped resources appear in the default namespace only, but kubectl describe ... should show you the events.

Cleaning up e2e tests

make clean

provider-minio's People

Contributors

ccremer avatar dependabot[bot] avatar kidswiss avatar mhutter avatar renovate-bot avatar renovate[bot] avatar zugao avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

raffis

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.