Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.

Commit e42add7

Browse files
committed
Add support for K8s v1.9 and add certificates controller.
1 parent c7c4043 commit e42add7

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

instances/k8smaster/cloud_init/bootstrap.template.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ write_files:
100100
encoding: "gzip+base64"
101101
content: |
102102
${ca-pem-content}
103+
- path: "/etc/kubernetes/ssl/ca-key.pem"
104+
permissions: "0600"
105+
encoding: "gzip+base64"
106+
content: |
107+
${ca-key-content}
103108
- path: "/etc/kubernetes/ssl/apiserver.pem"
104109
permissions: "0600"
105110
encoding: "gzip+base64"

instances/k8smaster/datasources.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ data "template_file" "kube_master_cloud_init_file" {
141141
kube_scheduler_template_content = "${base64gzip(data.template_file.kube-scheduler.rendered)}"
142142
kubelet_service_content = "${base64gzip(data.template_file.kubelet-service.rendered)}"
143143
ca-pem-content = "${base64gzip(var.root_ca_pem)}"
144+
ca-key-content = "${base64gzip(var.root_ca_key)}"
144145
api-server-key-content = "${base64gzip(var.api_server_private_key_pem)}"
145146
api-server-cert-content = "${base64gzip(var.api_server_cert_pem)}"
146147
api-token_auth_template_content = "${base64gzip(data.template_file.token_auth_file.rendered)}"

instances/k8smaster/manifests/kube-controller-manager.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ spec:
1717
- --leader-elect=true
1818
- --service-account-private-key-file=/etc/kubernetes/ssl/apiserver-key.pem
1919
- --root-ca-file=/etc/kubernetes/ssl/ca.pem
20+
- --cluster-signing-cert-file=/etc/kubernetes/ssl/ca.pem
21+
- --cluster-signing-key-file=/etc/kubernetes/ssl/ca-key.pem
2022
- --v=2
2123
livenessProbe:
2224
httpGet:

instances/k8smaster/manifests/kubernetes-dashboard.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,13 @@ spec:
4646
- containerPort: 9090
4747
protocol: TCP
4848
args:
49-
# Uncomment the following line to manually specify Kubernetes API server Host
50-
# If not specified, Dashboard will attempt to auto discover the API server and connect
51-
# to it. Uncomment only if the default does not work.
52-
# - --apiserver-host=http://my-address:port
5349
livenessProbe:
5450
httpGet:
5551
path: /
5652
port: 9090
5753
initialDelaySeconds: 30
5854
timeoutSeconds: 30
5955
serviceAccountName: kubernetes-dashboard
60-
# Comment the following tolerations if Dashboard must not be deployed on master
6156
tolerations:
6257
- key: node-role.kubernetes.io/master
6358
effect: NoSchedule

instances/k8smaster/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ variable "k8s_dns_ver" {
6464
variable "api_server_count" {}
6565

6666
variable "root_ca_pem" {}
67+
variable "root_ca_key" {}
6768
variable "api_server_private_key_pem" {}
6869
variable "api_server_cert_pem" {}
6970
variable "k8s_apiserver_token_admin" {}

k8s-oci.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ module "instances-k8smaster-ad1" {
221221
k8s_ver = "${var.k8s_ver}"
222222
label_prefix = "${var.label_prefix}"
223223
root_ca_pem = "${module.k8s-tls.root_ca_pem}"
224+
root_ca_key = "${module.k8s-tls.root_ca_key}"
224225
shape = "${var.k8sMasterShape}"
225226
ssh_private_key = "${module.k8s-tls.ssh_private_key}"
226227
ssh_public_key_openssh = "${module.k8s-tls.ssh_public_key_openssh}"
@@ -263,6 +264,7 @@ module "instances-k8smaster-ad2" {
263264
k8s_ver = "${var.k8s_ver}"
264265
label_prefix = "${var.label_prefix}"
265266
root_ca_pem = "${module.k8s-tls.root_ca_pem}"
267+
root_ca_key = "${module.k8s-tls.root_ca_key}"
266268
shape = "${var.k8sMasterShape}"
267269
ssh_private_key = "${module.k8s-tls.ssh_private_key}"
268270
ssh_public_key_openssh = "${module.k8s-tls.ssh_public_key_openssh}"
@@ -305,6 +307,7 @@ module "instances-k8smaster-ad3" {
305307
k8s_ver = "${var.k8s_ver}"
306308
label_prefix = "${var.label_prefix}"
307309
root_ca_pem = "${module.k8s-tls.root_ca_pem}"
310+
root_ca_key = "${module.k8s-tls.root_ca_key}"
308311
shape = "${var.k8sMasterShape}"
309312
ssh_private_key = "${module.k8s-tls.ssh_private_key}"
310313
ssh_public_key_openssh = "${module.k8s-tls.ssh_public_key_openssh}"

0 commit comments

Comments
 (0)