Skip to content

Commit

Permalink
salt: Configure the API server to use the OpenID Connect
Browse files Browse the repository at this point in the history
This commit adds the OpenID connect authentication plugin to metalk8s
by integrating with the API server.

This entails deploying an API server with specific flags.
  • Loading branch information
Ebaneck committed Nov 12, 2019
1 parent 60c5f10 commit c9255d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions salt/metalk8s/kubernetes/apiserver/installed.sls
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Create kube-apiserver Pod manifest:
- /etc/kubernetes/pki/front-proxy-client.crt
- /etc/kubernetes/pki/front-proxy-client.key
- /etc/kubernetes/pki/sa.pub
- /etc/kubernetes/pki/dex-ca.crt
- {{ htpasswd_path }}
{%- if pillar.metalk8s.api_server.keepalived.enabled %}
- /etc/keepalived/check-apiserver.sh
Expand Down Expand Up @@ -137,6 +138,11 @@ Create kube-apiserver Pod manifest:
- --service-cluster-ip-range={{ networks.service }}
- --tls-cert-file=/etc/kubernetes/pki/apiserver.crt
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
- --oidc-issuer-url=https://{{ grains.metalk8s.control_plane_ip }}:32000
- --oidc-client-id=dex
- --oidc-ca-file=/etc/kubernetes/pki/dex-ca.crt
- --oidc-username-claim=email
- --oidc-groups-claim=groups
requested_cpu: 250m
volumes:
- path: {{ encryption_k8s_path }}
Expand Down Expand Up @@ -215,6 +221,7 @@ Create kube-apiserver Pod manifest:
- file: Ensure front-proxy CA cert is present
- file: Ensure SA pub key is present
- file: Set up default basic auth htpasswd
- file: Ensure dex CA cert is present
{%- if pillar.metalk8s.api_server.keepalived.enabled %}
- file: Create keepalived check script
- file: Create keepalived configuration file generator
Expand Down

0 comments on commit c9255d9

Please sign in to comment.