Skip to content

Commit 35ae54a

Browse files
committed
fix lord container keepip error
1 parent e4b3773 commit 35ae54a

File tree

8,333 files changed

+2564900
-2564907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,333 files changed

+2564900
-2564907
lines changed

createpool.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/bin/bash
2-
3-
alias etcdcalico3='ETCDCTL_API=3 etcdctl --endpoints="http://10.96.232.136:6666"'
4-
5-
etcdcalico3 put /calico/resources/v3/projectcalico.org/ippools/test '{"kind":"IPPool","apiVersion":"projectcalico.org/v3","metadata":{"name":"172.16.30_100-200","uid":"f571f014-e62c-11e8-afc6-000c2973c256","creationTimestamp":"2018-11-12T03:42:20Z"},"spec":{"cidr":"172.16.30.131/26","ipipMode":"Never","natOutgoing":true}}'
1+
#!/bin/bash
2+
3+
alias etcdcalico3='ETCDCTL_API=3 etcdctl --endpoints="http://10.96.232.136:6666"'
4+
5+
etcdcalico3 put /calico/resources/v3/projectcalico.org/ippools/test '{"kind":"IPPool","apiVersion":"projectcalico.org/v3","metadata":{"name":"172.16.30_100-200","uid":"f571f014-e62c-11e8-afc6-000c2973c256","creationTimestamp":"2018-11-12T03:42:20Z"},"spec":{"cidr":"172.16.30.131/26","ipipMode":"Never","natOutgoing":true}}'

deploy/install-cni/Dockerfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM amd64/alpine:3.8
2-
3-
LABEL maintainer "ZhangKun <[email protected]>"
4-
5-
COPY bin /opt/cni/bin/
6-
ADD install-cni.sh /install-cni.sh
7-
ADD grid.conf.tmp /grid.conf.tmp
8-
1+
FROM amd64/alpine:3.8
2+
3+
LABEL maintainer "ZhangKun <[email protected]>"
4+
5+
COPY bin /opt/cni/bin/
6+
ADD install-cni.sh /install-cni.sh
7+
ADD grid.conf.tmp /grid.conf.tmp
8+

deploy/install-cni/bin/grid

-711 KB
Binary file not shown.

deploy/install-cni/cniv3/create.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
2-
kubectl create ns cni
3-
kubectl -n cni create secret generic etcd-certs --from-file=/etc/kubernetes/pki/etcd/server.crt --from-file=/etc/kubernetes/pki/etcd/server.key --from-file=/etc/kubernetes/pki/etcd/ca.crt
1+
#!/bin/bash
2+
kubectl create ns cni
3+
kubectl -n cni create secret generic etcd-certs --from-file=/etc/kubernetes/pki/etcd/server.crt --from-file=/etc/kubernetes/pki/etcd/server.key --from-file=/etc/kubernetes/pki/etcd/ca.crt

deploy/install-cni/cniv3/grid.yaml

