feat: modernize application — source, platform artifacts, CI/CD
All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 55s
All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 55s
- chore: ingest source code 58 files from https://github.com/gothinkster/node-express-realworld-example-app - feat: add platform deployment artifacts - feat: add CI/CD workflow automation
This commit is contained in:
85
score.yaml
85
score.yaml
@@ -1,58 +1,41 @@
|
||||
apiVersion: score.dev/v1b1
|
||||
metadata:
|
||||
name: reno-realworld-5
|
||||
labels:
|
||||
app: reno-realworld-5
|
||||
|
||||
containers:
|
||||
main:
|
||||
reno-realworld-5:
|
||||
image: .
|
||||
variables:
|
||||
# The Watcher's OTel work lands in overlays/otel/, which only ArgoCD reads. On the
|
||||
# orchestrator path nothing consumes that overlay, so without these variables the
|
||||
# renovated app emits no telemetry at all and never appears in Grafana.
|
||||
OTEL_SERVICE_NAME: "reno-realworld-5"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.monitoring.svc.cluster.local:4318"
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf"
|
||||
OTEL_RESOURCE_ATTRIBUTES: "service.name=reno-realworld-5"
|
||||
OTEL_METRICS_EXPORTER: "otlp"
|
||||
OTEL_TRACES_EXPORTER: "otlp"
|
||||
OTEL_LOGS_EXPORTER: "none"
|
||||
DATABASE_URL: "postgresql://${resources.db.username}:${resources.db.password}@${resources.db.host}:${resources.db.port}/${resources.db.name}"
|
||||
|
||||
service:
|
||||
ports:
|
||||
web:
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
|
||||
DATABASE_URL: postgresql://${resources.db.username}:${resources.db.password}@${resources.db.hostname}:${resources.db.port}/${resources.db.database}
|
||||
NODE_ENV: production
|
||||
PORT: '3000'
|
||||
OTEL_SERVICE_NAME: reno-realworld-5
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector.monitoring.svc.cluster.local:4318
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
|
||||
OTEL_RESOURCE_ATTRIBUTES: service.name=reno-realworld-5,app=reno-realworld-5
|
||||
OTEL_METRICS_EXPORTER: otlp
|
||||
OTEL_TRACES_EXPORTER: otlp
|
||||
OTEL_LOGS_EXPORTER: none
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/path: /metrics
|
||||
prometheus.io/port: '3000'
|
||||
prometheus.io/scrape: 'true'
|
||||
labels:
|
||||
app: reno-realworld-5
|
||||
backstage.io/kubernetes-id: reno-realworld-5
|
||||
name: reno-realworld-5
|
||||
resources:
|
||||
env:
|
||||
type: environment
|
||||
|
||||
# Gives the renovated workload a public HTTPS URL. Without this the deploy still goes
|
||||
# green and the pod still runs -- there is simply no Ingress, no certificate and no
|
||||
# hostname, so the demo's payoff (curl the renovated app) has nothing to hit.
|
||||
#
|
||||
# hostname is hardcoded to the apps domain deliberately: it is the only domain the apps
|
||||
# cluster serves, and both the wildcard A record (*.apps.dev) and the cert-manager
|
||||
# ClusterIssuer are scoped to exactly it.
|
||||
#
|
||||
# service_port is the Score `service.ports.web.port` below (80), NOT the container port.
|
||||
# An Ingress naming a Service or port that does not exist fails at neither plan nor
|
||||
# apply -- it surfaces only as nginx answering 503.
|
||||
#
|
||||
# CAVEAT: modernization-factory's generate_score_yaml rewrites BOTH `port` and
|
||||
# `targetPort` to the detected application port whenever that port is not 8080. An app
|
||||
# on 3000 therefore ends up with a Service on 3000 and this Ingress pointing at a port
|
||||
# that no longer exists. Apps already listening on 8080 (Spring PetClinic among them)
|
||||
# skip that patch entirely and are unaffected.
|
||||
ingress:
|
||||
type: workload-ingress
|
||||
params:
|
||||
name: reno-realworld-5
|
||||
hostname: reno-realworld-5.apps.dev.crucible.kyndemo.live
|
||||
service_name: reno-realworld-5
|
||||
service_port: 80
|
||||
db:
|
||||
type: postgres
|
||||
env:
|
||||
type: environment
|
||||
ingress:
|
||||
params:
|
||||
hostname: reno-realworld-5.apps.dev.crucible.kyndemo.live
|
||||
name: reno-realworld-5
|
||||
service_name: reno-realworld-5
|
||||
service_port: 3000
|
||||
type: workload-ingress
|
||||
service:
|
||||
ports:
|
||||
http:
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
|
||||
Reference in New Issue
Block a user