8000 update to kubernetes v1.10.3 · Lawrence-git/salt-kubernetes@6af298d · GitHub
[go: up one dir, main page]

Skip to content

Commit 6af298d

Browse files
author
root
committed
update to kubernetes v1.10.3
1 parent 24352fb commit 6af298d

22 files changed

+202
-17
lines changed

pillar/k8s.sls

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
# -*- coding: utf-8 -*-
2+
#********************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: Kubernetes Config with Pillar
7+
#********************************************
8+
19
#设置Master的IP地址(必须修改)
2-
MASTER_IP: "192.168.56.20"
10+
MASTER_IP: "192.168.56.11"
311

412
#设置ETCD集群访问地址(必须修改)
5-
ETCD_ENDPOINTS: "https://192.168.56.20:2379,https://192.168.56.21:2379,https://192.168.56.22:2379"
13+
ETCD_ENDPOINTS: "https://192.168.56.11:2379,https://192.168.56.12:2379,https://192.168.56.13:2379"
614

715
#设置ETCD集群初始化列表(必须修改)
8-
ETCD_CLUSTER: "etcd-node1=https://192.168.56.20:2380,etcd-node2=https://192.168.56.21:2380,etcd-node3=https://192.168.56.22:2380"
16+
ETCD_CLUSTER: "etcd-node1=https://192.168.56.11:2380,etcd-node2=https://192.168.56.12:2380,etcd-node3=https://192.168.56.13:2380"
917

1018
#通过Grains FQDN自动获取本机IP地址,请注意保证主机名解析到本机IP地址
1119
NODE_IP: {{ grains['fqdn_ip4'][0] }}

pillar/top.sls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: Pillar Top File
7+
#******************************************
8+
19
base:
210
'*':
311
- k8s

salt/k8s/etcd.sls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: ETCD Cluster
7+
#******************************************
18
include:
29
- k8s.modules.etcd

salt/k8s/flannel.sls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: Install Docker and Flannel
7+
#******************************************
18
include:
29
- k8s.modules.docker
310
- k8s.modules.flannel

salt/k8s/master.sls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: Kubernetes Master
7+
#******************************************
18
include:
29
- k8s.modules.ca-file
310
- k8s.modules.cfssl

salt/k8s/modules/api-server.sls

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: Kubernetes API Server
7+
#******************************************
8+
9+
{% set k8s_version = "k8s-v1.10.3" %}
10+
111
kubernetes-csr-json:
212
file.managed:
313
- name: /opt/kubernetes/ssl/kubernetes-csr.json
@@ -35,7 +45,7 @@ basic-auth:
3545
kube-apiserver-bin:
3646
file.managed:
3747
- name: /opt/kubernetes/bin/kube-apiserver
38-
- source: salt://k8s/files/k8s-v1.9.3/bin/kube-apiserver
48+
- source: salt://k8s/files/{{ k8s_version }}/bin/kube-apiserver
3949
- user: root
4050
- group: root
4151
- mode: 755

salt/k8s/modules/base-dir.sls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: Base Env
7+
#******************************************
8+
19
kubernetes-dir:
210
file.directory:
311
- name: /opt/kubernetes

salt/k8s/modules/ca-file.sls

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: Ca File
7+
#******************************************
8+
19
include:
210
- k8s.modules.base-dir
311

salt/k8s/modules/cfssl.sls

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: CfSSL Tools
7+
#******************************************
8+
{% set cfssl_version = "cfssl-1.2" %}
9+
110
include:
211
- k8s.modules.base-dir
312

413
cfssl-certinfo:
514
file.managed:
615
- name: /opt/kubernetes/bin/cfssl-certinfo
7-
- source: salt://k8s/files/cfssl-1.2/cfssl-certinfo_linux-amd64
16+
- source: salt://k8s/files/{{ cfssl_version }}/cfssl-certinfo_linux-amd64
817
- user: root
918
- group: root
1019
- mode: 755
1120

1221
cfssl-json:
1322
file.managed:
1423
- name: /opt/kubernetes/bin/cfssljson
15-
- source: salt://k8s/files/cfssl-1.2/cfssljson_linux-amd64
24+
- source: salt://k8s/files/{{ cfssl_version }}/cfssljson_linux-amd64
1625
- user: root
1726
- group: root
1827
- mode: 755
1928

2029
cfssl:
2130
file.managed:
2231
- name: /opt/kubernetes/bin/cfssl
23-
- source: salt://k8s/files/cfssl-1.2/cfssl_linux-amd64
32+
- source: salt://k8s/files/{{ cfssl_version }}/cfssl_linux-amd64
2433
- user: root
2534
- group: root
2635
- mode: 755

salt/k8s/modules/cni.sls

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# -*- coding: utf-8 -*-
2+
#******************************************
3+
# Author: Jason Zhao
4+
# Email: shundong.zhao@linuxhot.com
5+
# Organization: http://www.devopsedu.com/
6+
# Description: CNI For Kubernetes
7+
#******************************************
8+
{% set cni_version = "cni-plugins-amd64-v0.7.0" %}
9+
110
cni-dir:
211
file.directory:
312
- name: /etc/cni
@@ -20,7 +29,7 @@ cni-default-conf:
2029
cni-bin:
2130
file.recurse:
2231
- name: /opt/kubernetes/bin/cni
23-
- source: salt://k8s/files/cni-plugins-amd64-v0.7.0/
32+
- source: salt://k8s/files/{{ cni_version }}/
2433
- user: root
2534
- group: root
2635
- file_mode: 755

0 commit comments

Comments
 (0)
0