-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathose-nuage-master-config-daemonset.yaml
executable file
·125 lines (122 loc) · 3.97 KB
/
ose-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
# 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/nuage-openshift-monitor/nuage.kubeconfig
masterConfig: /etc/origin/master/master-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: OpenShift
# Name of the domain in which pods will reside
domainName: OpenShift-domain
# VSD generated user certificate file location on master node
userCertificateFile: /usr/share/nuage-openshift-monitor/ose-admin.pem
# VSD generated user key file location on master node
userKeyFile: /usr/share/nuage-openshift-monitor/ose-admin-Key.pem
# Location where logs should be saved
log_dir: /var/log/nuage-openshift-monitor
# 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/origin/master/
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 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: ["ose", "is_rhel_server"]
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/origin/
name: master-config-dir
volumes:
- name: cni-log-dir
hostPath:
path: /var/log
- name: usr-share-dir
hostPath:
path: /usr/share
- name: master-config-dir
hostPath:
path: /etc/origin/