Skip to content

Commit bcbc29a

Browse files
feat: values.schema.json (#40)
* feat: values schema json k8s deployment * feat: test minLength * feat: k8s canary * feat: k8s deployment otel schema * feat: knative schema * feat: remaining schemas * fix: postgres schema * fix: postgres again
1 parent 1fd5aa9 commit bcbc29a

7 files changed

Lines changed: 1367 additions & 0 deletions

File tree

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Values Schema",
4+
"type": "object",
5+
"properties": {
6+
"fullnameOverride": {
7+
"type": "string",
8+
"description": "String to fully override deployment.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+
"podAnnotations": {
56+
"type": "object",
57+
"additionalProperties": { "type": "string" }
58+
},
59+
"podLabels": {
60+
"type": "object",
61+
"additionalProperties": { "type": "string" }
62+
},
63+
"commonLabels": {
64+
"type": "object",
65+
"additionalProperties": { "type": "string" }
66+
},
67+
"serviceAccount": {
68+
"type": "object",
69+
"properties": {
70+
"annotations": {
71+
"type": "object",
72+
"additionalProperties": { "type": "string" }
73+
},
74+
"imagePullSecrets": { "type": "array", "items": { "type": "string" } }
75+
}
76+
},
77+
"livenessProbe": { "type": "object" },
78+
"readinessProbe": { "type": "object" },
79+
"podSecurityContext": { "type": "object" },
80+
"containerSecurityContext": { "type": "object" },
81+
"containerPorts": {
82+
"type": "array",
83+
"items": {
84+
"type": "object",
85+
"properties": {
86+
"name": { "type": "string" },
87+
"containerPort": { "type": "integer" },
88+
"protocol": { "type": "string" }
89+
},
90+
"required": ["name", "containerPort", "protocol"]
91+
}
92+
},
93+
"servicePorts": {
94+
"type": "array",
95+
"items": {
96+
"type": "object",
97+
"properties": {
98+
"port": { "type": "integer" },
99+
"targetPort": { "type": ["string", "integer"] },
100+
"protocol": { "type": "string" },
101+
"name": { "type": "string" }
102+
},
103+
"required": ["port", "targetPort", "protocol", "name"]
104+
}
105+
},
106+
"resources": { "type": "object" },
107+
"nodeSelector": {
108+
"type": "object",
109+
"additionalProperties": { "type": "string" }
110+
},
111+
"tolerations": { "type": "array", "items": { "type": "object" } },
112+
"affinity": { "type": "object" },
113+
"secrets": { "type": "array", "items": { "type": "string" } },
114+
"command": { "type": "array", "items": { "type": "string" } },
115+
"args": { "type": "array", "items": { "type": "string" } },
116+
"initContainers": { "type": "array", "items": { "type": "object" } },
117+
"volumeMounts": {
118+
"type": "array",
119+
"items": {
120+
"type": "object",
121+
"properties": {
122+
"name": { "type": "string" },
123+
"mountPath": { "type": "string" },
124+
"readOnly": { "type": "boolean" }
125+
},
126+
"required": ["name", "mountPath"]
127+
}
128+
},
129+
"volumes": { "type": "array", "items": { "type": "object" } },
130+
"replicaCount": {
131+
"type": "integer",
132+
"minimum": 1,
133+
"description": "Number of replicas to deploy"
134+
},
135+
"autoscaling": {
136+
"type": "object",
137+
"properties": {
138+
"enabled": { "type": "boolean" },
139+
"minReplicas": { "type": "integer", "minimum": 1 },
140+
"maxReplicas": { "type": "integer", "minimum": 1 },
141+
"targetCPU": { "type": "integer", "minimum": 1 },
142+
"targetMemory": { "type": "integer", "minimum": 1 }
143+
},
144+
"required": [
145+
"enabled",
146+
"minReplicas",
147+
"maxReplicas",
148+
"targetCPU",
149+
"targetMemory"
150+
]
151+
},
152+
"serviceMonitor": {
153+
"type": "object",
154+
"properties": {
155+
"create": { "type": "boolean" },
156+
"endpoints": {
157+
"type": "array",
158+
"items": {
159+
"type": "object",
160+
"properties": {
161+
"port": { "type": "string" },
162+
"path": { "type": "string" },
163+
"interval": { "type": "string" }
164+
},
165+
"required": ["port", "path"]
166+
}
167+
}
168+
}
169+
},
170+
"configmap": {
171+
"type": "object",
172+
"properties": {
173+
"create": { "type": "boolean" },
174+
"mountPath": { "type": "string" },
175+
"data": {
176+
"type": "object",
177+
"additionalProperties": { "type": "string" }
178+
}
179+
}
180+
},
181+
"instrumentation": {
182+
"type": "object",
183+
"properties": {
184+
"enabled": { "type": "boolean" },
185+
"sampler": {
186+
"type": "object",
187+
"properties": {
188+
"type": {
189+
"type": "string",
190+
"enum": [
191+
"always_on",
192+
"always_off",
193+
"parentbased_traceidratio",
194+
"traceidratio"
195+
],
196+
"description": "Sampler type for OpenTelemetry"
197+
},
198+
"argument": { "type": "string" }
199+
},
200+
"required": ["type"]
201+
},
202+
"language": {
203+
"type": "string",
204+
"enum": ["java", "dotnet", "python", "nodejs"],
205+
"description": "Language used for OpenTelemetry instrumentation"
206+
},
207+
"extraEnv": {
208+
"type": "array",
209+
"items": {
210+
"type": "object",
211+
"properties": {
212+
"name": { "type": "string" },
213+
"value": { "type": ["string", "boolean"] }
214+
},
215+
"required": ["name"]
216+
}
217+
},
218+
"image": {
219+
"type": "string",
220+
"description": "Optional OpenTelemetry auto-instrumentation image"
221+
}
222+
},
223+
"required": ["enabled", "sampler", "language"]
224+
}
225+
},
226+
"required": ["image", "replicaCount", "autoscaling"]
227+
}

0 commit comments

Comments
 (0)