forked from nuagenetworks/nuage-cni
-
Notifications
You must be signed in to change notification settings - Fork 1
/
k8s-nuage-master-config-daemonset.yaml
executable file
·133 lines (129 loc) · 4.15 KB
/
k8s-nuage-master-config-daemonset.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# This ConfigMap is used to configure Nuage VSP configuration on master nodes
kind: ConfigMap
apiVersion: v1
metadata:
name: nuage-master-config
namespace: kube-system
data:
# This will generate the required Nuage monitor configuration
# on master nodes
monitor_yaml_config: |
kubeConfig: /usr/share/vsp-k8s/nuage.kubeconfig
masterConfig: /usr/share/nuagekubemon/net-config.yaml
# URL of the VSD Architect
vsdApiUrl: https://xmpp.example.com:7443
# API version to query against
vspVersion: v5_0
# Name of the enterprise in which pods will reside
enterpriseName: kubernetes
# Name of the domain in which pods will reside
domainName: kubernetes
# VSD generated user certificate file location on master node
userCertificateFile: /etc/kubernetes/pki/k8s-admin.pem
# VSD generated user key file location on master node
userKeyFile: /etc/kubernetes/pki/k8s-admin-Key.pem
# Location where logs should be saved
log_dir: /var/log/nuagekubemon
# Monitor rest server paramters
# Logging level for the nuage monitor
# allowed options are: 0 => INFO, 1 => WARNING, 2 => ERROR, 3 => FATAL
logLevel: 0
# Parameters related to the nuage monitor REST server
nuageMonServer:
URL: 0.0.0.0:9443
certificateDirectory: /etc/kubernetes/pki
clientCA: ""
serverCertificate: ""
serverKey: ""
# etcd config required for HA
etcdClientConfig:
ca: ""
certFile: ""
keyFile: ""
urls:
- http://127.0.0.1:2379
# auto scale subnets feature
# 0 => disabled(default)
# 1 => enabled
autoScaleSubnets: 0
# This will generate the required Nuage network configuration
# on master nodes
net_yaml_config: |
networkConfig:
clusterNetworkCIDR: 70.70.0.0/16
serviceNetworkCIDR: 192.168.0.0/16
hostSubnetLength: 8
---
# This manifest installs Nuage master node configuration on
# each Nuage master node in a cluster.
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: nuage-master-monitor-ds
namespace: kube-system
labels:
k8s-app: nuage-master-monitor-ds
spec:
selector:
matchLabels:
k8s-app: nuage-master-monitor-ds
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
k8s-app: nuage-master-monitor-ds
spec:
hostNetwork: true
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
operator: Exists
nodeSelector:
install-monitor: "true"
containers:
# This container configures Nuage Master node
- name: install-nuage-master-config
image: nuage/master:v5.1.2
ports:
- containerPort: 9443
hostPort: 9443
command: ["/configure-master.sh"]
args: ["k8s"]
securityContext:
privileged: true
env:
# Set the hostname based on the k8s node name.
- name: KUBERNETES_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
# nuagekubemon.yaml config to install on each master node.
- name: NUAGE_MASTER_VSP_CONFIG
valueFrom:
configMapKeyRef:
name: nuage-master-config
key: monitor_yaml_config
# net-config.yaml config to install on each master node.
- name: NUAGE_MASTER_NETWORK_CONFIG
valueFrom:
configMapKeyRef:
name: nuage-master-config
key: net_yaml_config
volumeMounts:
- mountPath: /var/log
name: cni-log-dir
- mountPath: /usr/share
name: usr-share-dir
- mountPath: /etc/kubernetes/pki/
name: kubernetes-cert-dir
volumes:
- name: cni-log-dir
hostPath:
path: /var/log
- name: usr-share-dir
hostPath:
path: /usr/share
- name: kubernetes-cert-dir
hostPath:
path: /etc/kubernetes/pki/