openanalytics / containerproxy

Manage HTTP proxy routes into Docker containers
Apache License 2.0
45 stars 66 forks source link

Support Kubernetes Pods Service Accounts #45

Closed fifthpostulate closed 4 years ago

fifthpostulate commented 4 years ago

In the application configuration for Kubernetes backend users it would be useful to be able to assign a service account to the application pods. Something like this:

specs:
      - id: my_example_app
        display-name: My Example App
        description: Super cool example
        container-image: 5555555555.dkr.ecr.us-beast-1.amazonaws.com/my-repo/image:3
        service-account: svc-forecast-dashboard

This would allow AWS EKS users to use Kubernetes service account to IAM role bindings to enable connectivity to Hive, Aurora, or any other platform dependencies.

LEDfan commented 4 years ago

Hi @fifthpostulate

In order to not have to implement every Kubernetes feature in ContainerProxy, we decided to add a generic way of adding Kubernetes specific configuration to a ContainerProxy app. This feature is called kubernetes-pod-patches and allows to patch the specification of the Pod before it is created by ContainerProxy. More information about this feature can be found here (you have to scroll down a bit). An example to change the ServiceAccount is included. This should cover your use-case. Feel free to open an issue if you experience any issue with this feature. The change is included in the just ShinyProxy 2.4.0

Again thanks for your contribution.