fmjstudios / helm

đŸª– A collection of MIT-licensed Helm Charts
MIT License
12 stars 13 forks source link

[linkwarden] templating issue with kubernetes/helm strategy enabled #37

Open titey opened 3 months ago

titey commented 3 months ago

Name and Version

fmjstudios/linkwarden 0.3.3

What architecture are you using?

amd64

What steps will reproduce the bug?

With strategy enabled like this:

## @param strategy Specify a deployment strategy for the Linkwarden pod
##
strategy:
  type: RollingUpdate
  rollingUpdate:
    maxUnavailable: 1

.. Helm will template-it like this:

---
# Source: linkwarden/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: linkwarden
  namespace: linkwarden
  labels:
    helm.sh/chart: linkwarden-0.3.3
    app.kubernetes.io/name: linkwarden
    app.kubernetes.io/instance: linkwarden
    app.kubernetes.io/version: "2.5.3"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: linkwarden
      app.kubernetes.io/instance: linkwardenstrategy:  # <== !!!
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate

The selector app.kubernetes.io/instance line is merged with strategy:.

I think this is related to the line stripping -}} in https://github.com/fmjstudios/helm/blob/main/charts/linkwarden/templates/deployment.yaml#L13

Are you using any custom parameters or values?

strategy:
  type: RollingUpdate
  rollingUpdate:
    maxUnavailable: 1

What is the expected behavior?

spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: linkwarden
      app.kubernetes.io/instance: linkwarden
  strategy:
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate

What do you see instead?

spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/name: linkwarden
      app.kubernetes.io/instance: linkwardenstrategy:  # <== !!!
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate

Additional information

No response

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.