Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce code duplication for IAP config #24

Open
JoepdeJong opened this issue Aug 12, 2023 · 1 comment
Open

Reduce code duplication for IAP config #24

JoepdeJong opened this issue Aug 12, 2023 · 1 comment

Comments

@JoepdeJong
Copy link
Contributor

JoepdeJong commented Aug 12, 2023

Currently, the following config is needed to setup a page behind IAP:

---
apiVersion: networking.gke.io/v1
kind: GCPBackendPolicy
metadata:
  name: dienst2-backend-policy
  namespace: default
spec:
  default:
    iap:
      enabled: true
      oauth2ClientSecret:
        name: iap-secret
      clientID: 966138216790-us6sue108a879v3vk2om9inn3ftpobkg.apps.googleusercontent.com
  targetRef:
    group: ""
    kind: Service
    name: dienst2
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: dienst2-route
  namespace: default
spec:
  parentRefs:
  - kind: Gateway
    name: gateway
  hostnames:
  - dienst2.wisv.ch
  rules:
  - backendRefs:
    - name: dienst2
      port: 80
---
apiVersion: v1
kind: Service
metadata:
  name: dienst2
  namespace: default
spec:
  ports:
  - name: http
    protocol: TCP
    port: 80
    targetPort: 8000
  selector:
    run: dienst2
  type: ClusterIP
---
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
  namespace: default
  name: dienst2
spec:
  default:
    config:
      type: HTTP
      httpHealthCheck:
        port: 8000
        requestPath: /healthz
    logConfig:
      enabled: true
  targetRef:
    group: ""
    kind: Service
    name: dienst2

Maybe we can make a default template for this?

@JoepdeJong
Copy link
Contributor Author

IAP Chart? @julian9499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant