-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from petermorrowdev/feature/explicit-k8s-resou…
…rces Feature/explicit k8s resources
- Loading branch information
Showing
133 changed files
with
17,093 additions
and
747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
(cd kubernetes && git checkout master -q) | ||
(cd kubernetes && git checkout master -q && git pull -q) | ||
|
||
function gen_k8s() { | ||
local version="$1" | ||
local version_module="$2" | ||
(cd kubernetes && git checkout $version -q) | ||
rm -rf gybe/kubernetes/$version_module | ||
python codegen/generate_k8s.py $version_module | ||
python -m gybe.codegen $version_module | ||
ruff check --quiet --fix gybe/k8s/v* | ||
ruff format --quiet gybe/k8s/v* | ||
(cd kubernetes && git checkout master -q) | ||
} | ||
|
||
# https://kubernetes.io/releases/ | ||
gen_k8s 'v1.26.3' 'v1_26' | ||
gen_k8s 'v1.27.9' 'v1_27' | ||
gen_k8s 'v1.28.5' 'v1_28' | ||
gen_k8s 'v1.29.0' 'v1_29' | ||
gen_k8s 'v1.26.15' 'v1_26' | ||
gen_k8s 'v1.27.16' 'v1_27' | ||
gen_k8s 'v1.28.12' 'v1_28' | ||
gen_k8s 'v1.29.7' 'v1_29' | ||
gen_k8s 'v1.30.3' 'v1_30' | ||
|
||
(cd kubernetes && git checkout master -q) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
"""A simple YAML transpilation tool for rendering kubernetes manifests""" | ||
|
||
__version__ = '0.3.1' | ||
__version__ = '0.3.2' | ||
|
||
|
||
from typing import List | ||
|
||
from gybe import k8s | ||
from gybe.decorators import transpiler | ||
|
||
Manifest = List[k8s.K8sSpec] | ||
from gybe.decorators import Manifest, transpiler | ||
|
||
__all__ = ['k8s', 'Manifest', 'transpiler'] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Generate gybe k8s modules.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
"""Run codegen.""" | ||
|
||
from gybe.codegen.cli import main | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""gybe.k8s codegen cli""" | ||
|
||
import argparse | ||
|
||
from gybe.codegen.k8s_modules import write_module | ||
|
||
|
||
def main(): | ||
"""Run gybe.k8s code generator cli""" | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('k8s_version_module') | ||
args = parser.parse_args() | ||
write_module(args.k8s_version_module) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.