tilt icon indicating copy to clipboard operation
tilt copied to clipboard

group services with pods

Open nicks opened this issue 3 years ago • 1 comments

From sam in the tilt channel:

apiVersion: v1
kind: Pod
metadata:
  name: eureka
  labels:
    app: eureka
spec:
  containers:
  - name: eureka
    image: netflixoss/eureka:1.3.1
    ports:
      - containerPort: 8080

---
apiVersion: v1
kind: Service
metadata:
  name: eureka
  labels:
    app: eureka
spec:
  ports:
    - port: 8080
  selector:
    app: eureka

im wondering if there is any other way to flag k8s services with a label so they get grouped in tandem, like the above

Currently, Tilt will match up Services with PodTemplates (e.g., Deployments, ReplicaSets), but not with bare pods

nicks avatar Jul 06 '22 13:07 nicks

I imagine app.kubernetes.io/name / app would be reasonable labels to auto-group on by default, and we could also expose something via Tiltfile like k8s_resource_settings(auto_group_labels=['custom.example.com/app']) 🤔

milas avatar Jul 08 '22 19:07 milas