Commit Graph

161 Commits

Author SHA1 Message Date
metal3d 6aaeda7a3c chore(modernize): use iterator 2025-08-03 14:13:57 +02:00
metal3d 0b3f7b2b5c chore(code): remove dead code 2025-08-03 14:13:42 +02:00
metal3d 136478aff7 fix(configmap): File from the root of project ends by a dash
fixes #150

If we mount a file from the root of project, the names ends by a dash.
That makes helm failing to install the package.
2025-08-03 10:20:11 +02:00
metal3d f2b5c16e71 fix(katenaryfile): Schema is broken without json annotation
We need to add json annotation. The yaml annoation is not enought when
generating the schema.
2025-07-15 21:24:17 +02:00
metal3d afbd6fc1ac fix(katenaryfile): Fix parsing katenary file
It seems that "json" annotation fails to get dashed names (like
configmap-files). That means that all labels in katernay.yaml file
couldn't be parsed.

Using `yaml` annotaiton fixes the problem. Fixes #144.
2025-07-15 21:13:22 +02:00
metal3d ce479629f6 fix(service): Fixes naming service ports
- ports should be named "port-XXX" with XXX to be the port number if the
port name cannot be discovered
- it follows what we do in Deployment objects
- this should fix #132
2025-07-13 15:02:26 +02:00
metal3d 5f5cd0268a fix(deployment): Missed the command from compose file
Fixes #133
2025-07-13 00:07:07 +02:00
metal3d 2307ad667e chore(dev): changed how to test version
- force release version check to use "v" (or not) as first character
- one line condtion
2025-07-11 09:17:33 +02:00
metal3d 8582010d90 fix(versionning): Fix version
Version should be x.y.z for releases. It makes things homogenous for
debian version (that needs a number as first char) and it is
semantically better.

At this time, the Makefile is OK. Maybe we don't need `PKG_VERSION`
later.
2025-07-10 15:15:25 +02:00
metal3d 69c528e5e0 chore(doc): Enhance documentation, fix typo 2025-07-07 22:10:27 +02:00
metal3d d163700147 feat(tests): Add tests for label structures 2025-07-06 15:31:21 +02:00
metal3d fa3befaa88 fix(tests): Fixing unbound error 2025-07-06 15:31:05 +02:00
metal3d e5b7c0d550 fix(doc): Respect Go recommandation in docstring 2025-07-06 15:30:31 +02:00
metal3d 9e4663cc6e chore(convention): Respect Go convention, package name should be lowercase 2025-07-06 14:34:16 +02:00
metal3d 7b875454cb feat(chore): use range over int
More readable range
2025-07-06 11:53:56 +02:00
metal3d 2da5d9df08 feat(chore): modernize code 2025-07-06 11:53:24 +02:00
metal3d a0eb3c0bb6 fix(doc): Fix doc string 2025-07-06 11:52:48 +02:00
metal3d 09c2c86d59 fix(permission): globalize and fixes
Permission alert frop OpenGrep is wrong, as the directory must use 0755.
To make things working and to ease futur changes, I set the default
permission in a constant.
2025-07-06 11:39:19 +02:00
metal3d a409a1347e feat(chore): rename variable 2025-07-06 10:51:25 +02:00
metal3d 8999aabc21 fix(security): Change access rights on generated directories
Ppengrep complains, it is right.
2025-07-06 10:51:09 +02:00
metal3d 14e8907437 feat(doc): Add package doc for labels 2025-07-06 10:49:54 +02:00
metal3d a66fec07e1 chore(optim): Optimizing some piece of code
Simply use modern methods
2025-06-26 23:57:19 +02:00
metal3d a3d1e9342f fix(doc): Follow Go recommendations 2025-06-26 23:56:06 +02:00
metal3d 72bc88661a fix(convension): Fix APIVersion
Sonarlint complains about "ApiVersion"
2025-06-26 23:37:20 +02:00
metal3d e2b897eb9d fix(generation): Fix container name
Container names were built using the service name. We didn't checked the
name and leave underscores inside.

