-
Notifications
You must be signed in to change notification settings - Fork 0
/
crdvalidations.yaml
42 lines (42 loc) · 1.07 KB
/
crdvalidations.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: projects.stable.example.com
spec:
group: stable.example.com
scope: Namespaced
names:
plural: "projects"
singular: "project"
kind: "Project"
shortNames:
- mr
versions:
- name: "v1"
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required: ["spec"]
properties:
spec:
# x-kubernetes-validation-rules:
# - rule: ".*:.*"
# message: "image must contain tag"
# - rule: "^(?!(.*:latest$)).*$"
# message: "image should not end with tag: latest"
type: object
required: ["image","owner","locale"]
properties:
image:
type: "string"
# pattern: '^(?!(.*:latest$)).*$'
owner:
type: "string"
pattern: '^org.io/'
locale:
type: "string"
enum:
- EN
- DE