Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Develop to prepare V3 #77

Merged
merged 98 commits into from
Oct 29, 2024
Merged

Merge Develop to prepare V3 #77

merged 98 commits into from
Oct 29, 2024

Conversation

metal3d
Copy link
Owner

@metal3d metal3d commented Oct 29, 2024

This is a new version of Katenary, using V3 labels.

This version is a refactoring and rewriting of the vast majority of the original operation.

  • no more templates, use of “go-compose” and “k8s.io” packages to create objects
  • better management of labels and their structures
  • the “values.yaml” file generated is self-documenting
  • management of statics files, mounted in configMaps, to enable configuration deployment
  • and many, many, many bug fixes...

This is the next-gen of Katenary
- better integration of compose file
- needed to impose to not resolve path in "parser" package to get them
  from the working directory. This should be improved later
Thanks for the given time.
One more time, thanks a lot for the adventure
katenaryLabelsDoc.yaml is a file that is used to generate the documentation, it is not a file that should be ignored.
This file was ignored by error in .gitignore
The code was fetching a simple object while it should have been fetching an array of objects.
WIP: this breaks the -c flag, but it's a start

We can now use compose.katenary.yaml file as a default override.
This is a hack to force the compose package to read all files provided
with the -c flag.
If "depends_on" is set, we need to ensure that the target service has
got declared ports. It's necessary, at this time, to ensure the target
is started (with an initContainer)

As soon as Kubernetes proposes a better check, we will be able to fix
this requirement.
I prefer to limit 120 columns. A .nvimrc will be proposed to avoid
having to wide markdown lines.
Editorconfig seems to not allow the line wrapping. I'm using neovim with
`set exrc`, so this local file is used to fix some behaviors.

If a contributor can give solutions for a global configuration that
works everywhere...
Using gofumpt. Add documentation.
Some fixes on type checking and const icon type declaration.
It useless to use the composed struct field as the current "object" is
composed by this one. Get Name field directly. (Thanks staticcheck)
The container was not merged to the target deployment. It necessary to
make one more loop to apply the container + remove the source
deployment.
- better gomarkdown generation that now fixed the escaped strings, no
  need to use pandoc anymore
- added workflow image
- upgraded versions of mkdocs requirements
- changed variables that was uppercased, that's not OK for linters
- cleanup some documentation
- remove the "/" in label prefix, a function is now used to get the
  complete label (`labelName()`)
- some cleanup in tpl files, and so on...
Signed-off-by: Patrice Ferlet <metal3d@gmail.com>
We were using `yaml.Unmarshal` on basic types or inline structs. This
was not efficient and not clear to defined what we expect in labels.
We now use types to unmarshal the labels.

Only the `values` label is, at this time, parsed by GetValuesFromLabel
because this `utils` function is clearly a special case.
Because the linting makes the dependency update. We will need to split
linting and dep update later.
- reduce complexity
- use better tools to format the code
- add more tests
- and too many things to list here

We are rewriting for V3, so these commits are sometimes big and not
fully detailed. Of course, further work will be more documented.
Many fixes and enhancements:

- Add icon option
- Add env file managment
- Ordering compose parsing options
- Fix path with underscores
- Fix image and tag discovery
- Better documentation for labels
Use markdownlint / marksman in your editor please
Use valid names and factorize some constants checks
- upgraded mkdocs and dependencise (+ add mermaid)
- linted markdown
- add more details
We badly set a "tpl string" in values.yaml file for "values" labels set
in compose.yaml file.
Formatter changed the import order
In the health-check label, we now need to specify the kind of check to
do - in the expected form from Kubernetes specification.
The value in hostname in values file can be a templated string. So, we
should execute the content.
Underscores are forbidden by Kubernetes (should be a valid URL string),
we replace "_" by "-" in names, and we leave the values file using the
original name. So a volume named "foo_bar" in compose file, is
registered as "foo_bar" in the values file, but "foo-bar" is used as
volume name in deployments, volume claims, ...
Warning given by sonarlint, saves a few bytes.
@metal3d metal3d merged commit 6023ca4 into master Oct 29, 2024
2 checks passed
Copy link

codecov bot commented Oct 29, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant