Atlas Broker
Atlas Broker for Kubernetes Service Catalog
Docker
The docker folder provides everything to create an image that will serve Service Catalog requests in Kubernetes.
Atlasbroker module
Installation
This package is available for Python 3.5+.
pip3 install atlasbroker
Or install the development version from github:
pip3 install git+https://github.com/mickybart/python-atlasbroker.git
Prerequisite
Examples in this README are using the secret.json file to inject Atlas and Mongo credentials. Of course you can use any other solution provided by your infrastructure.
# Secrets structure
#
secrets = {
"mongo" : {
"uri": "",
"db": "",
"timeoutms": 5000,
"collection" : ""
},
"atlas" : {
"user": "",
"password" : "",
"group" : ""
}
}
Quick start
from atlasbroker.broker import Broker
from atlasbroker.config import Config
secrets = Config.load_json("secret.json")
config = Config(secrets["atlas"], secrets["mongo"])
Broker(config).run()
Custom Config
The class Config is the main way to customize the broker. All important functions like generate credentials, database name, permissions of the database user, UUID, etc are exposed on this class.
Please read the Code documentation for more details.
from atlasbroker.broker import Broker
from atlasbroker.config import Config
secrets = Config.load_json("secret.json")
class CustomConfig(Config):
PARAMETER_NAMESPACE="ns"
def generate_binding_username(self, binding):
return binding.binding_id + '-rw'
def generate_instance_dbname(self, instance):
return instance.parameters[self.PARAMETER_NAMESPACE]
config = CustomConfig(secrets["atlas"], secrets["mongo"])
Broker(config).run()
Error Types
Exceptions
- ErrClusterNotFound
Cluster not found
- ErrClusterConfig
Cluster configuration not found
- ErrStorageMongoConnection
The storage is not able to communicate with MongoDB
- ErrStorageTypeUnsupported
Type unsupported
- ErrStorageRemoveInstance
Failed to remove the instance
- ErrStorageRemoveBinding
Failed to remove the binding
- ErrStorageStore
Failed to store the instance or binding
- ErrStorageFindInstance
Failed to find the instance
- ErrPlanUnsupported
Plan not supported
Internal Notes
Bugs or Issues
Please report bugs, issues or feature requests to Github Issues
Metadata
Release files for atlasbroker 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atlasbroker-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for atlasbroker-2.0.0-py3-none-any.whl |
Release files / atlasbroker-2.0.0-py3-none-any.whl
| Download URL | atlasbroker-2.0.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f9529495155496d96d1aa9ef4bb985bad23c0f48bdb3d1a6f6c3f0e07edc009
|
|
BLAKE2b-256 checksum How to use checksums |
b39aa0ba7e3304a2e2543e92c98e76f6eeffabbd5d6ecb0380233148deaef8be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for atlasbroker 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.