Skip to content

Add values.schema.json #36

Draft
seth-acuitymd wants to merge 4 commits into
varnish:mainfrom
seth-acuitymd:values-schema-initial
Draft

Add values.schema.json #36
seth-acuitymd wants to merge 4 commits into
varnish:mainfrom
seth-acuitymd:values-schema-initial

Conversation

@seth-acuitymd
Copy link
Copy Markdown

@seth-acuitymd seth-acuitymd commented Aug 26, 2025

Adding a values.schema.json file for validating the values.yaml

Still a work in progress but should be done soon!

Will close #17

@seth-acuitymd
Copy link
Copy Markdown
Author

seth-acuitymd commented Aug 26, 2025

Will fix the issues failing the tests and mark this as Ready for review !

Comment thread varnish-cache/values.yaml
# command:
# - sh -c "sleep 3600"

# Declares the extra sidecar containers to run with Varnish pods. Can be set as either
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this as these containers don't appear (will double check) to be configured to run as "true" sidecar containers (initContainers.restartPolicy: always)

I'd love to open up a follow up PR to implement the ability to specify extra containers to run as sidecars!

Comment thread varnish-cache/values.yaml
Comment on lines -518 to -526
# Configures a probe for checking if a Pod has started.
startupProbe: {}
#startupProbe:
# initialDelaySeconds: 5
# periodSeconds: 10
# timeoutSeconds: 1
# successThreshold: 1
# failureThreshold: 3

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a duplicate of the block on lines 493-499

Comment on lines +121 to +123
"description": "sets the deployment kind (Deployment, StatefulSet or DaemonSet)",
"type": "string",
"pattern": "^(Deployment|StatefulSet|DaemonSet)$"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally didn't have Daemonset set here - unsure if this will work or if I should exclide the pattern for this key

"clusterIP": {
"description": "whether to attach a cluster IP to the service",
"type": "string",
"pattern": "^$|^(?:([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gross regex should validate for IPV4 address or an empty string, can remove, or come up with a worse one for IPV6 😆

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to come up with one for IPv6 as well that'd be awesome, but for now this is nice.
Regex is inherently gross, so you just gotta make the best out of it 😉

@seth-acuitymd
Copy link
Copy Markdown
Author

Ahh I see my issue, new to bats so I'll look into that and figure out what I goofed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provides values.yaml schema

2 participants