diff --git a/templates/ptp-events-consumer/READEME.md b/templates/ptp-events-consumer/READEME.md new file mode 100644 index 0000000..aab4869 --- /dev/null +++ b/templates/ptp-events-consumer/READEME.md @@ -0,0 +1 @@ +# Deploys a consumer of PTP events fromt he ORAN API diff --git a/templates/ptp-events-consumer/deployment.yaml b/templates/ptp-events-consumer/deployment.yaml new file mode 100644 index 0000000..893a950 --- /dev/null +++ b/templates/ptp-events-consumer/deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ptp-event-deployment + labels: + app: du-ptp-event-consumer +spec: + replicas: 1 + selector: + matchLabels: + app: du-ptp-event-consumer + template: + metadata: + labels: + app: du-ptp-event-consumer + spec: + nodeSelector: + node-role.kubernetes.io/worker: "" + serviceAccountName: ptp-event-consumer-sa + containers: + - name: ptp-consumer + image: quay.io/jenchen/ptp-event-consumer:latest + args: + - "--local-api-addr=127.0.0.1:27017" + - "--api-path=/api/ocloudNotifications/v1/" + - "--api-addr=127.0.0.1:27017" + env: + - name: NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: NAME_SPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: CONSUMER_PORT + value: "27017" + - name: CONSUMER_TYPE + value: "PTP" + - name: ENABLE_STATUS_CHECK + value: "true" + volumeMounts: + - name: pubsubstore + mountPath: /store + volumes: + - name: pubsubstore + emptyDir: {} diff --git a/templates/ptp-events-consumer/service-account.yaml b/templates/ptp-events-consumer/service-account.yaml new file mode 100644 index 0000000..a522e07 --- /dev/null +++ b/templates/ptp-events-consumer/service-account.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ptp-event-consumer-sa + labels: + app: du-ptp-event-consumer \ No newline at end of file diff --git a/templates/ptp-events-consumer/service.yaml b/templates/ptp-events-consumer/service.yaml new file mode 100644 index 0000000..5581677 --- /dev/null +++ b/templates/ptp-events-consumer/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/scrape: "true" + name: du-ptp-event-consumer-service + labels: + app: du-ptp-event-consumer +spec: + ports: + - name: sub-port + port: 27017 + targetPort: http + selector: + app: test50 + clusterIP: None + sessionAffinity: None + type: ClusterIP