add type to enums in crd validation
This commit is contained in:
		
							parent
							
								
									99bb2041ae
								
							
						
					
					
						commit
						ba528cba4b
					
				|  | @ -63,9 +63,11 @@ spec: | |||
|         - spec | ||||
|       properties: | ||||
|         kind: | ||||
|           type: string | ||||
|           enum: | ||||
|             - postgresql | ||||
|         apiVersion: | ||||
|           type: string | ||||
|           enum: | ||||
|             - acid.zalan.do/v1 | ||||
|         metadata: | ||||
|  | @ -183,6 +185,7 @@ spec: | |||
|                 - version | ||||
|               properties: | ||||
|                 version: | ||||
|                   type: string | ||||
|                   enum: | ||||
|                     - "9.3" | ||||
|                     - "9.4" | ||||
|  | @ -288,12 +291,14 @@ spec: | |||
|                   key: | ||||
|                     type: string | ||||
|                   operator: | ||||
|                     type: string | ||||
|                     enum: | ||||
|                       - Equal | ||||
|                       - Exists | ||||
|                   value: | ||||
|                     type: string | ||||
|                   effect: | ||||
|                     type: string | ||||
|                     enum: | ||||
|                       - NoExecute | ||||
|                       - NoSchedule | ||||
|  | @ -309,6 +314,7 @@ spec: | |||
|                 nullable: true | ||||
|                 description: "Role flags specified here must not contradict each other" | ||||
|                 items: | ||||
|                   type: string | ||||
|                   enum: | ||||
|                   - bypassrls | ||||
|                   - BYPASSRLS | ||||
|  | @ -405,9 +411,11 @@ spec: | |||
|         - configuration | ||||
|       properties: | ||||
|         kind: | ||||
|           type: string | ||||
|           enum: | ||||
|             - OperatorConfiguration | ||||
|         apiVersion: | ||||
|           type: string | ||||
|           enum: | ||||
|             - acid.zalan.do/v1 | ||||
|         metadata: | ||||
|  |  | |||
|  | @ -79,8 +79,7 @@ to function under access control restrictions. To deploy the operator with this | |||
| RBAC policy use: | ||||
| 
 | ||||
| ```bash | ||||
| kubectl create -f manifests/operatorconfiguration.crd.yaml | ||||
| kubectl create -f manifests/postgresql-operator-default-configuration | ||||
| kubectl create -f manifests/configmap.yaml | ||||
| kubectl create -f manifests/operator-service-account-rbac.yaml | ||||
| kubectl create -f manifests/postgres-operator.yaml | ||||
| kubectl create -f manifests/minimal-postgres-manifest.yaml | ||||
|  |  | |||
|  | @ -80,8 +80,7 @@ manifest but replace the version and tag. Don't forget to also apply | |||
| configuration and RBAC manifests first, e.g.: | ||||
| 
 | ||||
| ```bash | ||||
| kubectl create -f manifests/operatorconfiguration.crd.yaml | ||||
| kubectl create -f manifests/postgresql-operator-default-configuration | ||||
| kubectl create -f manifests/configmap.yaml | ||||
| kubectl create -f manifests/operator-service-account-rbac.yaml | ||||
| sed -e "s/\(image\:.*\:\).*$/\1$TAG/" manifests/postgres-operator.yaml | kubectl create  -f - | ||||
| 
 | ||||
|  |  | |||
|  | @ -49,8 +49,7 @@ git clone https://github.com/zalando/postgres-operator.git | |||
| cd postgres-operator | ||||
| 
 | ||||
| # apply the manifests in the following order | ||||
| kubectl create -f manifests/operatorconfiguration.crd.yaml  # configuration CRD | ||||
| kubectl create -f manifests/postgresql-operator-default-configuration  # default configuration | ||||
| kubectl create -f manifests/configmap.yaml  # configuration | ||||
| kubectl create -f manifests/operator-service-account-rbac.yaml  # identity and permissions | ||||
| kubectl create -f manifests/postgres-operator.yaml  # deployment | ||||
| ``` | ||||
|  |  | |||
|  | @ -23,9 +23,11 @@ spec: | |||
|         - configuration | ||||
|       properties: | ||||
|         kind: | ||||
|           type: string | ||||
|           enum: | ||||
|             - OperatorConfiguration | ||||
|         apiVersion: | ||||
|           type: string | ||||
|           enum: | ||||
|             - acid.zalan.do/v1 | ||||
|         metadata: | ||||
|  |  | |||
|  | @ -23,9 +23,11 @@ spec: | |||
|         - spec | ||||
|       properties: | ||||
|         kind: | ||||
|           type: string | ||||
|           enum: | ||||
|             - postgresql | ||||
|         apiVersion: | ||||
|           type: string | ||||
|           enum: | ||||
|             - acid.zalan.do/v1 | ||||
|         metadata: | ||||
|  | @ -143,6 +145,7 @@ spec: | |||
|                 - version | ||||
|               properties: | ||||
|                 version: | ||||
|                   type: string | ||||
|                   enum: | ||||
|                     - "9.3" | ||||
|                     - "9.4" | ||||
|  | @ -248,12 +251,14 @@ spec: | |||
|                   key: | ||||
|                     type: string | ||||
|                   operator: | ||||
|                     type: string | ||||
|                     enum: | ||||
|                       - Equal | ||||
|                       - Exists | ||||
|                   value: | ||||
|                     type: string | ||||
|                   effect: | ||||
|                     type: string | ||||
|                     enum: | ||||
|                       - NoExecute | ||||
|                       - NoSchedule | ||||
|  | @ -269,6 +274,7 @@ spec: | |||
|                 nullable: true | ||||
|                 description: "Role flags specified here must not contradict each other" | ||||
|                 items: | ||||
|                   type: string | ||||
|                   enum: | ||||
|                   - bypassrls | ||||
|                   - BYPASSRLS | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue