go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/resources/k8-yaml/vnf-vpp.yaml (about)

     1  ---
     2  apiVersion: v1
     3  kind: ConfigMap
     4  metadata:
     5    name: vnf-vpp-cfg
     6  data:
     7    vpp.conf: |
     8      unix {
     9        nodaemon
    10        cli-listen 0.0.0.0:5002
    11        cli-listen /run/vpp/cli.sock
    12      }
    13      plugins {
    14        plugin dpdk_plugin.so {
    15          disable
    16        }
    17      }
    18  ---
    19  apiVersion: v1
    20  kind: ConfigMap
    21  metadata:
    22    name: vnf-supervisord-cfg
    23  data:
    24    supervisord.conf: |
    25      [supervisord]
    26      logfile=/var/log/supervisord.log
    27      loglevel=debug
    28      nodaemon=true
    29  
    30      [program:vpp]
    31      command=/usr/bin/vpp -c /etc/vpp/vpp.conf
    32      autorestart=false
    33      redirect_stderr=true
    34      priority=1
    35  
    36      [program:agent]
    37      command=/bin/vpp-agent --etcd-config=/opt/vpp-agent/dev/etcd.conf --kafka-config=/opt/vpp-agent/dev/kafka.conf --vpp-plugin-config=/opt/vpp-agent/dev/vpp-plugin.conf --linux-plugin-config=/opt/vpp-agent/dev/linuxplugin.conf
    38      autorestart=false
    39      redirect_stderr=true
    40      priority=2
    41  
    42      ; This event listener waits for event of vpp or agent  exiting. Once received, it kills supervisord process and this makes
    43      ; subsequently the exit of docker container. You should also set agent's autorestart=false.
    44      [eventlistener:vpp_or_agent_not_running]
    45      command=/usr/bin/supervisord_kill.py
    46      events=PROCESS_STATE_EXITED
    47  ---
    48  apiVersion: apps/v1beta1
    49  kind: StatefulSet
    50  metadata:
    51    name: vnf-vpp
    52    labels:
    53      app: vnf-vpp
    54  spec:
    55    selector:
    56      matchLabels:
    57        app: vnf-vpp
    58    serviceName: "vnf-service"
    59    replicas: 3
    60    template:
    61      metadata:
    62        labels:
    63          app: vnf-vpp
    64      spec:
    65        restartPolicy: Always
    66        hostNetwork: false
    67        terminationGracePeriodSeconds: 3
    68        containers:
    69          - name: "vnf"
    70            image: ligato/vpp-agent:pantheon-dev
    71            imagePullPolicy: IfNotPresent
    72            securityContext:
    73              privileged: true
    74            ports:
    75              - containerPort: 5002
    76              - containerPort: 9191
    77            readinessProbe:
    78              httpGet:
    79                path: /readiness
    80                port: 9191
    81              periodSeconds: 1
    82            livenessProbe:
    83              httpGet:
    84                path: /liveness
    85                port: 9191
    86              periodSeconds: 1
    87              initialDelaySeconds: 15
    88            env:
    89              - name: MICROSERVICE_LABEL
    90                valueFrom:
    91                  fieldRef:
    92                    fieldPath: metadata.name
    93              - name: DP_STATUS_PUBLISHERS
    94                value: etcd
    95            volumeMounts:
    96              - name: supervisor-config
    97                mountPath: /etc/supervisord
    98              - name: vpp-config
    99                mountPath: /etc/vpp
   100              - name: agent-config
   101                mountPath: /opt/vpp-agent/dev
   102              - name: memif-sockets
   103                mountPath: /tmp
   104        volumes:
   105          - name: vpp-config
   106            configMap:
   107              name: vnf-vpp-cfg
   108          - name: agent-config
   109            configMap:
   110              name: vswitch-k8-agent-cfg
   111          - name: memif-sockets
   112            hostPath:
   113              path: /tmp
   114          - name: supervisor-config
   115            configMap:
   116              name: vnf-supervisord-cfg