Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Deployment's selector should be immutable #16

Open
@stang

Description

@stang

Currently, Deployment's selector is populated based on deployment.spec.template.metadata.labels, which itself comes from the deployment.metadata.labels.

This works fine as long as the deployment.metadata.labels are not modified between two deployments. In the other cases, it will raise an immutable field error.

https://github.com/bitnami-labs/kube-libsonnet/blob/master/kube.libsonnet#L385-L387

Ultimately, pod labels can have for a wider range of use-cases which should not be tight to the Deployment selector.

An alternative approach would be to use a deterministic value to populate the the deployment.spec.template.metadata.labels and selector (eg: I think that ksonnet-lib uses the {app: metadata.name}).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions