-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
registration-service: new Service to /metrics
#1051
Changes from 1 commit
69b594f
7e58490
1f68b9f
d0b8564
ce07425
c152198
c2aefe5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,10 +96,12 @@ objects: | |
- name: registration-service | ||
image: ${IMAGE} | ||
ports: | ||
- containerPort: 8080 | ||
- containerPort: 8081 | ||
- containerPort: 8082 | ||
- containerPort: 8080 # registration service | ||
- containerPort: 8081 # proxy | ||
- containerPort: 8082 # proxy metrics | ||
name: metrics | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. optional - maybe we could rename this to proxy-metrics There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, indeed, although I did not want to bring too many changes here, in case it's used by Konflux 🤷♂️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense |
||
- containerPort: 8083 # registration service metrics | ||
name: registration-service-metrics | ||
command: | ||
- registration-service | ||
imagePullPolicy: IfNotPresent | ||
|
@@ -140,24 +142,8 @@ objects: | |
requests: | ||
cpu: "50m" | ||
memory: "100M" | ||
- kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: registration-service | ||
namespace: ${NAMESPACE} | ||
labels: | ||
provider: codeready-toolchain | ||
run: registration-service | ||
spec: | ||
ports: | ||
- name: "8080" | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 8080 | ||
selector: | ||
run: registration-service | ||
type: ClusterIP | ||
sessionAffinity: null | ||
|
||
# route for the registration service | ||
- kind: Route | ||
apiVersion: v1 | ||
metadata: | ||
|
@@ -168,6 +154,7 @@ objects: | |
namespace: ${NAMESPACE} | ||
spec: | ||
host: '' | ||
path: /api # we don't want to expose anything else (eg: Prometheus metrics) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks like a route for the registration service. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ohhh, that's a mistake, I thought I reverted that change! 🤦♂️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed in 7e58490 |
||
port: | ||
targetPort: "8080" | ||
to: | ||
|
@@ -177,24 +164,48 @@ objects: | |
tls: | ||
termination: edge | ||
wildcardPolicy: None | ||
|
||
# service associated with the registration service route | ||
- kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: api | ||
name: registration-service | ||
namespace: ${NAMESPACE} | ||
labels: | ||
provider: codeready-toolchain | ||
run: registration-service | ||
spec: | ||
ports: | ||
- name: "8081" | ||
- name: "8080" | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 8081 | ||
targetPort: 8080 | ||
selector: | ||
run: registration-service | ||
type: ClusterIP | ||
sessionAffinity: null | ||
|
||
# internal service for the registration service, used by Prometheus to scrape the metrics | ||
- kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: registration-service-metrics | ||
namespace: ${NAMESPACE} | ||
labels: | ||
provider: codeready-toolchain | ||
run: registration-service | ||
spec: | ||
ports: | ||
- name: registration-service-metrics | ||
protocol: TCP | ||
port: 80 | ||
targetPort: registration-service-metrics | ||
selector: | ||
run: registration-service | ||
type: ClusterIP | ||
sessionAffinity: null | ||
|
||
# route for the proxy | ||
- kind: Route | ||
apiVersion: v1 | ||
metadata: | ||
|
@@ -206,7 +217,6 @@ objects: | |
name: api | ||
namespace: ${NAMESPACE} | ||
spec: | ||
host: '' | ||
port: | ||
targetPort: "8081" | ||
to: | ||
|
@@ -216,6 +226,28 @@ objects: | |
tls: | ||
termination: edge | ||
wildcardPolicy: None | ||
|
||
# service associated with the proxy route | ||
- kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: api | ||
namespace: ${NAMESPACE} | ||
labels: | ||
provider: codeready-toolchain | ||
run: registration-service | ||
spec: | ||
ports: | ||
- name: "8081" | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 8081 | ||
selector: | ||
run: registration-service | ||
type: ClusterIP | ||
sessionAffinity: null | ||
|
||
# internal service for the proxy, used by Prometheus to scrape the metrics | ||
- kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to your changes - I'm a bit confused with those conditions, not sure what are those for 🤔