Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xray] Incorrect formatting for volumeMounts for panoramic #1895

Open
rhys96 opened this issue Jul 1, 2024 · 2 comments · Fixed by #1896
Open

[xray] Incorrect formatting for volumeMounts for panoramic #1895

rhys96 opened this issue Jul 1, 2024 · 2 comments · Fixed by #1896

Comments

@rhys96
Copy link
Contributor

rhys96 commented Jul 1, 2024

Is this a request for help?:

Yes, I will submit a PR shortly.

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

BUG REPORT.

Version of Helm and Kubernetes:

$ helm version

version.BuildInfo{Version:"v3.11.0", GitCommit:"472c5736ab01133de504a826bd9ee12cbe4e7904", GitTreeState:"clean", GoVersion:"go1.18.10"}

Kubernetes version: 1.29

Which chart:

xray.

Which product license (Enterprise/Pro/oss):

Enterprise.

JFrog support reference (if already raised with support team):

Haven't raised.

What happened:

When attempting to install the xray chart when using custom volumes, I encountered the following error:

Error: INSTALLATION FAILED: YAML parse error on xray/templates/xray-statefulset.yaml: error converting YAML to JSON: yaml: line 475: did not find expected key

What you expected to happen:

I expected the following output:

NAME: xray
LAST DEPLOYED: Mon Jul  1 16:51:42 2024
NAMESPACE: jfrog
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Congratulations! JFrog Xray services are deployed!

How to reproduce it (as minimally and precisely as possible):

Create EKS cluster with secrets-store CSI driver.

Create secret containing the trusted certificate for RDS.

NOTE: We use RDS in our deployment, but any additional volume mount will cause the xray deployment to fail.

Create values.yaml file.

---
global:
  customVolumes: |
    - name: rds-cert-bundle
      csi:
        driver: secrets-store.csi.k8s.io
        readOnly: true
        volumeAttributes:
          secretProviderClass: rds-cert-bundle-secret

  customVolumeMounts: |
    - name: rds-cert-bundle
      mountPath: "/mnt/trusted-certs"
      readOnly: true

xray:
  jfrogUrl: https://<URL>
  joinKey: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Install xray.

$ helm repo add jfrog https://charts.jfrog.io
$ helm repo update
$ helm install -f values.yaml -f sizing/xray-xsmall.yaml xray jfrog/xray

Anything else we need to know:

I've narrowed down the issue to Line 1039 in xray-statefulset.yaml. The initial volume mount is out of alignment compared to the custom volume mounts.

To identify that formatting error:

Debug the xray chart output.

$ helm template xray jfrog/xray -f values.yaml -f sizing/xray-xsmall.yaml --debug > output.yaml

Run yamllint against the outputted YAML file.

$ yamllint output.yaml
...
780:9     error    syntax error: expected <block end>, but found '-' (syntax)
...

Show the error.

$ cat -n output.yaml | sed `777,782!d`
777          volumeMounts:
778            - name: data-volume
779              mountPath: "/var/opt/jfrog/xray"
780          - name: rds-cert-bundle
781            mountPath: "/mnt/trusted-certs"
782            readOnly: true

Recommended change:

Original

volumeMounts:
  - name: data-volume
    mountPath: "{{ .Values.xray.persistence.mountPath }}"

Fixed

volumeMounts:
- name: data-volume
  mountPath: "{{ .Values.xray.persistence.mountPath }}"
@rahulsadanandan
Copy link
Collaborator

@rhys96 Thanks for the PR. We will check this internally and will fix this in the upcoming versions of Xray.
cc @megha1906

@chukka chukka mentioned this issue Aug 22, 2024
4 tasks
@michaelfedell
Copy link

This seems to have been fixed according to the CHANGELOG.md for xray chart; however, I am running into the same issue when using the jfrog-platform chart version 10.19.6 which uses xray chart 103.104.17 (see Chart.yaml).

Steps to reproduce:

  1. Download the xray/sizing/xray-small.yaml file from this repo
  2. Indent all values under a top-level xray key (so that they will be passed to xray subchart from the wrapping jfrog-platform chart
  3. helm template jfrog/jfrog-platform --version 10.19.6 -f xray-small.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants