Skip to content

Conversation

@asafchen-dig
Copy link

This PR fixes the connectivity issue between petclinic service and petclinic-flaskdb by setting the StatefulSet replica count to 1.

Issue: ff76fc16-81bc-11f0-8462-168ae57aaddf
Change: Updated flaskdb-statefulset.yaml to set replicas: 1

This minimal change will restore service functionality for the /api/clinic-feedback/count endpoint.

@asafchen-dig
Copy link
Author

The StatefulSet configuration update looks good, but we also need to update the service configuration to match the StatefulSet labels and ensure proper protocol configuration. Here's the required service manifest:

apiVersion: v1
kind: Service
metadata:
  name: petclinic-flaskdb
  namespace: pet-agentic-dev
  labels:
    app.kubernetes.io/component: petclinic-flaskdb
spec:
  selector:
    app.kubernetes.io/component: petclinic-flaskdb
  ports:
    - name: mongodb
      protocol: TCP
      port: 27017
      targetPort: 27017
  type: ClusterIP

This service configuration:

  1. Uses the same label selector as the StatefulSet (app.kubernetes.io/component: petclinic-flaskdb)
  2. Configures TCP protocol for MongoDB port
  3. Exposes port 27017 for MongoDB connections

Please add this service configuration to complete the fix for the connectivity issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants