overhangio / tutor-ecommerce

Ecommerce plugin for Tutor
GNU Affero General Public License v3.0
17 stars 50 forks source link

fix(tutorecommerce): add paymentprocessors.json to k8s deployments an… #55

Closed hoffmannkrzysztof closed 9 months ago

hoffmannkrzysztof commented 9 months ago

…d kustomization-configmapgenerator

Mounting volume with paymentprocessors.json is missing while using k8s stack.

regisb commented 9 months ago

Hi! Thanks for your PR. You're right that we need to bind-mount not just the production.py setting in the ecommerce container. But I believe we should actually mount all files from the settings/ directory. Thus, we should write something like:

- name: ecommerce-settings
  files:{% for file in "plugins/ecommerce/apps/ecommerce/settings/"|walk_templates %}
  - {{ file }}{% endfor %}

And then, in the ecommerce container, we should mount the entire directory:

volumeMounts:
            - mountPath: /openedx/ecommerce/ecommerce/settings/
              name: settings
volumes:
        - name: settings
          configMap:
            name: ecommerce-settings

(I didn't test this configuration and I'm not sure it's 100% correct, but I think you get the point, right?)

See for reference the "openedx-settings-lms" config for the LMS. Can you please update your PR to reflect that?

hoffmannkrzysztof commented 9 months ago

@regisb thanks for the tip. I implemented fix