ladon-resource-manager

command module
v0.0.0-...-3a6d081 Latest Latest
Warning

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

Go to latest
Published: May 1, 2018 License: Apache-2.0 Imports: 30 Imported by: 0

README

ladon-resource-manager

This project contains a Kubernetes controller and Custom Resource Definition for managing Ladon policies.

This repository is a fork of https://github.com/kubernetes/sample-controller, and a lot of code was borrowed from that project.

Install

Edit the file located at k8s/deployment.yaml

vim k8s/deployment.yaml

and edit the POSTGRES_URL to point to your postgres server.

Once you're done, run:

kubectl apply -f k8s/crd.yaml -f k8s/deployment.yaml

This will run the migrations for the Ladon database. If you do not have tables built for ladon, this applicaiton will do it as soon as it starts.

Usage

An example Policy resource is provided at k8s/examples/policy.yaml.

Creating Policy resources will create Policy entries in your ladon database.

kubectl apply -f k8s/examples/policy.yaml

Example:

apiVersion: ladoncontroller.k8s.io/v1alpha1
kind: Policy
metadata:
  name: consent-policy-users
spec:
  description: "Allow Consent app to read user information."
  subjects:
  - "services:consent"
  - "groups:app-internal"
  actions:
  - "read"
  resources:
  - "users:<.*>"
  effect: "allow"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
apis/ladoncontroller/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
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/ladoncontroller/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/ladoncontroller/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