All Projects → karuppiah7890 → helm-schema-gen

karuppiah7890 / helm-schema-gen

Licence: MIT license
So that you don't have to write values.schema.json by hand from scratch for your Helm 3 charts. [CURRENTLY NOT MAINTAINED]

Programming Languages

shell
77523 projects
go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to helm-schema-gen

hull
The incredible HULL - Helm Uniform Layer Library - is a Helm library chart to improve Helm chart based workflows
Stars: ✭ 66 (-36.54%)
Mutual labels:  json-schema, helm, helm-plugin
Helm Secrets
DEPRECATED A helm plugin that help manage secrets with Git workflow and store them anywhere
Stars: ✭ 1,129 (+985.58%)
Mutual labels:  helm, k8s
Pega Helm Charts
Orchestrate a Pega Platform™ deployment by using Docker, Kubernetes, and Helm to take advantage of Pega Platform Cloud Choice flexibility.
Stars: ✭ 58 (-44.23%)
Mutual labels:  helm, k8s
K8s
Kubernetes Helm Charts for the ORY ecosystem.
Stars: ✭ 127 (+22.12%)
Mutual labels:  helm, k8s
Geodesic
🚀 Geodesic is a DevOps Linux Distro. We use it as a cloud automation shell. It's the fastest way to get up and running with a rock solid Open Source toolchain. ★ this repo! https://slack.cloudposse.com/
Stars: ✭ 629 (+504.81%)
Mutual labels:  helm, k8s
Helmsman
Helm Charts as Code
Stars: ✭ 854 (+721.15%)
Mutual labels:  helm, k8s
Quiz
Example real time quiz application with .NET Core, React, DDD, Event Sourcing, Docker and built-in infrastructure for CI/CD with k8s, jenkins and helm
Stars: ✭ 100 (-3.85%)
Mutual labels:  helm, k8s
K3sup
bootstrap Kubernetes with k3s over SSH < 1 min 🚀
Stars: ✭ 4,012 (+3757.69%)
Mutual labels:  helm, k8s
Helm Secrets
Successor of zendesk/helm-secrets - A helm plugin that help manage secrets with Git workflow and store them anywhere
Stars: ✭ 165 (+58.65%)
Mutual labels:  helm, k8s
K8s Gitops
GitOps principles to define kubernetes cluster state via code. Community around [email protected] is on discord: https://discord.gg/7PbmHRK
Stars: ✭ 192 (+84.62%)
Mutual labels:  helm, k8s
Helmfiles
Comprehensive Distribution of Helmfiles for Kubernetes
Stars: ✭ 205 (+97.12%)
Mutual labels:  helm, k8s
Awesome Helm
Collaborative list of awesome helm charts and resources. PRs are welcome!
Stars: ✭ 543 (+422.12%)
Mutual labels:  helm, k8s
Charts
Helm charts for applications you run at home
Stars: ✭ 421 (+304.81%)
Mutual labels:  helm, k8s
Apps
Community App Catalog for TrueNAS SCALE
Stars: ✭ 32 (-69.23%)
Mutual labels:  helm, k8s
Ingressmonitorcontroller
A Kubernetes controller to watch ingresses and create liveness alerts for your apps/microservices in UptimeRobot, StatusCake, Pingdom, etc. – [✩Star] if you're using it!
Stars: ✭ 306 (+194.23%)
Mutual labels:  helm, k8s
Workflow
The open source PaaS for Kubernetes.
Stars: ✭ 1,291 (+1141.35%)
Mutual labels:  helm, k8s
K8s Tew
Kubernetes - The Easier Way
Stars: ✭ 269 (+158.65%)
Mutual labels:  helm, k8s
K8s For Docker Desktop
为Docker Desktop for Mac/Windows开启Kubernetes和Istio。
Stars: ✭ 3,863 (+3614.42%)
Mutual labels:  helm, k8s
Arkade
Open Source Kubernetes Marketplace
Stars: ✭ 2,343 (+2152.88%)
Mutual labels:  helm, k8s
helm-edit
Edit a Helm release
Stars: ✭ 109 (+4.81%)
Mutual labels:  helm, helm-plugin

