diff --git a/service-royalroad-chapters/deployment.yaml b/service-royalroad-chapters/deployment.yaml new file mode 100644 index 0000000..3f43a4c --- /dev/null +++ b/service-royalroad-chapters/deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: service-royalroad-chapters + namespace: app-notifications +spec: + replicas: 1 + selector: + matchLabels: + app: service-royalroad-chapters + template: + metadata: + labels: + app: service-royalroad-chapters + spec: + imagePullSecrets: + - name: ghcr-secret + containers: + - name: service-royalroad-chapters + image: ghcr.io/gansejunge/app-notifications-service-royalroad-chapters:1 + ports: + - containerPort: 5000 + name: fastapi + - containerPort: 9000 + name: prometheus-metrics + env: + - name: SERVICE_RR_DB_HOST + value: "mysql.app-notifications.svc.cluster.local" + - name: BACKEND_API_URL + value: "http://backend-api-internal.app-notifications.svc.cluster.local:8101/internal/receive-notifications" + volumeMounts: + - name: service-royalroad-chapters-secrets + mountPath: /etc/secrets + readOnly: true + volumes: + - name: service-royalroad-chapters-secrets + secret: + secretName: service-royalroad-chapters diff --git a/service-royalroad-chapters/service-internal.yaml b/service-royalroad-chapters/service-internal.yaml new file mode 100644 index 0000000..c7b8a08 --- /dev/null +++ b/service-royalroad-chapters/service-internal.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: service-royalroad-chapters-internal + namespace: app-notifications +spec: + selector: + app: service-royalroad-chapters + ports: + - protocol: TCP + port: 5000 + targetPort: 5000 + name: fastapi + type: ClusterIP diff --git a/service-royalroad-chapters/service-metrics.yaml b/service-royalroad-chapters/service-metrics.yaml new file mode 100644 index 0000000..fa36976 --- /dev/null +++ b/service-royalroad-chapters/service-metrics.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: service-royalroad-chapters-prometheus-metrics + namespace: app-notifications +spec: + selector: + app: service-royalroad-chapters + ports: + - protocol: TCP + port: 9000 + targetPort: 9000 + nodePort: 30902 + name: prometheus-metrics + type: NodePort