Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
setup: Configure requestheader-client cert for apiserver
Browse files Browse the repository at this point in the history
Fixes habitat-sh#24

Signed-off-by: Indradhanush Gupta <[email protected]>
  • Loading branch information
indradhanush committed Sep 14, 2018
1 parent 48b1ff9 commit a4b5b56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config/svc-kubernetes-apiserver.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ kubelet-certificate-authority = "files/ca.pem"
kubelet-client-certificate = "files/kubernetes.pem"
kubelet-client-key = "files/kubernetes-key.pem"

requestheader-client-ca-file = "files/requestheader-ca.pem"
requestheader-group-headers = "X-Remote-Group"
requestheader-username-headers = "X-Remote-User"

service-account-key-file = "files/ca-key.pem"

tls-ca-file = "files/ca.pem"
Expand Down
5 changes: 5 additions & 0 deletions scripts/generate-ssl-certificates
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,8 @@ EOF
-profile=kubernetes \
- | cfssljson -bare "node-${i}/node"
done


# requestheader CA

cfssl gencert -initca requestheader-csr.json | cfssljson -bare requestheader-ca
2 changes: 1 addition & 1 deletion scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ vagrant ssh node-0 -- sudo chown hab:hab /var/run/kubernetes
vagrant ssh node-0 -- sudo hab svc load core/kubernetes-apiserver --channel "${channel}"

cat <<'EOF' | vagrant ssh node-0 -- bash
for f in /vagrant/certificates/{kubernetes.pem,kubernetes-key.pem,ca.pem,ca-key.pem}; do sudo hab file upload kubernetes-apiserver.default $(date +%s) "${f}"; done
for f in /vagrant/certificates/{kubernetes.pem,kubernetes-key.pem,ca.pem,ca-key.pem,requestheader-ca.pem,requestheader-ca-key.pem}; do sudo hab file upload kubernetes-apiserver.default $(date +%s) "${f}"; done
EOF
vagrant ssh node-0 -- sudo hab config apply kubernetes-apiserver.default $(date +%s) /vagrant/config/svc-kubernetes-apiserver.toml

Expand Down

0 comments on commit a4b5b56

Please sign in to comment.