Skip to content
Snippets Groups Projects
deployment.yaml 7.48 KiB
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Chart.Name }}
  labels:
    {{- include "oai-gnb-cu-up.labels" . | nindent 4 }}
spec:
  replicas: 1
  selector:
    matchLabels:
      {{- include "oai-gnb-cu-up.selectorLabels" . | nindent 6 }}
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        {{- include "oai-gnb-cu-up.selectorLabels" . | nindent 8 }}
        app: oai-gnb-cu-up
    {{- if .Values.multus.e1Interface.create }}
      annotations:
        k8s.v1.cni.cncf.io/networks: >-
          [{
                 "name": "{{ .Chart.Name }}-{{ .Values.multus.e1Interface.name }}",
                 "interface": "{{ .Values.multus.e1Interface.name }}"
                {{- if .Values.multus.e1Interface.mac }}
                 ,"mac":  "{{ .Values.multus.e1Interface.mac }}"
                {{- end }}
                {{- if .Values.multus.defaultGateway }}
                 ,"default-route": ["{{ .Values.multus.defaultGateway }}"]
                {{- end }}
                {{- if .Values.multus.e1Interface.gateway }}
                ,"gateway": "{{ .Values.multus.e1Interface.gateway }}"
                {{- end }}
          }
          {{- if .Values.multus.n3Interface.create }}
          ,{
                 "name": "{{ .Chart.Name }}-{{ .Values.multus.n3Interface.name }}",
                 "interface": "{{ .Values.multus.n3Interface.name }}"
                {{- if .Values.multus.n3Interface.mac }}
                 ,"mac":  "{{ .Values.multus.n3Interface.mac }}"
                {{- end }}
                {{- if .Values.multus.n3Interface.gateway }}
                ,"gateway": "{{ .Values.multus.n3Interface.gateway }}"
                {{- end }}
          }
          {{- end }}
          {{- if .Values.multus.f1uInterface.create }}
          ,{
                 "name": "{{ .Chart.Name }}-{{ .Values.multus.f1uInterface.name }}",
                 "interface": "{{ .Values.multus.f1uInterface.name }}"
                {{- if .Values.multus.f1uInterface.mac }}
                 ,"mac":  "{{ .Values.multus.f1uInterface.mac }}"
                {{- end }}
                {{- if .Values.multus.f1uInterface.gateway }}
                ,"gateway": "{{ .Values.multus.f1uInterface.gateway }}"
                {{- end }}
          }
          {{- end }}
          ]
    {{- end }}
    spec:
      securityContext:
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
    {{- if .Values.imagePullSecrets }}
      imagePullSecrets:
        {{ toYaml .Values.imagePullSecrets | indent 8 }}
    {{- end }}
      initContainers:
        - name: init
          image: docker.io/oaisoftwarealliance/oai-tcpdump-init:alpine-3.20