Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Make backends configurable #18

Merged
merged 22 commits into from
May 29, 2019
Merged

Make backends configurable #18

merged 22 commits into from
May 29, 2019

Conversation

riccardomc
Copy link
Contributor

@riccardomc riccardomc commented May 29, 2019

We decided to simplify the architecture of the operator and reduce the cardinality of backends per operator instance to only one. We will also limit the scope to one target namespace. This will greatly simplify configuration and minimize unwanted behavior.

This PR introduces the behavior for the operator to check for an OPERATOR_CONFIG environment variable that contains JSON formatted configuration data based on the following struct:

type BackendConfig struct {
	Name       string
	Type       string
	Parameters map[string]string
}

The Parameter field is free-form and up to the specific backend type to specialize. The following is an example for the AWS Secrets Manager backend:

{
  "Name": "asm-example",
  "Type": "asm",
  "Parameters": {
     "accessKeyID": "$AWS_ACCESS_KEY_ID",
      "region": "$AWS_DEFAULT_REGION",
      "secretAccessKey": "$AWS_SECRET_ACCESS_KEY"
    }
}

An example is provided on how to use a Secret to populate the OPERATOR_CONFIG environment variable for the AWS Secret Manager Backend.

@riccardomc riccardomc merged commit 00ed65a into master May 29, 2019
@riccardomc riccardomc changed the title WIP Make backends configurable Make backends configurable May 29, 2019
@riccardomc riccardomc deleted the pluggablebackends branch May 31, 2019 10:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant