Skip to content

editor: Service selector should report matching labels in Deployment template #882

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

Open
adietish opened this issue May 19, 2025 · 0 comments
Assignees

Comments

@adietish
Copy link
Collaborator

adietish commented May 19, 2025

follows up on #642

Steps:

  1. ASSERT: have the following in a yaml editor:
apiVersion: apps/v1kind: Deployment
metadata:
  annotations:
    app.quarkus.io/commit-id: 874731470682e3f213506357d2f9887bab63be83
    app.quarkus.io/build-timestamp: 2025-04-05 - 22:16:28 +0000
  labels:
    app.kubernetes.io/name: code-with-quarkus3
    app.kubernetes.io/version: 1.0.0-SNAPSHOT
  name: code-with-quarkus3
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: code-with-quarkus3
      app.kubernetes.io/version: 1.0.0-SNAPSHOT
  template:
    metadata:
      annotations:
        app.quarkus.io/commit-id: 874731470682e3f213506357d2f9887bab63be83
        app.quarkus.io/build-timestamp: 2025-04-05 - 22:16:28 +0000
      labels:
        app.kubernetes.io/name: code-with-quarkus3
        app.kubernetes.io/version: 1.0.0-SNAPSHOT
    spec:
      containers:
        - env:
            - name: KUBERNETES_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          image: minikube/adietish/code-with-quarkus3:1.0.0-SNAPSHOT
          imagePullPolicy: IfNotPresent
          name: code-with-quarkus3
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    app.quarkus.io/commit-id: 874731470682e3f213506357d2f9887bab63be83
    app.quarkus.io/build-timestamp: 2025-04-05 - 22:16:28 +0000
  labels:
    app.kubernetes.io/name: code-with-quarkus3
    app.kubernetes.io/version: 1.0.0-SNAPSHOT
  name: code-with-quarkus3
spec:
  ports:
    - name: http
      nodePort: 31462
      port: 80
      protocol: TCP
      targetPort: 8080
  selector:
    app.kubernetes.io/name: code-with-quarkus3
    app.kubernetes.io/version: 1.0.0-SNAPSHOT
  type: NodePort
  1. EXEC: navigate to the selector in the Service and verify how many resources are matching it:
Image

Result:
It should repot 1 matching because the labels in the template for the Deployment match the selector.

Image
@adietish adietish self-assigned this May 19, 2025
@adietish adietish moved this to 📋 Backlog in IDE Cloudaptors May 28, 2025
@adietish adietish moved this from 📋 Backlog to 📝 In Progress in IDE Cloudaptors Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📝 In Progress
Development

No branches or pull requests

1 participant