helm schema gen plugin [ CURRENTLY NOT MAINTAINED ]

So that you don't have to write values.schema.json by hand from scratch for your Helm 3 charts

Helm plugin to generate JSON Schema for values yaml

Note about maintenance

I currently don't have the bandwidth to reply to issues, write code and review PRs. For now I recommend forking the repo and making changes and using the fork 😅

Code stuff

Nothing fancy about the code, all the heavy lifting is done by:

Install

The plugin works with both Helm v2 and v3 versions as it's agnostic to the Helm binary version

$ helm plugin install https://github.com/karuppiah7890/helm-schema-gen.git
karuppiah7890/helm-schema-gen info checking GitHub for tag '0.0.4'
karuppiah7890/helm-schema-gen info found version: 0.0.4 for 0.0.4/Darwin/x86_64
karuppiah7890/helm-schema-gen info installed ./bin/helm-schema-gen
Installed plugin: schema-gen

But note that the schema feature is present only in Helm v3 charts, so Helm chart still has to be v3, meaning - based on the Helm chart v3 spec. And the schema validation is only done in Helm v3. Read more in the Schema Files section of the Helm official docs.

Usage

The plugin works with both Helm v2 and v3 versions

Let's take a sample values.yaml like the below

replicaCount: 1

image:
  repository: nginx
  pullPolicy: IfNotPresent

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name:

podSecurityContext: {}
  # fsGroup: 2000

securityContext: {}
  # capabilities:
  #   drop:
  #   - ALL
  # readOnlyRootFilesystem: true
  # runAsNonRoot: true
  # runAsUser: 1000

service:
  type: ClusterIP
  port: 80

ingress:
  enabled: false
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  hosts:
    - host: chart-example.local
      paths: []
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  # limits:
  #   cpu: 100m
  #   memory: 128Mi
  # requests:
  #   cpu: 100m
  #   memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

Now if you use the plugin and pass the values.yaml to it, you will get the JSON Schema for the values.yaml

$ helm schema-gen values.yaml
{
    "$schema": "http://json-schema.org/schema#",
    "type": "object",
    "properties": {
        "affinity": {
            "type": "object"
        },
        "fullnameOverride": {
            "type": "string"
        },
        "image": {
            "type": "object",
            "properties": {
                "pullPolicy": {
                    "type": "string"
                },
                "repository": {
                    "type": "string"
                }
            }
        },
        "imagePullSecrets": {
            "type": "array"
        },
        "ingress": {
            "type": "object",
            "properties": {
                "annotations": {
                    "type": "object"
                },
                "enabled": {
                    "type": "boolean"
                },
                "hosts": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "host": {
                                "type": "string"
                            },
                            "paths": {
                                "type": "array"
                            }
                        }
                    }
                },
                "tls": {
                    "type": "array"
                }
            }
        },
        "nameOverride": {
            "type": "string"
        },
        "nodeSelector": {
            "type": "object"
        },
        "podSecurityContext": {
            "type": "object"
        },
        "replicaCount": {
            "type": "integer"
        },
        "resources": {
            "type": "object"
        },
        "securityContext": {
            "type": "object"
        },
        "service": {
            "type": "object",
            "properties": {
                "port": {
                    "type": "integer"
                },
                "type": {
                    "type": "string"
                }
            }
        },
        "serviceAccount": {
            "type": "object",
            "properties": {
                "create": {
                    "type": "boolean"
                },
                "name": {
                    "type": "null"
                }
            }
        },
        "tolerations": {
            "type": "array"
        }
    }
}

You can save it to a file like this

$ helm schema-gen values.yaml > values.schema.json

Issues? Feature Requests? Proposals? Feedback?

Note: I currently don't have the bandwidth to reply to issues, write code and review PRs. For now I recommend forking the repo and making changes and using the fork 😅

Put them all in GitHub issues 😁 I value every feedback. I really want to make sure that my tools help people and does not annoy people. I want my tools to enable people and not hinder them. I'll do my best to help you if you face any hindrance because of using my tools! :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].