Skip to content

Convert CRDs from GitHub automatically and build kcl modules

Notifications You must be signed in to change notification settings

DavidChevallier/CRDtoKCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRDtoKCL Auto Module converter

Build

git clone git@github.com:DavidChevallier/CRDtoKCL.git

Usage

1. GitHub URL and Module Name

./ -url <GitHub-URL> -name <Modulname> [-debug]
  • -url: The GitHub URL of the directory.
  • -name: Name of the module.
  • -debug: Enable debugging.

Example:

go run . -name "traefik" -url "https://github.com/traefik/traefik-helm-chart/tree/master/traefik/crds" -debug

2. Usage with a config file

go run . -config <Pfad zur JSON config> [-debug]
  • -config
  • -debug

Example:

go run . -config config.json -debug

config

{
    "moduleName": "fooobar",
    "crds": {
        "crd1": "https://raw.githubusercontent.com/DavidChevallier/repo/main/crds/crd1.yaml",
        "crd2": "https://raw.githubusercontent.com/DavidChevallier/repo/main/crds/crd2.yaml"
    }
}

Build Multiarch Docker Container

docker.com

docker buildx build --no-cache --platform linux/amd64,linux/arm64 -t dchevallier/crdtokcl:latest -t dchevallier/crdtokcl:v1.0.0 . --push

Use crdtokcl Docker Container in ZSH

function crdtokcl() {
    docker run --rm -v $(pwd):/app dchevallier/crdtokcl:latest "$@"
}