tilt icon indicating copy to clipboard operation
tilt copied to clipboard

service grouping across namespaces is wrong

Open nicks opened this issue 1 year ago • 0 comments

Apply this yaml:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: example-html
  labels:
    app: example-html
spec:
  selector:
    matchLabels:
      app: example-html
  template:
    metadata:
      labels:
        app: example-html
    spec:
      containers:
      - name: example-html
        image: example-html-image
        ports:
        - containerPort: 8000
---
apiVersion: v1
kind: Service
metadata:
  name: example-html
  labels:
    app: example-html
spec:
  selector:
    app: example-html
  ports:
    - protocol: TCP
      port: 8000
      targetPort: 8000
---
apiVersion: v1
kind: Namespace
metadata:
  name: ns2
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: example-html
  namespace: ns2
  labels:
    app: example-html
spec:
  selector:
    matchLabels:
      app: example-html
  template:
    metadata:
      labels:
        app: example-html
    spec:
      containers:
      - name: example-html
        image: example-html-image
        ports:
        - containerPort: 8000

---
apiVersion: v1
kind: Service
metadata:
  name: example-html
  namespace: ns2
  labels:
    app: example-html
spec:
  selector:
    app: example-html
  ports:
    - protocol: TCP
      port: 8000
      targetPort: 8000

Expected behavior: Two different resources, each with 1 StatefulSet and 1 Service

Actual behavior: Two resources, one with 2 services and one with 0

nicks avatar Feb 15 '24 13:02 nicks