Skip to content

Commit

Permalink
Fix schema validation for releaseTrunc and prefixTrunc (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
danduk82 authored Feb 21, 2024
1 parent df21c44 commit ecfdcfb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
14 changes: 7 additions & 7 deletions tests/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: custom-with-name-override-example2
name: cus-example2
labels:
app.kubernetes.io/name: with-name-override
app.kubernetes.io/instance: custom
Expand Down Expand Up @@ -177,7 +177,7 @@ data:
SERVICE_EXAMPLE1_CONTAINER_BB_IMAGE_TAG: "latest"
SERVICE_EXAMPLE1_CONTAINER_CC_IMAGE_TAG: "latest"
SERVICE_EXAMPLE1_CONTAINER_DD_IMAGE_TAG: "latest"
SERVICE_EXAMPLE2_NAME: custom-with-name-override-example2
SERVICE_EXAMPLE2_NAME: cus-example2
SERVICE_EXAMPLE2_CONTAINER_CC_IMAGE_TAG: "latest"
SERVICE_EXAMPLE2_CONTAINER_DD_IMAGE_TAG: "latest"
SERVICE_EXAMPLE3_NAME: hardcoded-service-name
Expand Down Expand Up @@ -220,7 +220,7 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: custom-with-name-override-example2
name: cus-example2
labels:
helm.sh/chart: custom-pod
app.kubernetes.io/version: "1.0"
Expand Down Expand Up @@ -527,7 +527,7 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: custom-with-name-override-example2
name: cus-example2
labels:
helm.sh/chart: custom-pod
app.kubernetes.io/version: "1.0"
Expand Down Expand Up @@ -975,7 +975,7 @@ spec:
pathType: Prefix
backend:
service:
name: custom-with-name-override-example2
name: cus-example2
port:
number: 8080
- path: "/three"
Expand All @@ -999,7 +999,7 @@ spec:
pathType: Prefix
backend:
service:
name: custom-with-name-override-example2
name: cus-example2
port:
number: 8080
- path: "/three"
Expand Down Expand Up @@ -1045,7 +1045,7 @@ spec:
pathType: Prefix
backend:
service:
name: custom-with-name-override-example2
name: cus-example2
port:
number: 8080
- path: "/three"
Expand Down
3 changes: 3 additions & 0 deletions tests/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ services:
targetPort: http

example2:
releaseTrunc: 15
prefixTrunc: 3

ingress:
enabled: true
path: /two
Expand Down
6 changes: 2 additions & 4 deletions values.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@
- **`nameOverride`**: Refer to _[#/definitions/nameOverride](#definitions/nameOverride)_.
- **`fullnameOverride`**: Refer to _[#/definitions/fullnameOverride](#definitions/fullnameOverride)_.
- **`serviceName`**: Refer to _[#/definitions/serviceName](#definitions/serviceName)_.
- **`releaseTrunc`**: Refer to _[#/definitions/releaseTrunc](#definitions/releaseTrunc)_.
- **`prefixTrunc`**: Refer to _[#/definitions/prefixTrunc](#definitions/prefixTrunc)_.
- **`metadata`** _(boolean)_: Create a ConfigMap to expose some metadata about the chart.
- **`ingress`** _(object)_: Cannot contain additional properties.
- **`enabled`** _(boolean)_: Enable the Ingress.
- **`nameOverride`**: Refer to _[#/definitions/nameOverride](#definitions/nameOverride)_.
- **`fullnameOverride`**: Refer to _[#/definitions/fullnameOverride](#definitions/fullnameOverride)_.
- **`serviceName`**: Refer to _[#/definitions/serviceName](#definitions/serviceName)_.
- **`releaseTrunc`**: Refer to _[#/definitions/releaseTrunc](#definitions/releaseTrunc)_.
- **`prefixTrunc`**: Refer to _[#/definitions/prefixTrunc](#definitions/prefixTrunc)_.
- **`labels`**: Refer to _[#/definitions/labels](#definitions/labels)_.
- **`annotations`**: Refer to _[#/definitions/annotations](#definitions/annotations)_.
- **`podLabels`**: Refer to _[#/definitions/podLabels](#definitions/podLabels)_.
Expand Down Expand Up @@ -51,6 +47,8 @@
- **`podAnnotations`**: Refer to _[#/definitions/podAnnotations](#definitions/podAnnotations)_.
- **`serviceName`**: Refer to _[#/definitions/serviceName](#definitions/serviceName)_.
- **`resources`**: Refer to _[#/definitions/resources](#definitions/resources)_.
- **`releaseTrunc`**: Refer to _[#/definitions/releaseTrunc](#definitions/releaseTrunc)_.
- **`prefixTrunc`**: Refer to _[#/definitions/prefixTrunc](#definitions/prefixTrunc)_.
- **`affinity`**: Refer to _[#/definitions/affinity](#definitions/affinity)_.
- **`nodeSelector`**: Refer to _[#/definitions/nodeSelector](#definitions/nodeSelector)_.
- **`replicaCount`** _(integer)_: The number of replicas.
Expand Down
18 changes: 6 additions & 12 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@
"serviceName": {
"$ref": "#/definitions/serviceName"
},
"releaseTrunc": {
"$ref": "#/definitions/releaseTrunc"
},
"prefixTrunc": {
"$ref": "#/definitions/prefixTrunc"
},
"metadata": {
"type": "boolean",
"description": "Create a ConfigMap to expose some metadata about the chart"
Expand All @@ -292,12 +286,6 @@
"serviceName": {
"$ref": "#/definitions/serviceName"
},
"releaseTrunc": {
"$ref": "#/definitions/releaseTrunc"
},
"prefixTrunc": {
"$ref": "#/definitions/prefixTrunc"
},
"labels": {
"$ref": "#/definitions/labels"
},
Expand Down Expand Up @@ -406,6 +394,12 @@
"resources": {
"$ref": "#/definitions/resources"
},
"releaseTrunc": {
"$ref": "#/definitions/releaseTrunc"
},
"prefixTrunc": {
"$ref": "#/definitions/prefixTrunc"
},
"affinity": {
"$ref": "#/definitions/affinity"
},
Expand Down

0 comments on commit ecfdcfb

Please sign in to comment.