microsoft / aroworkshop

Azure Red Hat OpenShift workshop
Creative Commons Attribution 4.0 International
58 stars 121 forks source link

Ratings API container exposes port 3000 not 8080 #107

Open ezYakaEagle442 opened 1 year ago

ezYakaEagle442 commented 1 year ago

Ratings API container exposes port 3000 not 8080 Since those PR :

The ARO workshop guidance should state this and provide a CLI snippet 'oc new-app ....' to get the Service configured with

  ports:
    - name: 80-3000-tcp
      protocol: TCP
      port: 8080
      targetPort: 3000

I have read the OC CLI docs but not found anything, how to do so ?

@sabbour @jamesread

mandibuswell commented 4 months ago

the easy way to fix after the fact is to (using the GUI because that is what I do): edit the ratings-api service and change the targetPort to 3000 and save it. (i edit the yaml directly using the OCP console). I am sure there would be an oc patch command you could use: oh well actually i worked that out if this is useful for you: oc patch service/rating-api --patch '{"spec": {"ports": [{"name": "8080-tcp","protocol": "TCP", "port": 8080, "targetPort": 3000}]}}'