Nereus/deploy/base/api-services.yaml

41 lines
1,015 B
YAML

# Active and preview Services for the blue-green Rollout.
#
# Argo Rollouts rewrites both selectors at runtime to pin them to the right
# ReplicaSet. What's below is just the starting state.
#
# Same app.kubernetes.io/name on both so one ServiceMonitor covers them, which
# is what gives the analysis query a `service` label to filter on.
---
apiVersion: v1
kind: Service
metadata:
name: nereus-api-active
labels:
app.kubernetes.io/name: nereus-api
app.kubernetes.io/part-of: nereus
app.kubernetes.io/component: active
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: nereus-api
ports:
- name: http
port: 8080
targetPort: http
---
apiVersion: v1
kind: Service
metadata:
name: nereus-api-preview
labels:
app.kubernetes.io/name: nereus-api
app.kubernetes.io/part-of: nereus
app.kubernetes.io/component: preview
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: nereus-api
ports:
- name: http
port: 8080
targetPort: http