Skip to content

Collection of pre-commit hooks for simplified management of kubernetes resources. Especially useful for gitops repos

License

Notifications You must be signed in to change notification settings

Gridness/k8s-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Hooks

Dependabot Updates

This repository contains reusable Kubernetes-related Git hooks that simplify management of k8s resources manifests. Particularly useful for any gitops repositories

Available Hooks

Kubeseal Secrets Hook

This pre-commit hook scans your Git repository for secret files matching a configurable pattern and creates sealed secrets using kubeseal. It ensures that all secrets are encrypted before being committed, enhancing security and compliance.

You can specify regex pattern by which the script will look for secrets files in your repo directory in the hook args section of your pre-commit config

Usage

Integrate the Kubeseal Hook in Your Project

  1. Add the following configuration to your project’s .pre-commit-config.yaml:
repos:
  - repo: https://github.com/Gridness/k8s-hooks
    rev: 1.0          # or a specific tag/commit
    hooks:
      - id: hook-id   # id of the hook
        args: [""]    # list of args of the chosen hook
        files: [""]   # list of files the hook gonna run over (if supported)
  1. Install pre-commit hooks:
pre-commit install
  1. On each commit, the hook do it's job

Requirements

  • pre-commit framework installed in your local environment

Contributing

Contributions to add new hooks, improve existing ones, or fix issues are welcome! Please open issues or pull requests.

License

This repository is licensed under the MIT License. See LICENSE file for details

About

Collection of pre-commit hooks for simplified management of kubernetes resources. Especially useful for gitops repos

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages