Linter additions and adding ingress controllers to the diagrams
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 4s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 14s

This commit is contained in:
2026-04-19 11:37:52 -07:00
parent 23b8a009e8
commit ce68e5ee36
2 changed files with 63 additions and 4 deletions

View File

@@ -7,8 +7,9 @@ from diagrams import Cluster
from diagrams import Diagram from diagrams import Diagram
from diagrams.k8s.compute import Pod from diagrams.k8s.compute import Pod
from diagrams.k8s.network import Service from diagrams.k8s.network import Service
from diagrams.custom import Custom from diagrams.k8s.network import Ingress
from diagrams.generic.compute import Rack from diagrams.generic.compute import Rack
from diagrams.generic.blank import Blank
from personal import Gitea from personal import Gitea
from personal import StaticSite from personal import StaticSite
@@ -21,7 +22,10 @@ if __name__ == '__main__':
git = Gitea('Gitea') >> nginx git = Gitea('Gitea') >> nginx
tmp = StaticSite('Temper Blog') >> nginx tmp = StaticSite('Temper Blog') >> nginx
dev = StaticSite('Dev Blog') >> nginx dev = StaticSite('Dev Blog') >> nginx
_ = nginx >> Blank()
with Cluster('Namespace - playground'): with Cluster('Namespace - playground'):
s = Pod('Sanity') >> Service('sanity.shockrah.xyz') ingress = Ingress('Nginx Controller')
u = Pod('Uptime') >> Service('uptime.shockrah.xyz') s = Pod('Sanity') >> Service('sanity.shockrah.xyz') >> ingress
p = Pod('Wiki') >> Service('wiki.shockrah.xyz') u = Pod('Uptime') >> Service('uptime.shockrah.xyz') >> ingress
p = Pod('Wiki') >> Service('wiki.shockrah.xyz') >> ingress
_ = ingress >> Blank()

View File

@@ -0,0 +1,55 @@
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 80
indent-width = 4
# Assume Python 3.10
target-version = "py310"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "single"