Skip to content
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

service grouping across namespaces is wrong #6311

Open
nicks opened this issue Feb 15, 2024 · 0 comments
Open

service grouping across namespaces is wrong #6311

nicks opened this issue Feb 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nicks
Copy link
Member

nicks commented Feb 15, 2024

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 nicks added the bug Something isn't working label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant