styra-controller

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0

README

Go Report Card Go Reference Release Gitmoji

styra-controller

styra-controller is a Kubernetes controller designed to automate configuration of Styra DAS. With the use of CustomResourceDefinitions, styra-controller enables systems and datasources to be configured, without having to do it through the GUI. By doing this we can gurantee that no changes are done to Styra DAS manually, which makes change management and compliance easier.

In order to ease configuration of OPA and Styra Local Plane (SLP), the controller automatically creates ConfigMaps and Secrets which contain the configuration and connection details for these components.

Arcitectural overview

styra-controller sits in a Kubernetes cluster and ensures that systems and datasources are created in Styra DAS. It then creates ConfigMaps and Secrets where relevant configuration and connection details can be read.

diagram over the controller architecture

CustomResourceDefinitions

A core feature of the styra-controller is to monitor the Kubernetes API server for changes to specific objects and ensure that the current Styra DAS resources match these objects. The controller acts on the following custom resource definitions (CRDs).

  • System, which defines a Styra DAS system configuration, its datasources and users with access.
  • GlobalDatasource, which defines a global datasource resource in Styra DAS.

For more information about these resources see the design document or the full api reference.

Installation

For a guide on how to install styra-controller see the installation instructions.

Contributing

For a guide on how to contribute to the styra-controller project as well as how to deploy the styra-controller for testing purposes see CONTRIBUTING.md.

Security

If you find a security vulnerability related to the styra-controller project, please do not report it by opening a GitHub issue, but instead please write an email explaining the issue and send it to mim@bankdata.dk.

Directories

Path Synopsis
api
config/v1
Package v1 contains API Schema definitions for the config v1 API group.
Package v1 contains API Schema definitions for the config v1 API group.
styra/v1alpha1
Package v1alpha1 contains API Schema definitions for the styra v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the styra v1alpha1 API group.
styra/v1beta1
Package v1beta1 contains API Schema definitions for the styra v1beta1 API group.
Package v1beta1 contains API Schema definitions for the styra v1beta1 API group.
test/v1
Package v1 contains API Schema definitions for the test v1 API group.
Package v1 contains API Schema definitions for the test v1 API group.
Package main is the main entrypoint used when running the controller.
Package main is the main entrypoint used when running the controller.
internal
controller/styra
Package styra holds controllers for the styra API group.
Package styra holds controllers for the styra API group.
errors
Package errors contains errors.
Package errors contains errors.
fields
Package fields contains helpers for working with fields in the CRDs.
Package fields contains helpers for working with fields in the CRDs.
finalizer
Package finalizer contains helpers for working with the controller finalizer.
Package finalizer contains helpers for working with the controller finalizer.
k8sconv
Package k8sconv contains helpers related to converting data to Kubernetes resources.
Package k8sconv contains helpers related to converting data to Kubernetes resources.
labels
Package labels contains helpers for working with labels.
Package labels contains helpers for working with labels.
predicate
Package predicate contains predicates used by the controllers.
Package predicate contains predicates used by the controllers.
sentry
Package sentry contains a reconciler middleware which sends errors to Sentry.
Package sentry contains a reconciler middleware which sends errors to Sentry.
template
Package template is a placeholder file to make Go vendor this directory properly.
Package template is a placeholder file to make Go vendor this directory properly.
webhook
Package webhook contains helpers for the notifaction webhooks of the controller.
Package webhook contains helpers for the notifaction webhooks of the controller.
pkg
ptr
Package ptr contains helpers for creating pointers to built-in types.
Package ptr contains helpers for creating pointers to built-in types.
styra
Package styra holds a client and helpers for interacting with the Styra APIs.
Package styra holds a client and helpers for interacting with the Styra APIs.

Jump to

Keyboard shortcuts

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