service-binding-usage-controller

module
v0.0.0-...-d3bedcd Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0

README

Service Binding Usage Controller

Overview

Service Binding Usage Controller injects Service Bindings into a given application using the Service Binding Usage custom resource, which allows for binding this application to a given Service Instance. The Service Binding Usage is a Kubernetes custom resource which is Namespace-scoped.

For the custom resource definition, see the Service Binding Usage CRD file. For more information on the Service Binding Usage Controller, see the docs folder in this repository. You can also refer to the corresponding Service Bindng Usage documentation on the website.

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 the Buildpack Golang Docker Image README.

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.

Development

Use the make verify command to test your changes before each commit. To build an image, use the make build-image command with the 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 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 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