service-binding-usage-controller/

directory
v0.0.0-...-a52e8f6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0

README

Service Binding Usage Controller

Overview

The Service Binding Usage Controller injects the ServiceBindings into a given application using the ServiceBindingUsage resource, which allows this application to bind to a given ServiceInstance. The ServiceBindingUsage is a Kubernetes custom resource which is Namespace-scoped. For the custom resource definition, see the ServiceBindingUsage CRD file. For more detailed information on the Service Binding Usage Controller, see the docs folder in this repository.

Prerequisites

To set up the project, download these tools:

These Go and Dep versions are compliant with the buildpack used by Prow. For more details read this document.

Usage

This section explains how to use the Service Binding Usage Controller.

Run a local version

To run the application without building the binary file, run this command:

APP_KUBECONFIG_PATH=/Users/$User/.kube/config APP_LOGGER_LEVEL=debug go run cmd/controller/main.go

For the description of the available environment variables, see the Use environment variables section.

Use environment variables

Use the following environment variables to configure the application:

Name Required Default Description
APP_PORT No 3000 The port on which the HTTP server listens.
APP_LOGGER_LEVEL No info Show detailed logs in the application.
APP_KUBECONFIG_PATH No None The path to the kubeconfig file that you need to run an application outside of the cluster.
APP_PLUGGABLE_SBU No false The feature flag that enables pluggable binding usage by UsageKind resources.

Development

Use the make verify command to test your changes before each commit. To build an image, use the make build-image command with DOCKER_PUSH_REPOSITORY and DOCKER_PUSH_DIRECTORY variables, for example:

DOCKER_PUSH_REPOSITORY=eu.gcr.io DOCKER_PUSH_DIRECTORY=/kyma-project/develop make build-image

Directories

Path Synopsis
cmd
internal
controller/automock
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0
controller/usagekind/automock
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0
platform/logger
Package logger is responsible for logging.
Package logger is responsible for logging.
platform/logger/spy
Package spy provides an implementation of go-sdk.logger that helps test logging.
Package spy provides an implementation of go-sdk.logger that helps test logging.
pkg
apis/servicecatalog/v1alpha1
+groupName=servicecatalog.kyma-project.io
+groupName=servicecatalog.kyma-project.io
apis/settings
Package settings contains settings API versions This is base on the types defined in this repository https://github.com/jpeeler/podpreset-crd/tree/f726860d9e545790c6487291af6f77de8f3b5812/pkg/apis/settings We need to define it here to be able to build the client.
Package settings contains settings API versions This is base on the types defined in this repository https://github.com/jpeeler/podpreset-crd/tree/f726860d9e545790c6487291af6f77de8f3b5812/pkg/apis/settings We need to define it here to be able to build the client.
apis/settings/v1alpha1
Package v1alpha1 contains API Schema definitions for the settings v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/jpeeler/podpreset-crd/pkg/apis/settings +k8s:defaulter-gen=TypeMeta +groupName=settings.svcat.k8s.io
Package v1alpha1 contains API Schema definitions for the settings v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/jpeeler/podpreset-crd/pkg/apis/settings +k8s:defaulter-gen=TypeMeta +groupName=settings.svcat.k8s.io
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/servicecatalog/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/servicecatalog/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/settings/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/settings/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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