All Projects → stakater → ProxyInjector

stakater / ProxyInjector

Licence: other
A Kubernetes controller to inject an authentication proxy container to relevant pods - [✩Star] if you're using it!

Programming Languages

go
31211 projects - #10 most used programming language
Smarty
1635 projects
Makefile
30231 projects

Projects that are alternatives of or similar to ProxyInjector

Pega Helm Charts
Orchestrate a Pega Platform™ deployment by using Docker, Kubernetes, and Helm to take advantage of Pega Platform Cloud Choice flexibility.
Stars: ✭ 58 (-24.68%)
Mutual labels:  openshift, k8s
Gitwebhookproxy
A proxy to let webhooks reach running services behind a firewall – [✩Star] if you're using it!
Stars: ✭ 123 (+59.74%)
Mutual labels:  openshift, k8s
Ingressmonitorcontroller
A Kubernetes controller to watch ingresses and create liveness alerts for your apps/microservices in UptimeRobot, StatusCake, Pingdom, etc. – [✩Star] if you're using it!
Stars: ✭ 306 (+297.4%)
Mutual labels:  openshift, k8s
Openshift Acme
ACME Controller for OpenShift and Kubernetes Cluster. (Supports e.g. Let's Encrypt)
Stars: ✭ 287 (+272.73%)
Mutual labels:  openshift, k8s
keycloak-docker
Docker image for Keycloak 6.0.1 (postgres, ssl) + k8s + Openshift
Stars: ✭ 19 (-75.32%)
Mutual labels:  keycloak, openshift
Reloader
Reloader is maintained by Stakater. Like it? Please let us know at [email protected]
Stars: ✭ 2,930 (+3705.19%)
Mutual labels:  openshift, k8s
Deploy
Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Stars: ✭ 78 (+1.3%)
Mutual labels:  openshift, k8s
libvirt-ocp4-provisioner
Automate your OCP4 installation
Stars: ✭ 82 (+6.49%)
Mutual labels:  openshift, k8s
brauzie
Awesome CLI for fetching JWT tokens for OAuth2.0 clients
Stars: ✭ 14 (-81.82%)
Mutual labels:  keycloak, k8s
infinispan-operator
Infinispan Operator
Stars: ✭ 32 (-58.44%)
Mutual labels:  openshift, k8s
deploy
Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Stars: ✭ 133 (+72.73%)
Mutual labels:  openshift, k8s
grafana-operator
An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
Stars: ✭ 449 (+483.12%)
Mutual labels:  openshift, k8s
aws-eks-orb
An orb to simplify deployments to Amazon Elastic Container Service for Kubernetes (Amazon EKS)
Stars: ✭ 16 (-79.22%)
Mutual labels:  k8s
kubeseal-webgui
This is a python based webapp for using Bitnami-Sealed-Secrets in a web-ui.
Stars: ✭ 27 (-64.94%)
Mutual labels:  openshift
kube-dump
Backup a Kubernetes cluster as a yaml manifest
Stars: ✭ 142 (+84.42%)
Mutual labels:  k8s
laravel-docker-k8s
Laravel using Docker and Kubernetes
Stars: ✭ 60 (-22.08%)
Mutual labels:  k8s
citadel
Turn an arbitrary command into a Kubernetes Key Management Service GRPC server
Stars: ✭ 15 (-80.52%)
Mutual labels:  openshift
faas-tutorial
Java FaaS demos with OpenWhisk and OpenShift
Stars: ✭ 43 (-44.16%)
Mutual labels:  openshift
memcached
Memcached Operator for Kubernetes
Stars: ✭ 18 (-76.62%)
Mutual labels:  k8s
gimletd
The Gitops Release Manager
Stars: ✭ 24 (-68.83%)
Mutual labels:  k8s

Proxy Injector

A Kubernetes controller to inject an authentication proxy container to relevant pods

Get started with Stakater

Problem Statement

We want to automatically inject an authentication proxy container in a pod, for any deployment that requires to connect to our SSO provider, instead of manually adding a sidecar container with each deployment

Solution

This controller will continuously watch deployments in specific or all namespaces, and automatically add a sidecar container for the authentication proxy. Configuration for the proxy is managed through annotations of the respective deployment or with ConfigMap of the ProxyInjector.

Supported proxies

For now the ProxyInjector only supports Keycloak Gatekeeper as the authentication proxy, to work with Keycloak Server

Usage

The following quickstart let's you set up ProxyInjector:

  1. Add configuration to the ProxyInjector The following arguments can either be added to the proxy injector config.yaml in the ConfigMap/Secret for centralized configuration, or as annotations on the individual target deployments with a authproxy.stakater.com/ prefix. In case of both, the deployment annotation values will override the central configuration.

    Key Description
    listen the interface address and port the proxy should be listening on
    upstream-url url for the upstream endpoint you wish to proxy
    resources list of resources to proxy uri, methods, roles
    client-id client id used to authenticate to the oauth service
    client-secret client secret used to authenticate to the oauth service
    gatekeeper-image Keycloak Gatekeeper image e.g. keycloak/keycloak-gatekeeper:6.0.1

The rest of the available options can be found at the Keycloak Gatekeeper documentation

Note 1: See the section Using Secrets below if you do not want to use ConfigMap (because client-id and client-secret in plain text) and want to use Secrets to hide them.

  1. Deploy the controller by running the following command:

    For Kubernetes Cluster using kubectl

    kubectl apply -f https://raw.githubusercontent.com/stakater/ProxyInjector/master/deployments/kubernetes/proxyinjector.yaml -n default
    
  2. When deploying any application that needs Keycloak authentication, add the following annotations to the deployment. The service will not need changes as such, all configuration can be provided as annotations in the deployment for the app. And proxy injector automatically modifies the service when injecting the sidecar container.

    Key Description
    authproxy.stakater.com/enabled (true/false, default=false) Enables Keycloak gatekeeper configuration
    authproxy.stakater.com/source-service-name Name of service that needs to be reconfigured to connect to the proxy. instead of the service directly routing to the app container, it will now route to the proxy sidecar instead.
    authproxy.stakater.com/target-port (default=80) the port on the pod where the proxy sidecar (keycloak gatekeeper) will be listening. If not specified, the default value of 80 is used. This port should match the listen configuration
    authproxy.stakater.com/resources String of resources separated by & e.g. (`uri=/*

    The authproxy.stakater.com/listen annotation or the listen property in the ProxyInjector ConfigMap should specify where the proxy sidecar will listen for incoming requests, e.g. "0.0.0.0:80" i.e. local port 80

Using Secrets

To use secrets:

  1. Open values.yaml file by navigating to deployments/kubernetes/chart/proxyinjector/

  2. Set proxyinjector.mount equals to "secret" and pass the data in the data section at the bottom.

  3. Run helm template . > proxyinjector.yaml

  4. Deploy using the Deploying section below.

To use existing Secrets:

  1. Set proxyinjector.mount equals to "secret"
  2. set proxyinjector.existingSecret equals to EXISTING_SECRET_NAME

Using ConfigMap

To pass user credentials/ API keys in secrets:

  1. Open values.yaml file by navigating to deployments/kubernetes/chart/proxyinjector/

  2. Set proxyinjector.mount equals to "configmap" and pass the data in the data section at the bottom.

  3. Run helm template . > proxyinjector.yaml

  4. Deploy using the Deploying section below.

Deploying

You can deploy the controller in the namespace you want to monitor by running the following kubectl command:

kubectl apply -f proxyinjector.yaml -n <namespace>

Note: Before applying proxyinjector.yaml, You need to modify the namespace in the RoleBinding subjects section to the namespace you want to apply RBAC to.

Help

Documentation

You can find more documentation here

Have a question?

File a GitHub issue, or send us an email.

Talk to us on Slack

Join and talk to us on the #tools-proxyinjector channel for discussing the ProxyInjector

Join Slack Chat

License

Apache2 © Stakater

About

The ProxyInjector is maintained by Stakater. Like it? Please let us know at [email protected]

See our other projects or contact us in case of professional services and queries on [email protected]

Contributers

Stakater Team and the Open Source community! 🏆

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].