api_server.j2 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. apiVersion: extensions/v1beta1
  2. kind: DaemonSet
  3. metadata:
  4. labels:
  5. app: apiserver
  6. name: apiserver
  7. spec:
  8. selector:
  9. matchLabels:
  10. app: apiserver
  11. updateStrategy:
  12. rollingUpdate:
  13. maxUnavailable: 1
  14. type: RollingUpdate
  15. template:
  16. metadata:
  17. labels:
  18. app: apiserver
  19. spec:
  20. serviceAccountName: service-catalog-apiserver
  21. nodeSelector:
  22. {% for key, value in node_selector.iteritems() %}
  23. {{key}}: "{{value}}"
  24. {% endfor %}
  25. containers:
  26. - args:
  27. - --storage-type
  28. - etcd
  29. - --secure-port
  30. - "6443"
  31. - --etcd-servers
  32. # TODO: come back and get openshift.common.hostname to work
  33. - https://{{ openshift.common.ip }}:{{ openshift.master.etcd_port }}
  34. - --etcd-cafile
  35. - /etc/origin/master/master.etcd-ca.crt
  36. - --etcd-certfile
  37. - /etc/origin/master/master.etcd-client.crt
  38. - --etcd-keyfile
  39. - /etc/origin/master/master.etcd-client.key
  40. - -v
  41. - "10"
  42. - --cors-allowed-origins
  43. - {{ cors_allowed_origin }}
  44. - --admission-control
  45. - "KubernetesNamespaceLifecycle"
  46. image: {{ openshift_service_catalog_image_prefix }}service-catalog:{{ openshift_service_catalog_image_version }}
  47. command: ["/usr/bin/apiserver"]
  48. imagePullPolicy: Always
  49. name: apiserver
  50. ports:
  51. - containerPort: 6443
  52. protocol: TCP
  53. resources: {}
  54. terminationMessagePath: /dev/termination-log
  55. volumeMounts:
  56. - mountPath: /var/run/kubernetes-service-catalog
  57. name: apiserver-ssl
  58. readOnly: true
  59. - mountPath: /etc/origin/master
  60. name: etcd-host-cert
  61. readOnly: true
  62. dnsPolicy: ClusterFirst
  63. restartPolicy: Always
  64. securityContext: {}
  65. terminationGracePeriodSeconds: 30
  66. volumes:
  67. - name: apiserver-ssl
  68. secret:
  69. defaultMode: 420
  70. secretName: apiserver-ssl
  71. items:
  72. - key: tls.crt
  73. path: apiserver.crt
  74. - key: tls.key
  75. path: apiserver.key
  76. - hostPath:
  77. path: /etc/origin/master
  78. name: etcd-host-cert
  79. - emptyDir: {}
  80. name: data-dir