Skip to content

Commit

Permalink
fix: snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Sep 4, 2023
1 parent 0e23a57 commit 25c3e9c
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 22 deletions.
42 changes: 32 additions & 10 deletions .github/e2e/values1.schema.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema",
"required": ["replicaCount", "resources", "autoscaling"],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"replicaCount",
"resources",
"autoscaling"
],
"properties": {
"replicaCount": {
"type": ["number"],
"type": [
"number"
],
"title": "- number of replicas in the pgweb deployment",
"default": "1"
},
Expand Down Expand Up @@ -79,19 +85,29 @@
},
"serviceAccount": {
"type": "object",
"required": ["create", "annotations", "name"],
"required": [
"create",
"annotations",
"name"
],
"properties": {
"create": {
"type": ["boolean"],
"type": [
"boolean"
],
"title": "-- Specifies whether a service account should be created",
"default": "false"
},
"annotations": {
"type": ["any"],
"type": [
"any"
],
"description": "Annotations to add to the service account"
},
"name": {
"type": ["any"],
"type": [
"any"
],
"description": "The name of the service account to use.\nIf not set and create is true, a name is generated using the fullname template"
}
}
Expand All @@ -106,16 +122,22 @@
"type": "string"
},
"resources": {
"type": ["any"],
"type": [
"any"
],
"description": "custom resources"
},
"autoscaling": {
"type": "object",
"description": "Horizontal Pod autoscaler",
"required": ["enabled"],
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": ["any"],
"type": [
"any"
],
"description": "Horizontal Pod autoscaler",
"default": "false"
},
Expand Down
18 changes: 13 additions & 5 deletions .github/e2e/values2.schema.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema",
"required": ["smtp"],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"smtp"
],
"properties": {
"smtp": {
"type": "object",
"title": "Your SMTP setup",
"required": ["host"],
"required": [
"host"
],
"properties": {
"host": {
"type": ["string"],
"type": [
"string"
],
"title": "SMTP hostname"
},
"port": {
"type": ["number"],
"type": [
"number"
],
"title": "SMTP hostname",
"default": "587"
}
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,7 @@ This schema can then be used with your favorite editor for HELM values validatio

## Dev

update snapshots :

```sh
yarn test -u
./bin/index.js -f .github/e2e/values1.yaml > .github/e2e/values1.schema.json
./bin/index.js -f .github/e2e/values2.yaml > .github/e2e/values2.schema.json
```
update snapshots : `yarn snapshots`

## Todo

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dev": "tsc --watch --outDir build",
"build": "ncc build ./src/index.ts",
"test": "jest",
"snapshots": "yarn test -u && ./bin/index.js -f .github/e2e/values1.yaml > .github/e2e/values1.schema.json && ./bin/index.js -f .github/e2e/values2.yaml > .github/e2e/values2.schema.json",
"lint": "eslint src/**/*.ts"
},
"dependencies": {
Expand Down

0 comments on commit 25c3e9c

Please sign in to comment.