launchdarkly / ld-relay-helm

A helm chart to ease deployment of the LaunchDarkly Relay Proxy
Other
6 stars 12 forks source link

Deployment.apps "relay" is invalid: spec.template.spec.containers[0].volumeMounts[1].mountPath: Invalid value: "/mnt/secrets/": must be unique #36

Closed ansilh closed 1 year ago

ansilh commented 1 year ago

Describe the bug Adding more than one secrets to mount certificate and keys causes below error during helm installation

Deployment.apps "relay" is invalid: spec.template.spec.containers[0].volumeMounts[1].mountPath: Invalid value: "/mnt/secrets/": must be unique

To reproduce Create values.yaml with below

  relay:
    environment:
      TLS_ENABLED: "true"
      TLS_CERT: "/mnt/secrets/tls.crt"
      TLS_KEY: "/mnt/secrets/tls.key"
    secrets:
    - volumePath: tls.key
      volumeName: tlskey
      secretName: tls
      secretKey: tls.key
    - volumePath: tls.crt
      volumeName: tlscrt
      secretName: tls
      secretKey: tls.crt

Use below helm template command

helm install relay --set relay.environment.LD_ENV_YourEnvironment=your-sdk-key -f values.yaml launchdarkly-ld-relay/ld-relay

Expected behavior The generated mountPath should be uniq

Logs If applicable, add any log output related to your problem.

Helm chart version

NAME                            CHART VERSION   APP VERSION DESCRIPTION
launchdarkly-ld-relay/ld-relay  2.2.0           7.2.1       LaunchDarkly Relay Proxy

Relay proxy configuration, developer tools

Helm : v3.11.2 LD Version : launchdarkly/ld-relay:7.2.1

ansilh commented 1 year ago

Dry-run on server gives the same error in Deployment

helm template relay --set relay.environment.LD_ENV_YourEnvironment=your-sdk-key -f values.yaml launchdarkly-ld-relay/ld-relay  | kubectl create --dry-run=server -f -
serviceaccount/relay-ld-relay created (server dry run)
configmap/ld-relay-config created (server dry run)
service/relay-ld-relay created (server dry run)
The Deployment "relay-ld-relay" is invalid: spec.template.spec.containers[0].volumeMounts[1].mountPath: Invalid value: "/mnt/secrets/": must be unique
keelerm84 commented 1 year ago

Thank you for filing this detailed ticket, and my apologies for the error you are experiencing. I will take a look and update you here once we have a resolution for you.

Tracking internally as sc-202183.

keelerm84 commented 1 year ago

Fixed in 2.2.1