summaryrefslogtreecommitdiffstats
path: root/roles/kuryr/templates/controller-deployment.yaml.j2
blob: 155d1faab9cf77e8b18563886d19f9816cbc1a55 (plain)
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
# More info about the template: https://docs.openstack.org/kuryr-kubernetes/latest/installation/containerized.html#generating-kuryr-resource-definitions-for-kubernetes

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  labels:
    name: kuryr-controller
  name: kuryr-controller
  namespace: {{ kuryr_namespace }}
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: kuryr-controller
      name: kuryr-controller
    spec:
      serviceAccountName: kuryr-controller
      automountServiceAccountToken: true
      hostNetwork: true
      containers:
      - image: kuryr/controller:latest
        imagePullPolicy: IfNotPresent
        name: controller
{% if kuryr_openstack_enable_pools | default(false) %}
        readinessProbe:
          exec:
            command:
            - cat
            - /tmp/pools_loaded
{% endif %}
        terminationMessagePath: "/dev/termination-log"
        # FIXME(dulek): This shouldn't be required, but without it selinux is
        #               complaining about access to kuryr.conf.
        securityContext:
          privileged: true
          runAsUser: 0
        volumeMounts:
        - name: config-volume
          mountPath: "/etc/kuryr/kuryr.conf"
          subPath: kuryr.conf
      volumes:
      - name: config-volume
        configMap:
          name: kuryr-config
          defaultMode: 0666
      restartPolicy: Always