Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add values schemas to settings and config charts #256

Merged
merged 6 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 296 additions & 0 deletions charts/config/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
{
"type": "object",
"additionalProperties": false,
"properties": {
"domain": {
"type": "string"
},
"license": {
"type": "string"
},
"ssh": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"port": {
"type": "number"
}
}
},
"sso": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"protocol": {
"type": "string"
},
"secretName": {
"type": "string"
},
"requiredGroups": {
"type": "array",
"items": {}
},
"adminGroups": {
"type": "array",
"items": {
"type": "string"
}
},
"defaultClientScopes": {
"type": "array",
"items": {}
}
}
},
"storage": {
"type": "object",
"properties": {
"internal": {
"type": "boolean"
},
"selector": {
"type": "object",
"properties": {
"app": {
"type": "string"
}
}
},
"namespace": {
"type": "string"
},
"port": {
"type": "number"
},
"endpoint": {
"type": "string"
},
"createSecret": {
"type": "object",
"properties": {
"enabled": {
"type": "string"
},
"accessKey": {
"type": "string"
},
"secretKey": {
"type": "string"
},
"bucketPrefix": {
"type": "string"
},
"bucketSuffix": {
"type": "string"
},
"region": {
"type": "string"
},
"provider": {
"type": "string"
},
"secretRef": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"secretNamespace": {
"type": "string"
},
"secretName": {
"type": "string"
},
"secretIDKey": {
"type": "string"
},
"secretPasswordKey": {
"type": "string"
}
}
}
}
}
}
},
"redis": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"internal": {
"type": "boolean"
},
"selector": {
"type": "object",
"properties": {
"app.kubernetes.io/name": {
"type": "string"
}
}
},
"namespace": {
"type": "string"
},
"port": {
"type": "number"
},
"sentinel": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"port": {
"type": "number"
}
}
}
}
},
"postgres": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"internal": {
"type": "boolean"
},
"selector": {
"type": "object",
"properties": {
"cluster-name": {
"type": "string"
}
}
},
"namespace": {
"type": "string"
},
"port": {
"type": "number"
}
}
},
"runner": {
"type": "object",
"properties": {
"internal": {
"type": "boolean"
},
"selector": {
"type": "object",
"properties": {
"app": {
"type": "string"
}
}
},
"namespace": {
"type": "string"
},
"sandboxNamespace": {
"type": "string"
}
}
},
"mirroring": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"ports": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"additionalNetworkAllow": {
"type": "array",
"items": {
"type": "object",
"properties": {
"direction": {
"type": "string",
"enum": [
"Egress",
"Ingress"
]
},
"selector": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"port": {
"type": "number"
},
"description": {
"type": "string"
},
"remoteNamespace": {
"type": "string"
},
"remoteSelector": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"remoteGenerated": {
"type": "string",
"enum": [
"Anywhere",
"CloudMetadata",
"IntraNamespace",
"KubeAPI"
]
}
},
"required": [
"direction",
"selector",
"port"
],
"oneOf": [
{
"required": [
"remoteNamespace",
"remoteSelector"
],
"properties": {
"remoteGenerated": {
"not": {}
}
}
},
{
"required": [
"remoteGenerated"
],
"properties": {
"remoteNamespace": {
"not": {}
},
"remoteSelector": {
"not": {}
}
}
}
]
}
}
}
}

3 changes: 2 additions & 1 deletion charts/config/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
# yaml-language-server: $schema=./values.schema.json

domain: "###ZARF_VAR_DOMAIN###"

Expand Down Expand Up @@ -85,7 +86,7 @@ mirroring:
gitalyCgroupsInit:
enabled: false

# additionalNetworkAllow:
additionalNetworkAllow: []
# # Notice no `remoteGenerated` field here on custom internal rule
# - direction: Ingress
# selector:
Expand Down
Loading
Loading