|
361 | 361 | }, |
362 | 362 | "updateImageTags": { |
363 | 363 | "type": "boolean", |
364 | | - "description": "UpdateImageTags lets you define if DevSpace should update the tags of the images defined in the\nimages section with their most recent built tag." |
| 364 | + "description": "UpdateImageTags lets you define if DevSpace should update the tags of the images defined in the\nimages section with their most recent built tag.", |
| 365 | + "default": true |
365 | 366 | }, |
366 | 367 | "namespace": { |
367 | 368 | "type": "string", |
|
753 | 754 | "type": "object", |
754 | 755 | "description": "HelmConfig defines the specific helm options used during deployment" |
755 | 756 | }, |
| 757 | + "HookConfig": { |
| 758 | + "properties": { |
| 759 | + "name": { |
| 760 | + "type": "string", |
| 761 | + "description": "Name is the name of the hook" |
| 762 | + }, |
| 763 | + "disabled": { |
| 764 | + "type": "boolean", |
| 765 | + "description": "Disabled can be used to disable the hook" |
| 766 | + }, |
| 767 | + "events": { |
| 768 | + "items": { |
| 769 | + "type": "string" |
| 770 | + }, |
| 771 | + "type": "array", |
| 772 | + "description": "Events are the events when the hook should be executed" |
| 773 | + }, |
| 774 | + "command": { |
| 775 | + "type": "string", |
| 776 | + "description": "Command is the base command that is either executed locally or in a remote container.\nCommand is mutually exclusive with other hook actions. In the case this is defined\ntogether with where.container, DevSpace will until the target container is running and\nonly then execute the command. If the container does not start in time, DevSpace will fail." |
| 777 | + }, |
| 778 | + "args": { |
| 779 | + "items": { |
| 780 | + "type": "string" |
| 781 | + }, |
| 782 | + "type": "array", |
| 783 | + "description": "Args are additional arguments passed together with the command to execute." |
| 784 | + }, |
| 785 | + "os": { |
| 786 | + "type": "string", |
| 787 | + "description": "If an operating system is defined, the hook will only be executed for the given os.\nAll supported golang OS types are supported and multiple can be combined with ','." |
| 788 | + }, |
| 789 | + "upload": { |
| 790 | + "$ref": "#/$defs/HookSyncConfig", |
| 791 | + "description": "If Upload is specified, DevSpace will upload certain local files or folders into a\nremote container." |
| 792 | + }, |
| 793 | + "download": { |
| 794 | + "$ref": "#/$defs/HookSyncConfig", |
| 795 | + "description": "Same as Upload, but with this option DevSpace will download files or folders from\na remote container." |
| 796 | + }, |
| 797 | + "logs": { |
| 798 | + "$ref": "#/$defs/HookLogsConfig", |
| 799 | + "description": "If logs is defined will print the logs of the target container. This is useful for containers\nthat should finish like init containers or job pods. Otherwise this hook will never terminate." |
| 800 | + }, |
| 801 | + "wait": { |
| 802 | + "$ref": "#/$defs/HookWaitConfig", |
| 803 | + "description": "If wait is defined the hook will wait until the matched pod or container is running or is terminated\nwith a certain exit code." |
| 804 | + }, |
| 805 | + "background": { |
| 806 | + "type": "boolean", |
| 807 | + "description": "If true, the hook will be executed in the background." |
| 808 | + }, |
| 809 | + "silent": { |
| 810 | + "type": "boolean", |
| 811 | + "description": "If true, the hook will not output anything to the standard out of DevSpace except\nfor the case when the hook fails, where DevSpace will show the error including\nthe captured output streams of the hook." |
| 812 | + }, |
| 813 | + "container": { |
| 814 | + "$ref": "#/$defs/HookContainer", |
| 815 | + "description": "Container specifies where the hook should be run. If this is omitted DevSpace expects a\nlocal command hook." |
| 816 | + } |
| 817 | + }, |
| 818 | + "type": "object", |
| 819 | + "required": [ |
| 820 | + "events" |
| 821 | + ], |
| 822 | + "description": "HookConfig defines a hook" |
| 823 | + }, |
| 824 | + "HookContainer": { |
| 825 | + "properties": { |
| 826 | + "labelSelector": { |
| 827 | + "patternProperties": { |
| 828 | + ".*": { |
| 829 | + "type": "string" |
| 830 | + } |
| 831 | + }, |
| 832 | + "type": "object", |
| 833 | + "description": "LabelSelector to select a container" |
| 834 | + }, |
| 835 | + "pod": { |
| 836 | + "type": "string", |
| 837 | + "description": "Pod name to use" |
| 838 | + }, |
| 839 | + "namespace": { |
| 840 | + "type": "string", |
| 841 | + "description": "Namespace to use" |
| 842 | + }, |
| 843 | + "imageSelector": { |
| 844 | + "type": "string", |
| 845 | + "description": "ImageSelector to select a container" |
| 846 | + }, |
| 847 | + "containerName": { |
| 848 | + "type": "string", |
| 849 | + "description": "ContainerName to use" |
| 850 | + }, |
| 851 | + "wait": { |
| 852 | + "type": "boolean", |
| 853 | + "description": "Wait can be used to disable waiting" |
| 854 | + }, |
| 855 | + "timeout": { |
| 856 | + "type": "integer", |
| 857 | + "description": "Timeout is how long to wait (in seconds) for the container to start. Default is 150 seconds.", |
| 858 | + "default": 150 |
| 859 | + }, |
| 860 | + "once": { |
| 861 | + "type": "boolean", |
| 862 | + "description": "Once only executes an hook once in the container until it is restarted" |
| 863 | + } |
| 864 | + }, |
| 865 | + "type": "object", |
| 866 | + "description": "HookContainer defines how to select one or more containers to execute a hook in" |
| 867 | + }, |
| 868 | + "HookLogsConfig": { |
| 869 | + "properties": { |
| 870 | + "tailLines": { |
| 871 | + "type": "integer", |
| 872 | + "description": "If set, the number of lines from the end of the logs to show. If not specified,\nlogs are shown from the creation of the container" |
| 873 | + } |
| 874 | + }, |
| 875 | + "type": "object", |
| 876 | + "description": "HookLogsConfig defines a hook logs config" |
| 877 | + }, |
| 878 | + "HookSyncConfig": { |
| 879 | + "properties": { |
| 880 | + "localPath": { |
| 881 | + "type": "string", |
| 882 | + "description": "LocalPath to sync files from" |
| 883 | + }, |
| 884 | + "containerPath": { |
| 885 | + "type": "string", |
| 886 | + "description": "ContainerPath to sync files to" |
| 887 | + } |
| 888 | + }, |
| 889 | + "type": "object", |
| 890 | + "description": "HookSyncConfig defines a hook upload config" |
| 891 | + }, |
| 892 | + "HookWaitConfig": { |
| 893 | + "properties": { |
| 894 | + "running": { |
| 895 | + "type": "boolean", |
| 896 | + "description": "If running is true, will wait until the matched containers are running. Can be used together with terminatedWithCode." |
| 897 | + }, |
| 898 | + "terminatedWithCode": { |
| 899 | + "type": "integer", |
| 900 | + "description": "If terminatedWithCode is not nil, will wait until the matched containers are terminated with the given exit code.\nIf the container has exited with a different exit code, the hook will fail. Can be used together with running." |
| 901 | + }, |
| 902 | + "timeout": { |
| 903 | + "type": "integer", |
| 904 | + "description": "The amount of seconds to wait until the hook will fail. Defaults to 150 seconds." |
| 905 | + } |
| 906 | + }, |
| 907 | + "type": "object", |
| 908 | + "description": "HookWaitConfig defines a hook wait config" |
| 909 | + }, |
756 | 910 | "Image": { |
757 | 911 | "properties": { |
758 | 912 | "name": { |
|
2210 | 2364 | "$ref": "#/$defs/RequireConfig", |
2211 | 2365 | "description": "Require defines what DevSpace, plugins and command versions are required to use this config and if a condition is not\nfulfilled, DevSpace will fail." |
2212 | 2366 | }, |
| 2367 | + "hooks": { |
| 2368 | + "items": { |
| 2369 | + "$ref": "#/$defs/HookConfig" |
| 2370 | + }, |
| 2371 | + "type": "array", |
| 2372 | + "description": "Hooks are actions that are executed at certain points within the pipeline. Hooks are ordered and are executed\nin the order they are specified. They are deprecated and pipelines should be used instead." |
| 2373 | + }, |
2213 | 2374 | "localRegistry": { |
2214 | 2375 | "$ref": "#/$defs/LocalRegistryConfig", |
2215 | 2376 | "description": "LocalRegistry specifies the configuration for a local image registry" |
|
0 commit comments