Skip to content

Commit

Permalink
chore: add values schemas to settings and config charts (#256)
Browse files Browse the repository at this point in the history
## Description

Adds values schemas to the config and settings charts

## Related Issue

Fixes #
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-package-gitlab/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
zachariahmiller authored Dec 11, 2024
1 parent de49d8c commit e7b47c3
Show file tree
Hide file tree
Showing 8 changed files with 543 additions and 4 deletions.
302 changes: 302 additions & 0 deletions charts/config/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
{
"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"
}
}
}
},
"gitalyCgroupsInit": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"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"
],
"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

0 comments on commit e7b47c3

Please sign in to comment.