oauth2-proxy-operator

command module
v0.0.0-...-20b8e5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

oauth2-proxy-operator (WIP)

This is a kubernetes operator for Oauth2Proxy. It allows you to run an instance of OAuth2Proxy by just specifying a CRD like this:

apiVersion: oauth2proxy.oauth2proxy-operator.dexter0195.com/v1alpha1
kind: OAuth2Proxy
metadata:
  name: oauth2proxy-sample
spec:
  size: 1
  envFromExistingSecret:
    secretRef:
      name: oauth2proxy-sample
  config: |
    provider = "azure"
    email_domains = ["*"]
    client_id = "xxx"
    azure_tenant = "xxx"
    oidc_issuer_url = "https://sts.windows.net/xxx/"
---
apiVersion: v1
kind: Secret
metadata:
  name: oauth2proxy-sample
type: Opaque
stringData:
  OAUTH2_PROXY_CLIENT_SECRET: "xxxx"
  OAUTH2_PROXY_COOKIE_SECRET: "xxx"

WIP

This is a work in progress project that I created mostly for playing around with the operator-sdk. I wouldn't recommend running this in production.

Contributions are always welcome if you see potential in this tool :)

How to run

make generate
make manifests
make install
make build
export OAUTH2PROXY_IMAGE="quay.io/oauth2-proxy/oauth2-proxy:latest"
make run

Future developments

  • Generate automatically the Ingress resources based on the CRD
  • Allow to use OAuth2proxy as a sidecar by automatically injecting the OAuth2 to new pods with a particular annotation

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the oauth2proxy v1alpha1 API group +kubebuilder:object:generate=true +groupName=oauth2proxy.oauth2proxy-operator.dexter0195.com
Package v1alpha1 contains API Schema definitions for the oauth2proxy v1alpha1 API group +kubebuilder:object:generate=true +groupName=oauth2proxy.oauth2proxy-operator.dexter0195.com
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL