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

storaged sidecarVolumes doesn't map configmap correctly #171

Closed
porscheme opened this issue Jan 11, 2023 · 2 comments
Closed

storaged sidecarVolumes doesn't map configmap correctly #171

porscheme opened this issue Jan 11, 2023 · 2 comments

Comments

@porscheme
Copy link

porscheme commented Jan 11, 2023

Please check the FAQ documentation before raising an issue

Describe the bug (required)
storaged sidecarVolumes doesn't map configmap correctly

  • With ConfigMap, sidecarContainers and sidecarVolumes object define on storaged, The appsettings.Production.json file wasn't mounted at /app/config folder
  • See my config entries below ConfigMap, sidecarContainers and sidecarVolumes definations
  • Define comfigMap
apiVersion: v1
kind: ConfigMap
metadata:
  name: mysamplesvc-config-json
data:
  appsettings.Production.json: |-
    {
      "graph": {
        "EnableAccessCheck": false,
        "NebulaHealthCheckFrequencyMinutes": 2,
        "NebulaGraphIpAddress": "nebula-cluster-graphd-svc.graph.svc.cluster.local",
        "NebulaGraphPort": "9669",
        "SpaceNames": [
           "mythisspace",
           "myotherspace"
        ]
      }
  }
  • Define sidecarContainers and sidecarVolumes
storaged:
    image: vesoft/nebula-storaged
    replicas: 3
    env: []
    config:
      "minloglevel": "2"
      "v": "1"    
    resources:
      requests:
        cpu: "1000m"
        memory: "24Gi"
      limits:
        cpu: "4000m"
        memory: "32Gi"
    logStorage: "600Gi"
    dataStorage: "600Gi"
    enableAutoBalance: false
    podLabels: {}
    podAnnotations: {}
    nodeSelector:
      agentpool: "storaged"
    tolerations: []
    affinity: {}
    readinessProbe: {}
    sidecarContainers:
      - name: mysamplesvc
        image: mygraph/mysamplesvc:217315
    sidecarVolumes:
      - name: mysamplesvc-appsettings-config-volume
        configMap:
          name: mysamplesvc-config-json
          items:
            - path: app/config
              key: mysamplesvc-appsettings-config-volume

Your Environments (required)

  • OS: uname -a
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

@porscheme
Copy link
Author

I changed storaged like below, still I do not see appsettings.Production.json file in /app/config folder.
Any help?

  storaged:
    image: vesoft/nebula-storaged
    replicas: 3
    env: []
    config:
      "minloglevel": "2"
      "v": "1"    
    resources:
      requests:
        cpu: "1000m"
        memory: "24Gi"
      limits:
        cpu: "4000m"
        memory: "32Gi"
    logStorage: "600Gi"
    dataStorage: "600Gi"
    enableAutoBalance: false
    podLabels: {}
    podAnnotations: {}
    nodeSelector:
      agentpool: "storaged"
    tolerations: []
    affinity: {}
    readinessProbe: {}
    sidecarContainers:
      - name: mysamplesvc
        image: mygraph/mysamplesvc:217315
        workingDir: /app
        volumeMounts:
          - name: mysamplesvc-appsettings-config-vol
            mountPath: /app/config/appsettings.Production.json
    sidecarVolumes:
      - name: mysamplesvc-appsettings-config-vol
        configMap:
          name: mysamplesvc-config-json
          defaultMode: 420
          items:
            - key: appsettings.Production.json
              path: appsettings.Production.json

@porscheme
Copy link
Author

Finally, This worked for me

BTW, below snippet is from Nebula helm charts values file.

storaged:
    image: vesoft/nebula-storaged
    replicas: 3
    env: []
    config:
      "minloglevel": "2"
      "v": "1"    
    resources:
      requests:
        cpu: "1000m"
        memory: "24Gi"
      limits:
        cpu: "4000m"
        memory: "32Gi"
    logStorage: "600Gi"
    dataStorage: "600Gi"
    enableAutoBalance: false
    podLabels: {}
    podAnnotations: {}
    nodeSelector:
      agentpool: "storaged"
    tolerations: []
    affinity: {}
    readinessProbe: {}
    sidecarContainers:
      - name: mysamplesvc
        image: mygraph/mysamplesvc:217315
        workingDir: /app
        volumeMounts:
          - name: mysamplesvc-appsettings-config-vol
            mountPath: /app/config/appsettings.Production.json
    sidecarVolumes:
      - name: mysamplesvc-appsettings-config-vol
        configMap:
          name: mysamplesvc-config-json

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

No branches or pull requests

1 participant