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

[Bug] no pods found matching service labels #669

Open
devShev opened this issue Dec 4, 2023 · 0 comments
Open

[Bug] no pods found matching service labels #669

devShev opened this issue Dec 4, 2023 · 0 comments

Comments

@devShev
Copy link

devShev commented Dec 4, 2023

image

After scanning a file, linter reports that it cannot find pods by labels, although the labels in the deploy and service are correct.

web.yaml

apiVersion: v1
kind: Service
metadata:
  name: admin
spec:
  selector:
    app.name: ivea-django
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8000
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: admin
spec:
  replicas: 1
  selector:
    matchLabels:
      app.name: ivea-django
  template:
    metadata:
      labels:
        app.name: ivea-django
      annotations:
        lastDeployedDate: "{{ now | unixEpoch }}"
    spec:
      imagePullSecrets:
      - name: gitlab-registry-credentials
      containers:
      - name: main
        imagePullPolicy: Always
        image: {{ .Values.images.admin }}
---
apiVersion: batch/v1
kind: Job
metadata:
  name: admin-migrations-job-{{ .Release.Revision }}
  annotations:
    helm.sh/hook: pre-install,pre-upgrade
spec:
  backoffLimit: 0
  ttlSecondsAfterFinished: 3600
  template:
    spec:
      restartPolicy: Never
      imagePullSecrets:
        - name: gitlab-registry-credentials
      containers:
        - name: main
          image: {{ .Values.images.admin }}
          imagePullPolicy: Always
          command: ["python3", "manage.py", "migrate"]
          envFrom:
            - secretRef:
                name: admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant