---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: free5gc-smf-0x01010203
  labels:
    app: free5gc-smf-0x01010203
    nsi: "1"        # Network Slice Instance of three networks (RAN,TN,CN)
    sst: "01"       # Slice/Service Type (1 byte uinteger, range: 0~255)
    sd: "010203"    # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
spec:
  replicas: 0
  selector:
    matchLabels:
      app: free5gc-smf-0x01010203
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: free5gc-smf-0x01010203
        nsi: "1"        # Network Slice Instance of three networks (RAN,TN,CN)
        sst: "01"       # Slice/Service Type (1 byte uinteger, range: 0~255)
        sd: "010203"    # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
      annotations:
        k8s.v1.cni.cncf.io/networks: free5gc-n4-466-01-000000010-0x01010203
        free5gc-n4-466-01-000000010-0x01010203.free5gc.ovn.kubernetes.io/logical_switch: free5gc-n4-466-01-000000010-0x01010203
        free5gc-n4-466-01-000000010-0x01010203.free5gc.ovn.kubernetes.io/ip_address: 10.200.101.20
    spec:
      securityContext:
        runAsUser: 0
        runAsGroup: 0
      containers:
        - name: free5gc-smf
          image: black842679513/free5gc-smf:v3.0.5
          imagePullPolicy: IfNotPresent
          # imagePullPolicy: Always
          securityContext:
            privileged: false
          volumeMounts:
            - name: free5gc-smf-0x01010203-config
              mountPath: /free5gc/config
            - name: free5gc-smf-0x01010203-cert
              mountPath: /free5gc/support/TLS
          ports:
            - containerPort: 8000
              name: if-sbi
              protocol: TCP
            - containerPort: 8805
              name: if-n4
              protocol: UDP
        - name: tcpdump
          image: corfr/tcpdump
          imagePullPolicy: IfNotPresent
          command:
            - /bin/sleep
            - infinity
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      serviceAccountName: free5gc-smf-0x01010203-sa
      terminationGracePeriodSeconds: 30
      volumes:
        - name: free5gc-smf-0x01010203-cert
          secret:
            secretName: free5gc-smf-0x01010203-tls-secret
        - name: free5gc-smf-0x01010203-config
          configMap:
            name: free5gc-smf-0x01010203-config
