Skip to content

Commit 1d8d590

Browse files
feat: knative schema
1 parent 8b8dd19 commit 1d8d590

1 file changed

Lines changed: 185 additions & 0 deletions

File tree

knative-service/values.schema.json

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Knative Workload Values Schema",
4+
"type": "object",
5+
"properties": {
6+
"fullnameOverride": {
7+
"type": "string",
8+
"description": "String to fully override ksvc.fullname template"
9+
},
10+
"image": {
11+
"type": "object",
12+
"properties": {
13+
"repository": {
14+
"type": "string",
15+
"minLength": 1,
16+
"description": "Image repository (e.g. ghcr.io/org/app)"
17+
},
18+
"tag": {
19+
"type": "string",
20+
"minLength": 1,
21+
"description": "Image tag (e.g. v1.2.3 or latest)"
22+
},
23+
"pullPolicy": {
24+
"type": "string",
25+
"enum": ["Always", "IfNotPresent", "Never"]
26+
}
27+
},
28+
"required": ["repository", "tag", "pullPolicy"]
29+
},
30+
"env": {
31+
"type": "array",
32+
"description": "Environment variables for containers",
33+
"items": {
34+
"type": "object",
35+
"properties": {
36+
"name": { "type": "string", "minLength": 1 },
37+
"value": { "type": "string" },
38+
"valueFrom": {
39+
"type": "object",
40+
"properties": {
41+
"secretKeyRef": {
42+
"type": "object",
43+
"properties": {
44+
"name": { "type": "string" },
45+
"key": { "type": "string" }
46+
},
47+
"required": ["name", "key"]
48+
}
49+
}
50+
}
51+
},
52+
"required": ["name"]
53+
}
54+
},
55+
"annotations": {
56+
"type": "object",
57+
"description": "Annotations for Knative service. Supports autoscaling and other Knative annotations.",
58+
"additionalProperties": { "type": "string" }
59+
},
60+
"podLabels": {
61+
"type": "object",
62+
"description": "Additional labels for pods",
63+
"additionalProperties": { "type": "string" }
64+
},
65+
"commonLabels": {
66+
"type": "object",
67+
"description": "Labels applied to all resources",
68+
"additionalProperties": { "type": "string" }
69+
},
70+
"serviceAccount": {
71+
"type": "object",
72+
"properties": {
73+
"annotations": {
74+
"type": "object",
75+
"additionalProperties": { "type": "string" }
76+
},
77+
"imagePullSecrets": {
78+
"type": "array",
79+
"items": { "type": "string" }
80+
}
81+
}
82+
},
83+
"livenessProbe": { "type": "object" },
84+
"readinessProbe": {
85+
"type": "object",
86+
"properties": {
87+
"httpGet": {
88+
"type": "object",
89+
"properties": {
90+
"path": { "type": "string" },
91+
"port": { "type": ["string", "integer"] }
92+
},
93+
"required": ["path", "port"]
94+
},
95+
"successThreshold": {
96+
"type": "integer",
97+
"minimum": 1
98+
}
99+
}
100+
},
101+
"containerSecurityContext": {
102+
"type": "object",
103+
"description": "Security context for container"
104+
},
105+
"containerPorts": {
106+
"type": "array",
107+
"items": {
108+
"type": "object",
109+
"properties": {
110+
"name": { "type": "string" },
111+
"containerPort": { "type": "integer" },
112+
"protocol": { "type": "string" }
113+
},
114+
"required": ["name", "containerPort", "protocol"]
115+
}
116+
},
117+
"resources": {
118+
"type": "object",
119+
"description": "Resource requests and limits for containers"
120+
},
121+
"volumeMounts": {
122+
"type": "array",
123+
"items": {
124+
"type": "object",
125+
"properties": {
126+
"name": { "type": "string" },
127+
"mountPath": { "type": "string" },
128+
"readOnly": { "type": "boolean" }
129+
},
130+
"required": ["name", "mountPath"]
131+
}
132+
},
133+
"volumes": {
134+
"type": "array",
135+
"items": { "type": "object" }
136+
},
137+
"nodeSelector": {
138+
"type": "object",
139+
"additionalProperties": { "type": "string" }
140+
},
141+
"tolerations": {
142+
"type": "array",
143+
"items": { "type": "object" }
144+
},
145+
"affinity": {
146+
"type": "object"
147+
},
148+
"secrets": {
149+
"type": "array",
150+
"items": { "type": "string" }
151+
},
152+
"command": {
153+
"type": "array",
154+
"items": { "type": "string" }
155+
},
156+
"args": {
157+
"type": "array",
158+
"items": { "type": "string" }
159+
},
160+
"ingress": {
161+
"type": "string",
162+
"enum": ["public", "cluster"],
163+
"description": "Service visibility. If set to 'cluster', makes the service cluster-local."
164+
},
165+
"serviceMonitor": {
166+
"type": "object",
167+
"properties": {
168+
"create": { "type": "boolean" },
169+
"endpoints": {
170+
"type": "array",
171+
"items": {
172+
"type": "object",
173+
"properties": {
174+
"port": { "type": "string" },
175+
"path": { "type": "string" },
176+
"interval": { "type": "string" }
177+
},
178+
"required": ["port", "path"]
179+
}
180+
}
181+
}
182+
}
183+
},
184+
"required": ["image", "ingress"]
185+
}

0 commit comments

Comments
 (0)