Skip to content

Allow dynamic loading of bootstrap credentials #712

@jgresty

Description

@jgresty

Currently the Digital Ocean access key is read from an environment variable in

accessToken := os.Getenv("DIGITALOCEAN_ACCESS_TOKEN")

This means that digital ocean account that the controller serves would need its own deployment of the controller. For better audit control as well as the ability to create clusters on behalf of another user; it would simplify the setup if the controller instead could load the credentials from a reference on one of the clusters CRDs.

For example the DOCluster could have a secret ref in the spec:

apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: DOCluster
metadata:
  name: "${CLUSTER_NAME}"
spec:
  region: ${DO_REGION}
  credentialsRef:
    kind: Secret
    namespace: default
    name: capdo-manager-bootstrap-credentials

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions