Skip to content

Add template function to hash a resource in the same manifest #32

Open

Description

@NiklasRosenstein

This would be very useful to generate a typical "config hash" label that can be used to rotate Pods in a deployment when another resource, usually a Secret or ConfigMap, changes.

apiVersion: apps/v1
kind: Deployment
# ...
spec:
  template:
    metadata:
      labels:
        confighash: ${{ hash(local_lookup("v1", "Secret", "mysecret", "namespace").data) }}
  # ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions