controller-deployment.yaml.j2 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # More info about the template: https://docs.openstack.org/kuryr-kubernetes/latest/installation/containerized.html#generating-kuryr-resource-definitions-for-kubernetes
  2. apiVersion: apps/v1beta1
  3. kind: Deployment
  4. metadata:
  5. labels:
  6. name: kuryr-controller
  7. name: kuryr-controller
  8. namespace: {{ kuryr_namespace }}
  9. spec:
  10. replicas: 1
  11. template:
  12. metadata:
  13. labels:
  14. name: kuryr-controller
  15. name: kuryr-controller
  16. spec:
  17. serviceAccountName: kuryr-controller
  18. automountServiceAccountToken: true
  19. hostNetwork: true
  20. containers:
  21. - image: {{ openshift_openstack_kuryr_controller_image }}
  22. imagePullPolicy: IfNotPresent
  23. name: controller
  24. {% if kuryr_openstack_enable_pools | default(false) %}
  25. readinessProbe:
  26. exec:
  27. command:
  28. - cat
  29. - /tmp/pools_loaded
  30. {% endif %}
  31. terminationMessagePath: "/dev/termination-log"
  32. # FIXME(dulek): This shouldn't be required, but without it selinux is
  33. # complaining about access to kuryr.conf.
  34. securityContext:
  35. privileged: true
  36. runAsUser: 0
  37. volumeMounts:
  38. - name: config-volume
  39. mountPath: "/etc/kuryr/kuryr.conf"
  40. subPath: kuryr.conf
  41. volumes:
  42. - name: config-volume
  43. configMap:
  44. name: kuryr-config
  45. defaultMode: 0666
  46. restartPolicy: Always