Skip to content

Instantly share code, notes, and snippets.

@coordt
Created October 7, 2022 11:48
Show Gist options
  • Select an option

  • Save coordt/578b3cceb31d65cf664ee00f3c6a410e to your computer and use it in GitHub Desktop.

Select an option

Save coordt/578b3cceb31d65cf664ee00f3c6a410e to your computer and use it in GitHub Desktop.

Revisions

  1. coordt created this gist Oct 7, 2022.
    699 changes: 699 additions & 0 deletions helm_values_schema.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,699 @@
    {
    "title": "Values",
    "description": "Basic contents of a Values file.",
    "type": "object",
    "properties": {
    "defaultComponent": {
    "title": "Defaultcomponent",
    "description": "The default configurations of a component, if not overridden.",
    "allOf": [
    {
    "$ref": "#/definitions/DefaultComponent"
    }
    ]
    },
    "podSecurityContext": {
    "title": "Podsecuritycontext",
    "description": "Defines privilege and access control settings for a pod.",
    "type": "object"
    },
    "securityContext": {
    "title": "Securitycontext",
    "description": "Defines privilege and access control settings for a container.",
    "type": "object"
    },
    "serviceAccount": {
    "title": "Serviceaccount",
    "description": "Configuration for the service account for this chart.",
    "allOf": [
    {
    "$ref": "#/definitions/ServiceAccount"
    }
    ]
    },
    "labels": {
    "title": "Labels",
    "description": "Key/values added to every object when available.",
    "type": "object"
    },
    "imagePullSecrets": {
    "title": "Imagepullsecrets",
    "description": "An optional list of references to secrets in the same namespace to use for pulling any of the images.",
    "type": "array",
    "items": {
    "$ref": "#/definitions/NamedItem"
    }
    },
    "sidecar": {
    "title": "Sidecar",
    "description": "The sidecars configuration.",
    "allOf": [
    {
    "$ref": "#/definitions/SidecarConfig"
    }
    ]
    },
    "ingress": {
    "title": "Ingress",
    "description": "Configuration for managing external access to the services in a cluster",
    "allOf": [
    {
    "$ref": "#/definitions/Ingress"
    }
    ]
    },
    "components": {
    "title": "Components",
    "description": "Components can be defined in the values file or an independent file.",
    "type": "array",
    "items": {
    "$ref": "#/definitions/Component"
    }
    }
    },
    "required": [
    "defaultComponent",
    "podSecurityContext",
    "securityContext",
    "serviceAccount"
    ],
    "definitions": {
    "ServiceAccount": {
    "title": "ServiceAccount",
    "description": "Configuration for a Service Account.",
    "type": "object",
    "properties": {
    "create": {
    "title": "Create",
    "description": "Specifies whether a service account should be created.",
    "default": true,
    "type": "boolean"
    },
    "annotations": {
    "title": "Annotations",
    "description": "Annotations to add to the service account.",
    "type": "object"
    },
    "name": {
    "title": "Name",
    "description": "The name of the service account to use. If not set and create is true, a name is generated using the .Release.Name",
    "default": "",
    "type": "string"
    }
    }
    },
    "ResourceConfig": {
    "title": "ResourceConfig",
    "description": "CPU and memory limits.",
    "type": "object",
    "properties": {
    "cpu": {
    "title": "Cpu",
    "description": "The number of CPUs. Partial CPUs are specified in 1/1000 parts, with an 'm' suffix. '500m' is half a CPU.",
    "pattern": "^[0-9]+m?",
    "type": "string"
    },
    "memory": {
    "title": "Memory",
    "description": "The amount of memory in bytes.",
    "pattern": "^\\\\d+[.]?\\\\d*(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)?$",
    "type": "string"
    }
    },
    "required": [
    "cpu",
    "memory"
    ]
    },
    "Autoscaling": {
    "title": "Autoscaling",
    "description": "HorizontalPodAutoscale parameters.",
    "type": "object",
    "properties": {
    "enabled": {
    "title": "Enabled",
    "default": false,
    "type": "boolean"
    },
    "minReplicas": {
    "title": "Minreplicas",
    "description": "The minimum number of replicas to deploy using a Horizontal Pod Autoscaler.",
    "default": 1,
    "exclusiveMinimum": 0,
    "type": "integer"
    },
    "maxReplicas": {
    "title": "Maxreplicas",
    "description": "The maximum number of replicas to deploy using a Horizontal Pod Autoscaler.",
    "default": 10,
    "exclusiveMinimum": 0,
    "type": "integer"
    },
    "targetCPUUtilizationPercentage": {
    "title": "Targetcpuutilizationpercentage",
    "default": 80,
    "exclusiveMinimum": 0,
    "exclusiveMaximum": 100,
    "type": "integer"
    },
    "targetMemoryUtilizationPercentage": {
    "title": "Targetmemoryutilizationpercentage",
    "default": 80,
    "exclusiveMinimum": 0,
    "exclusiveMaximum": 100,
    "type": "integer"
    },
    "additionalMetrics": {
    "title": "Additionalmetrics",
    "description": "See https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#scaling-policies",
    "examples": [
    "{\"type\": \"Pods\", \"pods\": {\"metricName\": \"kafka_consumergroup_lag\", \"targetAverageValue\": 5"
    ],
    "type": "array",
    "items": {}
    },
    "behavior": {
    "title": "Behavior",
    "examples": [
    "{\"scaleUp\": {\"stabilizationWindowSeconds\": 180, \"selectPolicy\": \"Max\"}}"
    ],
    "type": "object"
    }
    }
    },
    "Service": {
    "title": "Service",
    "type": "object",
    "properties": {
    "enabled": {
    "title": "Enabled",
    "default": true,
    "type": "boolean"
    },
    "type": {
    "title": "Type",
    "default": "ClusterIP",
    "enum": [
    "NodePort",
    "ClusterIP",
    "LoadBalancer",
    "none"
    ],
    "type": "string"
    },
    "annotations": {
    "title": "Annotations",
    "type": "object"
    }
    }
    },
    "Port": {
    "title": "Port",
    "description": "Ports to expose on the container.",
    "type": "object",
    "properties": {
    "name": {
    "title": "Name",
    "description": "The IANA service name. https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml",
    "examples": [
    "http",
    "prometheus",
    "postgresql"
    ],
    "pattern": "[a-zA-Z][-a-zA-Z0-9]{0,13}[a-zA-Z0-9]?",
    "type": "string"
    },
    "containerPort": {
    "title": "Containerport",
    "description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536",
    "minimum": 1,
    "maximum": 65535,
    "type": "integer"
    },
    "hostPort": {
    "title": "Hostport",
    "description": "Number of port to expose on the host. If specified, this is linked to a Service.",
    "minimum": 1,
    "maximum": 65535,
    "type": "integer"
    }
    },
    "required": [
    "name",
    "containerPort"
    ]
    },
    "DefaultComponent": {
    "title": "DefaultComponent",
    "description": "The base configuration for a component.",
    "type": "object",
    "properties": {
    "serviceAccount": {
    "title": "Serviceaccount",
    "description": "The configuration for a service account.",
    "allOf": [
    {
    "$ref": "#/definitions/ServiceAccount"
    }
    ]
    },
    "env": {
    "title": "Env",
    "description": "Key-value pairs to insert into the environment of this component.",
    "type": "object",
    "additionalProperties": {
    "type": "string"
    }
    },
    "limits": {
    "title": "Limits",
    "description": "CPU and memory limits.",
    "allOf": [
    {
    "$ref": "#/definitions/ResourceConfig"
    }
    ]
    },
    "requests": {
    "title": "Requests",
    "description": "Request limits.",
    "allOf": [
    {
    "$ref": "#/definitions/ResourceConfig"
    }
    ]
    },
    "replicaCount": {
    "title": "Replicacount",
    "description": "Determine the fixed amount of pods unless autoscaling is enabled.",
    "minimum": 0,
    "type": "integer"
    },
    "autoscaling": {
    "title": "Autoscaling",
    "description": "Enable and configure the dynamically scaling of pods",
    "allOf": [
    {
    "$ref": "#/definitions/Autoscaling"
    }
    ]
    },
    "service": {
    "title": "Service",
    "description": "Service configuration.",
    "allOf": [
    {
    "$ref": "#/definitions/Service"
    }
    ]
    },
    "ports": {
    "title": "Ports",
    "description": "Ports to expose.",
    "type": "array",
    "items": {
    "$ref": "#/definitions/Port"
    }
    },
    "readinessProbe": {
    "title": "Readinessprobe",
    "description": "Probe configuration so kubernetes knows this is ready.",
    "type": "object"
    },
    "livenessProbe": {
    "title": "Livenessprobe",
    "description": "Probe configuration so kubeernetes knows this is still alive.",
    "type": "object"
    }
    },
    "required": [
    "serviceAccount",
    "env",
    "limits",
    "requests",
    "replicaCount",
    "autoscaling",
    "service",
    "ports",
    "readinessProbe",
    "livenessProbe"
    ]
    },
    "NamedItem": {
    "title": "NamedItem",
    "description": "An item with a ``name`` attribute.",
    "type": "object",
    "properties": {
    "name": {
    "title": "Name",
    "type": "string"
    }
    },
    "required": [
    "name"
    ]
    },
    "VaultSecret": {
    "title": "VaultSecret",
    "description": "A vault secret config.",
    "type": "object",
    "properties": {
    "name": {
    "title": "Name",
    "type": "string"
    },
    "secretFile": {
    "title": "Secretfile",
    "description": "The name of the file to store on the container.",
    "type": "string"
    },
    "vaultPath": {
    "title": "Vaultpath",
    "description": "The vault path that contains the secret values.",
    "type": "string"
    }
    },
    "required": [
    "name",
    "secretFile",
    "vaultPath"
    ]
    },
    "CredentialsSidecar": {
    "title": "CredentialsSidecar",
    "description": "Configuration of the credentials sidecar",
    "type": "object",
    "properties": {
    "enabled": {
    "title": "Enabled",
    "type": "boolean"
    },
    "podAnnotations": {
    "title": "Podannotations",
    "type": "object"
    },
    "secrets": {
    "title": "Secrets",
    "type": "array",
    "items": {
    "$ref": "#/definitions/VaultSecret"
    }
    }
    },
    "required": [
    "enabled"
    ]
    },
    "EnabledItem": {
    "title": "EnabledItem",
    "description": "An item with an ``enabled`` attribute.",
    "type": "object",
    "properties": {
    "enabled": {
    "title": "Enabled",
    "type": "boolean"
    }
    },
    "required": [
    "enabled"
    ]
    },
    "SidecarConfig": {
    "title": "SidecarConfig",
    "description": "Sidecar configurations.",
    "type": "object",
    "properties": {
    "credentials": {
    "$ref": "#/definitions/CredentialsSidecar"
    },
    "gatekeeper": {
    "$ref": "#/definitions/EnabledItem"
    }
    }
    },
    "HTTPIngressPath": {
    "title": "HTTPIngressPath",
    "description": "Associates a path with a backend.",
    "type": "object",
    "properties": {
    "path": {
    "title": "Path",
    "description": "Path is matched against the path of an incoming request.",
    "pattern": "^\\/(.*)",
    "type": "string"
    },
    "pathType": {
    "title": "Pathtype",
    "description": "PathType determines the interpretation of the Path matching.",
    "enum": [
    "Exact",
    "Prefix",
    "ImplementationSpecific"
    ],
    "type": "string"
    },
    "serviceName": {
    "title": "Servicename",
    "description": "Name is the referenced service.",
    "type": "string"
    },
    "servicePort": {
    "title": "Serviceport",
    "description": "Port of the referenced service.",
    "type": "integer"
    }
    },
    "required": [
    "path",
    "pathType",
    "serviceName",
    "servicePort"
    ]
    },
    "HTTPIngressHosts": {
    "title": "HTTPIngressHosts",
    "description": "A list of http selectors pointing to backends.",
    "type": "object",
    "properties": {
    "host": {
    "title": "Host",
    "description": "the fully qualified domain name of a network host",
    "type": "string"
    },
    "paths": {
    "title": "Paths",
    "description": "A collection of paths that map requests to backends.",
    "type": "array",
    "items": {
    "$ref": "#/definitions/HTTPIngressPath"
    }
    }
    },
    "required": [
    "host",
    "paths"
    ]
    },
    "IngressTLS": {
    "title": "IngressTLS",
    "description": "TLS configuration.",
    "type": "object",
    "properties": {
    "secretName": {
    "title": "Secretname",
    "description": "SecretName is the name of the secret used to terminate TLS traffic on port 443.",
    "type": "string"
    },
    "hosts": {
    "title": "Hosts",
    "description": "Hosts are a list of hosts included in the TLS certificate.",
    "type": "array",
    "items": {
    "type": "string"
    }
    }
    },
    "required": [
    "secretName",
    "hosts"
    ]
    },
    "Ingress": {
    "title": "Ingress",
    "type": "object",
    "properties": {
    "annotations": {
    "title": "Annotations",
    "type": "object"
    },
    "hosts": {
    "title": "Hosts",
    "type": "array",
    "items": {
    "$ref": "#/definitions/HTTPIngressHosts"
    }
    },
    "tls": {
    "title": "Tls",
    "type": "array",
    "items": {
    "$ref": "#/definitions/IngressTLS"
    }
    },
    "className": {
    "title": "Classname",
    "description": "The name of an IngressClass cluster resource",
    "examples": [
    "nginx"
    ],
    "type": "string"
    }
    },
    "required": [
    "annotations",
    "hosts",
    "tls",
    "className"
    ]
    },
    "Image": {
    "title": "Image",
    "description": "Information about the image to use for the component.",
    "type": "object",
    "properties": {
    "repository": {
    "title": "Repository",
    "description": "The host and path to the image in the image repository.",
    "examples": [
    "artifactory.chrobinson.com:5050/datascience/foo-bar"
    ],
    "type": "string"
    },
    "tag": {
    "title": "Tag",
    "description": "The tag or version of the image in the image repository.",
    "type": "string"
    },
    "pullPolicy": {
    "title": "Pullpolicy",
    "default": "IfNotPresent",
    "enum": [
    "Always",
    "IfNotPresent",
    "Never"
    ],
    "type": "string"
    }
    },
    "required": [
    "repository",
    "tag"
    ]
    },
    "Component": {
    "title": "Component",
    "description": "A component's deployment information.",
    "type": "object",
    "properties": {
    "image": {
    "$ref": "#/definitions/Image"
    },
    "name": {
    "title": "Name",
    "description": "The name of the component, only lowercase, digits or dashes allowed, up to 63 characters.",
    "pattern": "^[a-z][-a-z0-9]{1,61}[a-z]$",
    "type": "string"
    },
    "command": {
    "title": "Command",
    "description": "Override the default docker container command.",
    "type": "array",
    "items": {
    "type": "string"
    }
    },
    "args": {
    "title": "Args",
    "description": "Arguments to pass to the docker container",
    "type": "array",
    "items": {
    "type": "string"
    }
    },
    "env": {
    "title": "Env",
    "description": "Key-value pairs to insert into the environment of this component.",
    "type": "object",
    "additionalProperties": {
    "type": "string"
    }
    },
    "limits": {
    "title": "Limits",
    "description": "CPU and memory limits.",
    "allOf": [
    {
    "$ref": "#/definitions/ResourceConfig"
    }
    ]
    },
    "requests": {
    "title": "Requests",
    "description": "Request limits.",
    "allOf": [
    {
    "$ref": "#/definitions/ResourceConfig"
    }
    ]
    },
    "replicaCount": {
    "title": "Replicacount",
    "description": "Determine the fixed amount of pods unless autoscaling is enabled.",
    "default": 1,
    "minimum": 0,
    "type": "integer"
    },
    "autoscaling": {
    "title": "Autoscaling",
    "description": "Enable and configure the dynamically scaling of pods",
    "allOf": [
    {
    "$ref": "#/definitions/Autoscaling"
    }
    ]
    },
    "service": {
    "title": "Service",
    "description": "Service configuration.",
    "allOf": [
    {
    "$ref": "#/definitions/Service"
    }
    ]
    },
    "ports": {
    "title": "Ports",
    "description": "Ports to expose.",
    "type": "array",
    "items": {
    "$ref": "#/definitions/Port"
    }
    },
    "readinessProbe": {
    "title": "Readinessprobe",
    "description": "Probe configuration so kubernetes knows this is ready.",
    "type": "object"
    },
    "livenessProbe": {
    "title": "Livenessprobe",
    "description": "Probe configuration so kubeernetes knows this is still alive.",
    "type": "object"
    }
    },
    "required": [
    "image",
    "name"
    ]
    }
    }
    }