npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@altech-hk/helm-gen

v0.1.9

Published

CLI tool to generate Kubernetes Helm charts

Downloads

371

Readme

Helm Chart Generator CLI

npm version

A command-line interface tool to quickly generate Kubernetes Helm chart templates with best practices.

Overview

This CLI tool helps developers quickly scaffold a Helm chart structure with commonly needed templates and configurations. It generates a complete Helm chart setup based on user inputs and best practices.

Installation

npm install -g @altech-hk/helm-gen

Usage

Creating a New Helm Chart

To create a new chart, run:

helm-gen create

The CLI will walk you through the following steps:

  1. Chart Name

    • Enter your chart name (e.g., "my-service")
    • Must contain only lowercase letters, numbers, and hyphens
  2. Application Type

    • Select application type:
      • web: For web applications
      • api: For backend services
  3. Environments

    • Choose target environments (comma-separated)
    • Available options: dev,uat,prod
    • Example: "dev,uat,prod"
  4. Port Configuration

    • Enter the application port (1-65535)
    • Default: 8080
  5. Container Registry Settings

    • Registry URL (optional)
    • Repository name (optional)
    • Image tag (optional)
  6. Autoscaling Configuration

    • Enable/disable HPA
    • Set minimum replicas
    • Set maximum replicas
  7. Health Check Paths

    • Readiness probe path
    • Liveness probe path
    • Default paths:
      • Web: "/"
      • API: "/actuator/health/readiness" and "/actuator/health/liveness"

Generated Structure

The command will create a new directory with the following structure:

my-service/
├── Chart.yaml              # Chart metadata
├── values.dev.yaml         # Development environment values
├── values.uat.yaml         # UAT environment values
├── values.prod.yaml        # Production environment values
└── templates/
    ├── deployment.yaml     # Kubernetes Deployment
    ├── service.yaml        # Kubernetes Service
    ├── configmap.yaml      # ConfigMap for configuration
    ├── secret.yaml         # Secret for sensitive data
    ├── hpa.yaml            # Horizontal Pod Autoscaler
    └── cron-jobs.yaml      # Scheduled jobs configuration

Example

$ helm-gen create

? What is your chart name? my-service
? Select application type: api
? Enter environments (comma-separated): dev,uat,prod
? Enter application port: 8080
? Enter container registry URL: registry.example.com
? Enter repository name: my-team/my-service
? Enter image tag: latest

This will generate a complete Helm chart with all necessary templates and configurations for your application.

Features

  • Generate complete Helm chart structure
  • Support multiple environments (dev, uat, prod)
  • Include common K8s resources:
    • Deployment
    • Service
    • ConfigMap
    • Secret
    • HPA (Horizontal Pod Autoscaler)
    • CronJobs for scheduled tasks
  • Customizable templates with common variables
  • Built-in best practices for K8s deployments
  • Support for HTTP-based scheduled jobs with retry mechanism

Cron Jobs Configuration

You can define scheduled jobs in your values file:

jobs:
  daily-cleanup:
    schedule: "0 0 * * *"
    method: POST
    endpoint: /api/cleanup
  weekly-report:
    schedule: "0 0 * * 0"
    method: GET
    endpoint: /api/generate-report

Each job supports:

  • Custom schedule using cron syntax
  • HTTP method (GET, POST, etc.)
  • Endpoint configuration
  • Automatic retry mechanism (3 attempts)
  • Success/failure history management

Core Helm Setup for ArgoCD

To set up a core Helm chart for ArgoCD infrastructure, run:

helm-gen setup-core

The CLI will walk you through the following steps:

  1. Environment Setup

    • Project namespace
    • Environment (dev/uat/prod)
    • Domain settings
  2. Ingress Configuration

    • TLS certificate settings
    • Host configurations for:
      • API Gateway
      • ArgoCD
      • Web (Coming Soon)
      • Other services (Coming Soon)
  3. Service Configuration

    • Backend services paths and ports
    • Frontend applications settings (Coming Soon)
    • Monitoring tools setup (Coming Soon)

The command will generate a complete core Helm chart with:

  • Ingress configurations for all services
  • TLS certificate setup
  • ArgoCD configurations
  • Environment-specific values