Commit Graph

21 Commits

Author SHA1 Message Date
cc1019b5a8 chore(refacto): fix secret and use katenary schema
- add possibility to use a katenary.yaml file to setup values
- fix secret generation
2024-11-18 17:12:12 +01:00
b09316b416 refactor(yaml): globalize fixups
The ToK8SYaml() function makes the job, it's now simpler to manage fixes
2024-11-09 14:18:27 +01:00
dd63bb6343 chore(fixes): Unwrap yaml before converting and fix volume name variable
2 fixes:

- the first problem to resolve is that some volume names can have "-" in
the name. We now replace them by "_"
- the second problem is that k8s.io library truncates the lines and so
we cannot split the files by lines. We now "unwrap" the result.

TODO: globalize the `yaml.Marshal()` code to our own specific function
2024-11-08 13:11:14 +01:00
d72f371c59 fix(generation): fix the volume var/path name
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, ...
2024-10-24 17:23:26 +02:00
918f1b845b Fix problems and adding functionnalities
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
2024-10-18 09:36:54 +02:00
4367a01769 Big refactorization
- 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.
2024-05-06 21:11:36 +02:00
d01a35e2d4 Use real types to parse labels
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.
2024-04-24 23:06:45 +02:00
f73d598bb4 Standardization
- 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...
2024-04-24 14:03:41 +02:00
49c1fa5fb0 Explain what happens 2024-04-23 10:10:58 +02:00
50975ae94a Fix static volume binding
It is possible there are many things like this to fix. I made too much
complexity on searching services in deployment while the map key is
enough to get the righ deployment for a compose service.

Need to check the "same-pod" possibilities later.
2024-04-23 08:05:00 +02:00
9621493343 Add resources in containers and values 2024-04-22 13:27:44 +02:00
d48fd2f911 make a better override + add more values (serviceAccount, nodeSelector...) 2024-04-21 16:34:21 +02:00
58d19cce52 Fix the chart app version 2024-04-19 22:12:09 +02:00
3c743fb135 Fixup hard problems on bound volumes
Recreated the method to bind local content to configMaps with subPath.
That simplify a few how we can bound files and not only directory
content.
2024-04-19 11:13:24 +02:00
45de7ab543 Fix samepod generation
The container was not merged to the target deployment. It necessary to
make one more loop to apply the container + remove the source
deployment.
2024-04-08 23:15:05 +02:00
984b50356a Do not pass by composed struct
It useless to use the composed struct field as the current "object" is
composed by this one. Get Name field directly. (Thanks staticcheck)
2024-04-05 07:58:37 +02:00
441b30a570 Code cleaning
Using gofumpt. Add documentation.
Some fixes on type checking and const icon type declaration.
2024-04-05 07:56:27 +02:00
9a3fc6a2b4 Fix "depends_on" check
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.
2024-04-03 22:22:48 +02:00
5d4f72e984 Fix unued variable, useless functions... 2024-04-03 21:33:26 +02:00
475a025d9e Go to Katenary V3
This is the next-gen of Katenary
2023-12-06 15:24:02 +01:00
b21c821086 Split source file 2022-06-22 09:54:41 +02:00