nuage-master-config-daemonset.j2 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # This ConfigMap is used to configure Nuage VSP configuration on master nodes
  2. kind: ConfigMap
  3. apiVersion: v1
  4. metadata:
  5. name: nuage-master-config
  6. namespace: kube-system
  7. data:
  8. # This will generate the required Nuage configuration
  9. # on master nodes
  10. monitor_yaml_config: |
  11. # .kubeconfig that includes the nuage service account
  12. kubeConfig: {{ nuage_master_crt_dir }}/nuage.kubeconfig
  13. # name of the nuage service account, or another account with 'cluster-reader'
  14. # permissions
  15. # Openshift master config file
  16. masterConfig: /etc/origin/master/master-config.yaml
  17. # URL of the VSD Architect
  18. vsdApiUrl: {{ vsd_api_url }}
  19. # API version to query against. Usually "v3_2"
  20. vspVersion: {{ vsp_version }}
  21. # Name of the enterprise in which pods will reside
  22. enterpriseName: {{ enterprise }}
  23. # Name of the domain in which pods will reside
  24. domainName: {{ domain }}
  25. # VSD generated user certificate file location on master node
  26. userCertificateFile: {{ nuage_master_crt_dir }}/{{ vsd_user }}.pem
  27. # VSD generated user key file location on master node
  28. userKeyFile: {{ nuage_master_crt_dir }}/{{ vsd_user }}-Key.pem
  29. # Location where logs should be saved
  30. log_dir: /var/log/nuage-openshift-monitor
  31. # Monitor rest server parameters
  32. # Logging level for the nuage openshift monitor
  33. # allowed options are: 0 => INFO, 1 => WARNING, 2 => ERROR, 3 => FATAL
  34. logLevel: 0
  35. # Parameters related to the nuage monitor REST server
  36. nuageMonServer:
  37. URL: 0.0.0.0:9443
  38. certificateDirectory: {{ nuage_master_crt_dir }}
  39. # etcd config required for HA
  40. etcdClientConfig:
  41. ca: {{ nuage_master_crt_dir }}/nuageMonCA.crt
  42. certFile: {{ nuage_master_crt_dir }}/nuageMonServer.crt
  43. keyFile: {{ nuage_master_crt_dir }}/master.etcd-client.key
  44. urls:
  45. {% for etcd_url in openshift.master.etcd_urls %}
  46. - {{ etcd_url }}
  47. {% endfor %}
  48. ---
  49. # This manifest installs Nuage master node configuration on
  50. # each Nuage master node in a cluster.
  51. kind: DaemonSet
  52. apiVersion: extensions/v1beta1
  53. metadata:
  54. name: nuage-master-config
  55. namespace: kube-system
  56. labels:
  57. k8s-app: nuage-master-config
  58. spec:
  59. selector:
  60. matchLabels:
  61. k8s-app: nuage-master-config
  62. template:
  63. metadata:
  64. labels:
  65. k8s-app: nuage-master-config
  66. spec:
  67. hostNetwork: true
  68. tolerations:
  69. - key: node-role.kubernetes.io/master
  70. effect: NoSchedule
  71. operator: Exists
  72. nodeSelector:
  73. install-monitor: "true"
  74. containers:
  75. # This container configures Nuage Master node
  76. - name: install-nuage-master-config
  77. image: nuage/master:{{ nuage_monitor_container_image_version }}
  78. ports:
  79. - containerPort: 9443
  80. hostPort: 9443
  81. command: ["/configure-master.sh"]
  82. args: ["ose", "{{ master_host_type }}"]
  83. securityContext:
  84. privileged: true
  85. env:
  86. # nuage-openshift-monitor.yaml config to install on each slave node.
  87. - name: NUAGE_MASTER_VSP_CONFIG
  88. valueFrom:
  89. configMapKeyRef:
  90. name: nuage-master-config
  91. key: monitor_yaml_config
  92. volumeMounts:
  93. - mountPath: /var/log
  94. name: cni-log-dir
  95. - mountPath: {{ nuage_master_config_dsets_mount_dir }}
  96. name: usr-share-dir
  97. - mountPath: /etc/origin/
  98. name: master-config-dir
  99. volumes:
  100. - name: cni-log-dir
  101. hostPath:
  102. path: /var/log
  103. - name: usr-share-dir
  104. hostPath:
  105. path: {{ nuage_master_config_dsets_mount_dir }}
  106. - name: master-config-dir
  107. hostPath:
  108. path: /etc/origin/