Skip to content

Do not use Helm specific labels as service selectors. #429

Description

@ceseuron

When deploying Octopus into Kubernetes via Helm, the service object is being created with selector rules that include Helm specific labels:

  • app.kubernetes.io/managed-by=Helm
  • helm.sh/chart=octopusdeploy-helm-1.4.0

This presents a problem if there is ever a drift in chart versions between the StatefulSet deployment and the service object, resulting in the service object not matching any endpoints and thus not connecting to the backend.

https://github.com/OctopusDeploy/helm-charts/blob/256e49eabaf24fedd366a8cf80e7d282dc0b1bd3/charts/octopus-deploy/templates/service.yaml#L9C1-L10C58

Problem:

  selector:
    {{- include "octopus.selectorLabels" . | nindent 4 }}

Proposed Solution:

selector:
    app.kubernetes.io/component: octopus-server
    app.kubernetes.io/instance: octopus-deploy
    app.kubernetes.io/name: octopus-deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions