newrelic / k8s-agents-operator

Apache License 2.0
3 stars 4 forks source link

Duplicated app.kubernetes.io/name Label Selector in Service Resource selector #77

Open pragmaticivan opened 1 month ago

pragmaticivan commented 1 month ago

Description

Current template has a bug where the app.kubernetes.io/name is added twice to the Service resource

Steps to Reproduce

helm template build newrelic-k8s/k8s-agents-operator

Output with default values:

# Source: k8s-agents-operator/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: build-k8s-agents-operator
  labels:
    control-plane: controller-manager
    helm.sh/chart: k8s-agents-operator
    app.kubernetes.io/name: k8s-agents-operator
    app.kubernetes.io/instance: build
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: k8s-agents-operator
    control-plane: controller-manager
    helm.sh/chart: k8s-agents-operator
    app.kubernetes.io/name: k8s-agents-operator
    app.kubernetes.io/instance: build
    app.kubernetes.io/managed-by: Helm
  ports:
  - name: https
    port: 8443
    protocol: TCP
    targetPort: https

Relevant Logs / Console output

N/A

Your Environment

Latest version

pragmaticivan commented 1 month ago

This is also happening in build-k8s-agents-operator deployment.