Patch Categories

I haven’t been able to find this conclusive list anywhere else so I will just post it here.

If you are writing a Tutor plugin you have to specify where a particular config will be inserted on tutor config save. This is specified with what Tutor calls a ‘patch’. These can be found throughout the Tutor source code (https://github.com/overhangio/tutor) in lines that look like: {{ patch("local-docker-compose-nginx-aliases")|indent(10) }}. Below is all of the patches that I was able to find in the source-code, and thus areas where you can edit config files with your plugin. If you search the Tutor source code for these patches you can find exactly where in the config file your change would be inserted.

k8s-ingress-rules
k8s-ingress-tls-hosts
k8s-jobs
k8s-services
k8s-volumes
k8s-deployments-nginx-volume-mounts
k8s-deployments-nginx-volumes
k8s-deployments
proxy-apache
proxy-nginx
local-docker-compose-lms-dependencies
local-docker-compose-cms-dependencies
local-docker-compose-services
local-docker-compose-nginx-aliases
local-docker-compose-nginx-volumes
local-docker-compose-prod-services
local-docker-compose-jobs-services
https-create
kustomization-resources
kustomization-commonlabels
kustomization-configmapgenerator
kustomization
local-docker-compose-dev-services
openedx-dockerfile-pre-assets
openedx-dockerfile
openedx-development-settings
openedx-lms-development-settings
openedx-lms-production-settings
openedx-development-settings
openedx-cms-development-settings
openedx-cms-production-settings
openedx-lms-common-settings
openedx-cms-common-settings
openedx-common-settings
common-env-features
cms-env-features
cms-env
lms-env-features
lms-env
openedx-auth
nginx-extra

Hi,
May be our plugins template can help you ?

1 Like

Thanks for this @iammcgaber! There is a rather brief note in the docs that explains how to find patches in the tutor source code, but I admit that it does not contain much information: https://docs.tutor.overhang.io/plugins/api.html#patches
At some point we should write a comprehensive tutorial on creating plugins, but we don’t have time right now. If someone wants to step forward and start editing a wiki/google doc/etherpad/github gist, I’ll be happy to help.

1 Like