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

[kops]: add aws-iam-authenticator support #282

Merged
merged 4 commits into from
Sep 24, 2018
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion rootfs/templates/kops/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,28 @@ spec:
api:
loadBalancer:
type: Public
{{- if bool (getenv "KOPS_AUTHORIZATION_RBAC_ENABLED" "false") }}
hooks:
{{- if bool (getenv "KOPS_AWS_IAM_AUTHENTICATOR_ENABLED" "false") }}
- name: kops-hook-authenticator-config.service
before:
- kubelet.service
roles:
- Master
manifest: |-
[Unit]
Description=Download AWS Authenticator configs from S3
[Service]
Type=oneshot
ExecStart=/bin/mkdir -p /srv/kubernetes/aws-iam-authenticator
ExecStart=/usr/local/bin/aws s3 cp --recursive {{ getenv "KOPS_STATE_STORE" }}/{{ getenv "KOPS_CLUSTER_NAME" }}/addons/authenticator /srv/kubernetes/aws-iam-authenticator/
{{- end }}
kubeAPIServer:
{{- if bool (getenv "KOPS_AUTHORIZATION_RBAC_ENABLED" "false") }}
authorizationMode: {{ getenv "KOPS_KUBE_API_SERVER_AUTHORIZATION_MODE" "RBAC,AlwaysAllow" }}
authorizationRbacSuperUser: {{ getenv "KOPS_KUBE_API_SERVER_AUTHORIZATION_RBAC_SUPER_USER" "admin" }}
{{- if bool (getenv "KOPS_AWS_IAM_AUTHENTICATOR_ENABLED" "false") }}
authenticationTokenWebhookConfigFile: /srv/kubernetes/aws-iam-authenticator/kubeconfig.yaml
{{- end }}
{{- end }}
authorization:
{{- if bool (getenv "KOPS_AUTHORIZATION_RBAC_ENABLED" "false") }}
Expand Down