This commit does:
- fix all service and rename containers (`container_name`)
- use `ContainerName` everywhere we need to get the container by name

See #106
2025-06-26 23:37:20 +02:00
metal3d 9fcce059e5 fix(doc): Fixing method name in comment 2025-06-26 23:18:11 +02:00
metal3d b143f743ef feat(chore): Add tests and use "any" instead of "inteface" 2025-06-04 15:17:26 +02:00
metal3d a8341a9b44 feat(tests): .Close() can be "unchecked" 2025-06-04 14:41:53 +02:00
metal3d def5d097a4 feat(tests): Fixing linter problems
Using golangci-lint
2025-06-04 14:29:13 +02:00
metal3d b5f62d43af fix(test): Fix non constant string format
Go 1.24 made several changes about formatting messages:
https://tip.golang.org/doc/go1.24#vet

These changes make tests (and vet) craching.

The fix is to use a string format and give error message as argument.
2025-06-04 09:46:13 +02:00
metal3d 9220dc3278 fix(test): Fix bad test
We were failing if the test is OK...
2025-06-04 09:24:33 +02:00
metal3d 9ef961ae7c issue(107): Really drop ignored services
It's, at this time, not needed to keep the ignored services inside the
project. Maybe later someone will ask to keep env variables, or
something like this... But at this time, it's a source of bug like #107.
2025-01-19 23:38:17 +01:00
metal3d fe6663f9f4 issue(106): Fix service names with dashes
See #106, I need to add a test on "same-pod" label.
2025-01-19 23:24:09 +01:00
metal3d 41a4292939 chore(test): enhance error handling and avoid repetitions 2024-12-17 18:22:45 +01:00
metal3d 17b6ea51af fix(doc): Bad variable name in secrets 2024-12-05 07:23:58 +01:00
metal3d 5c939383be chore(tls): Add secretName to the values
The seret name for TLS wasn't editable, it may be useful to change it
when we generate TLS certificates for specific installation.
2024-12-05 06:43:43 +01:00
metal3d e574a2e2a8 chore(errors): Better error management
We must remove all "Fatal" calls and use errors instead, to be returned
and managed globally.
This is the first step, but it is, at this time, a real problem. Tests
are complicated without this.
2024-12-03 14:37:13 +01:00
metal3d eb760d4299 test(subdir): Add globally mount binary files 2024-12-03 14:03:36 +01:00
metal3d d458cdbd73 chore(configmap): Manage binary data in configMap
We should be now able to detect and manage binary files to be injected
in configMaps
2024-12-03 13:50:58 +01:00
metal3d bb1354e228 doc(refacto): Rewrite label types, and format table
- I prefer using Go types, more explicit in my humble opinion
- The markdown table wasn't well-formed
2024-11-26 23:42:39 +01:00
metal3d 9f1f6c7e78 test(version): cover the version function 2024-11-26 17:53:43 +01:00
metal3d 441be30720 chore(version): Get the version following how katenary is installed 2024-11-26 16:47:37 +01:00
metal3d 3b4dade699 chore(label): new label "values-from"
This labels allow to use some environment variables from another service
and use the configMap / secret instead of the original value. This is
useful to avoid duplication of values for several variables.
2024-11-26 16:11:12 +01:00
metal3d 4f0298c0a9 test(utils): Add some tests 2024-11-26 16:09:12 +01:00
metal3d ad16005091 test(schema): Add test on ingress 2024-11-25 12:10:41 +01:00
metal3d 41a0dc58a5 chore(typo): fix some typos 2024-11-25 12:00:04 +01:00
metal3d dc34d32c5c test(secrets): add tests 2024-11-25 11:54:38 +01:00
metal3d 36984e3825 chore(clean): remove unused functions 2024-11-25 11:54:18 +01:00
metal3d 046410a5ec chore(refacto): use utils package 2024-11-25 11:54:00 +01:00
metal3d 827b5bc830 test(values): add map-env and exchange volumes tests 2024-11-22 16:23:00 +01:00