+139-139
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,139 @@
1-
# Calico Version v3.2.3
2-
# https://docs.projectcalico.org/v3.2/releases#v3.2.3
3-
# This manifest includes the following component versions:
4-
# calico/node:v3.2.3
5-
# calico/cni:v3.2.3
6-
# calico/kube-controllers:v3.2.3
7-
8-
# This ConfigMap is used to configure a self-hosted Calico installation.
9-
kind: ConfigMap
10-
apiVersion: v1
11-
metadata:
12-
name: grid-config
13-
namespace: cni
14-
data:
15-
# Configure this with the location of your etcd cluster.
16-
etcd_endpoints: "https://172.16.30.100:2379"
17-
# Configure the MTU to use
18-
log_level: "debug"
19-
veth_mtu: "1500"
20-
21-
---
22-
23-
# This manifest installs the calico/node container, as well
24-
# as the Calico CNI plugins and network config on
25-
# each master and worker node in a Kubernetes cluster.
26-
kind: DaemonSet
27-
apiVersion: extensions/v1beta1
28-
metadata:
29-
name: install-cni
30-
namespace: cni
31-
spec:
32-
updateStrategy:
33-
type: RollingUpdate
34-
rollingUpdate:
35-
maxUnavailable: 1
36-
template:
37-
metadata:
38-
labels:
39-
k8s-app: install-cni
40-
annotations:
41-
# This, along with the CriticalAddonsOnly toleration below,
42-
# marks the pod as a critical add-on, ensuring it gets
43-
# priority scheduling and that its resources are reserved
44-
# if it ever gets evicted.
45-
scheduler.alpha.kubernetes.io/critical-pod: ''
46-
spec:
47-
hostNetwork: true
48-
nodeSelector:
49-
beta.kubernetes.io/arch: amd64
50-
tolerations:
51-
- operator: Exists
52-
effect: NoSchedule
53-
serviceAccountName: grid-cni-plugin
54-
containers:
55-
# This container installs the Calico CNI binaries
56-
# and CNI network config file on each node.
57-
- name: install-cni
58-
image: socp.io/library/install-cni:v3
59-
command: ["/install-cni.sh"]
60-
env:
61-
# Name of the CNI config file to create.
62-
- name: CNI_CONF_NAME
63-
value: "10-grid.conflist"
64-
# The location of the Calico etcd cluster.
65-
- name: ETCD_ENDPOINTS
66-
valueFrom:
67-
configMapKeyRef:
68-
name: grid-config
69-
key: etcd_endpoints
70-
# CNI MTU Config variable
71-
- name: CNI_MTU
72-
valueFrom:
73-
configMapKeyRef:
74-
name: grid-config
75-
key: veth_mtu
76-
- name: LOG_LEVEL
77-
valueFrom:
78-
configMapKeyRef:
79-
name: grid-config
80-
key: log_level
81-
volumeMounts:
82-
- mountPath: /host/opt/cni/bin
83-
name: cni-bin-dir
84-
- mountPath: /host/etc/cni/net.d
85-
name: cni-net-dir
86-
- mountPath: /grid-secrets
87-
name: etcd-certs
88-
- mountPath: /var/lib/grid
89-
name: grid
90-
securityContext:
91-
privileged: true
92-
volumes:
93-
# Used to install CNI.
94-
- name: cni-bin-dir
95-
hostPath:
96-
path: /opt/cni/bin
97-
- name: cni-net-dir
98-
hostPath:
99-
path: /etc/cni/net.d
100-
- name: grid
101-
hostPath:
102-
path: /var/lib/grid
103-
# Mount in the etcd TLS secrets with mode 400.
104-
# See https://kubernetes.io/docs/concepts/configuration/secret/
105-
- name: etcd-certs
106-
secret:
107-
secretName: etcd-certs
108-
defaultMode: 0400
109-
---
110-
apiVersion: rbac.authorization.k8s.io/v1beta1
111-
kind: ClusterRoleBinding
112-
metadata:
113-
name: grid-cni-plugin
114-
roleRef:
115-
apiGroup: rbac.authorization.k8s.io
116-
kind: ClusterRole
117-
name: grid-cni-plugin
118-
subjects:
119-
- kind: ServiceAccount
120-
name: grid-cni-plugin
121-
namespace: cni
122-
123-
---
124-
kind: ClusterRole
125-
apiVersion: rbac.authorization.k8s.io/v1beta1
126-
metadata:
127-
name: grid-cni-plugin
128-
rules:
129-
- apiGroups: ["*"]
130-
resources: ["*"]
131-
verbs:
132-
- get
133-
---
134-
apiVersion: v1
135-
kind: ServiceAccount
136-
metadata:
137-
name: grid-cni-plugin
138-
namespace: cni
139-
1+
# Calico Version v3.2.3
2+
# https://docs.projectcalico.org/v3.2/releases#v3.2.3
3+
# This manifest includes the following component versions:
4+
# calico/node:v3.2.3
5+
# calico/cni:v3.2.3
6+
# calico/kube-controllers:v3.2.3
7+
8+
# This ConfigMap is used to configure a self-hosted Calico installation.
9+
kind: ConfigMap
10+
apiVersion: v1
11+
metadata:
12+
name: grid-config
13+
namespace: cni
14+
data:
15+
# Configure this with the location of your etcd cluster.
16+
etcd_endpoints: "https://172.16.30.100:2379"
17+
# Configure the MTU to use
18+
log_level: "debug"
19+
veth_mtu: "1500"
20+
21+
---
22+
23+
# This manifest installs the calico/node container, as well
24+
# as the Calico CNI plugins and network config on
25+
# each master and worker node in a Kubernetes cluster.
26+
kind: DaemonSet
27+
apiVersion: extensions/v1beta1
28+
metadata:
29+
name: install-cni
30+
namespace: cni
31+
spec:
32+
updateStrategy:
33+
type: RollingUpdate
34+
rollingUpdate:
35+
maxUnavailable: 1
36+
template:
37+
metadata:
38+
labels:
39+
k8s-app: install-cni
40+
annotations:
41+
# This, along with the CriticalAddonsOnly toleration below,
42+
# marks the pod as a critical add-on, ensuring it gets
43+
# priority scheduling and that its resources are reserved
44+
# if it ever gets evicted.
45+
scheduler.alpha.kubernetes.io/critical-pod: ''
46+
spec:
47+
hostNetwork: true
48+
nodeSelector:
49+
beta.kubernetes.io/arch: amd64
50+
tolerations:
51+
- operator: Exists
52+
effect: NoSchedule
53+
serviceAccountName: grid-cni-plugin
54+
containers:
55+
# This container installs the Calico CNI binaries
56+
# and CNI network config file on each node.
57+
- name: install-cni
58+
image: socp.io/library/install-cni:v3
59+
command: ["/install-cni.sh"]
60+
env:
61+
# Name of the CNI config file to create.
62+
- name: CNI_CONF_NAME
63+
value: "10-grid.conflist"
64+
# The location of the Calico etcd cluster.
65+
- name: ETCD_ENDPOINTS
66+
valueFrom:
67+
configMapKeyRef:
68+
name: grid-config
69+
key: etcd_endpoints
70+
# CNI MTU Config variable
71+
- name: CNI_MTU
72+
valueFrom:
73+
configMapKeyRef:
74+
name: grid-config
75+
key: veth_mtu
76+
- name: LOG_LEVEL
77+
valueFrom:
78+
configMapKeyRef:
79+
name: grid-config
80+
key: log_level
81+
volumeMounts:
82+
- mountPath: /host/opt/cni/bin
83+
name: cni-bin-dir
84+
- mountPath: /host/etc/cni/net.d
85+
name: cni-net-dir
86+
- mountPath: /grid-secrets
87+
name: etcd-certs
88+
- mountPath: /var/lib/grid
89+
name: grid
90+
securityContext:
91+
privileged: true
92+
volumes:
93+
# Used to install CNI.
94+
- name: cni-bin-dir
95+
hostPath:
96+
path: /opt/cni/bin
97+
- name: cni-net-dir
98+
hostPath:
99+
path: /etc/cni/net.d
100+
- name: grid
101+
hostPath:
102+
path: /var/lib/grid
103+
# Mount in the etcd TLS secrets with mode 400.
104+
# See https://kubernetes.io/docs/concepts/configuration/secret/
105+
- name: etcd-certs
106+
secret:
107+
secretName: etcd-certs
108+
defaultMode: 0400
109+
---
110+
apiVersion: rbac.authorization.k8s.io/v1beta1
111+
kind: ClusterRoleBinding
112+
metadata:
113+
name: grid-cni-plugin
114+
roleRef:
115+
apiGroup: rbac.authorization.k8s.io
116+
kind: ClusterRole
117+
name: grid-cni-plugin
118+
subjects:
119+
- kind: ServiceAccount
120+
name: grid-cni-plugin
121+
namespace: cni
122+
123+
---
124+
kind: ClusterRole
125+
apiVersion: rbac.authorization.k8s.io/v1beta1
126+
metadata:
127+
name: grid-cni-plugin
128+
rules:
129+
- apiGroups: ["*"]
130+
resources: ["*"]
131+
verbs:
132+
- get
133+
---
134+
apiVersion: v1
135+
kind: ServiceAccount
136+
metadata:
137+
name: grid-cni-plugin
138+
namespace: cni
139+

0 commit comments

Comments
 (0)