apiVersion: apps/v1
kind: Deployment
metadata:
  name: highbyte-deployment
  namespace: united-manufacturing-hub
spec:
  replicas: 1
  selector:
    matchLabels:
      app: highbyte
  template:
    metadata:
      labels:
        app: highbyte
    spec:
      containers:
      - name: highbyte-container
        image: gontcharovd/highbyte:4.0.0
        ports:
        - containerPort: 45245
        - containerPort: 1885
        - containerPort: 8885
        volumeMounts:
        - name: highbyte-config
          mountPath: /usr/local/highbyte/config
      volumes:
      - name: highbyte-config
        persistentVolumeClaim:
          claimName: hb-pvc
      imagePullSecrets:
      - name: myregistrykey

---
apiVersion: v1
kind: Service
metadata:
  name: highbyte-service
  namespace: united-manufacturing-hub
spec:
  selector:
    app: highbyte
  ports:
    - name: port-45245
      protocol: TCP
      port: 45245
      targetPort: 45245
    - name: port-1885
      protocol: TCP
      port: 1885
      targetPort: 1885
    - name: port-8885
      protocol: TCP
      port: 8885
      targetPort: 8885
  type: LoadBalancer

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: hb-pvc
  namespace: united-manufacturing-hub
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
