NAS-122694 / 23.10 / Add some validation in webdav and other apps (#1312)

* Add some validation in webdav

* add validation in resources

* formatting

* Update error message

* remove extra `\`

* negate logic

* bump
This commit is contained in:
Stavros Kois
2023-07-06 16:55:38 +03:00
committed by GitHub
parent 252d9d8628
commit 56b882e259
81 changed files with 674 additions and 70 deletions

View File

@@ -3,7 +3,7 @@ description: Wordpress is a web content management system
annotations:
title: Wordpress
type: application
version: 1.0.1
version: 1.0.2
apiVersion: v2
appVersion: '1.19.0'
kubeVersion: '>=1.16.0-0'

View File

@@ -259,12 +259,27 @@ questions:
description: CPU limit for Wordpress.
schema:
type: string
default: 4000m
max_length: 6
valid_chars: '^(0\.[1-9]|[1-9][0-9]*)(\.[0-9]|m?)$'
valid_chars_error: |
Valid CPU limit formats are</br>
- Plain Integer - eg. 1</br>
- Float - eg. 0.5</br>
- Milicpu - eg. 500m
default: "4000m"
required: true
- variable: memory
label: Memory
description: Memory limit for Wordpress.
schema:
type: string
default: 8Gi
max_length: 12
valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$'
valid_chars_error: |
Valid Memory limit formats are</br>
- Suffixed with E/P/T/G/M/K - eg. 1G</br>
- Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi</br>
- Plain Integer in bytes - eg. 1024</br>
- Exponent - eg. 134e6
default: "8Gi"
required: true