2 Commits

Author SHA1 Message Date
8c443ba402 chore(doc): regenerate the doc
All checks were successful
Go-Tests / tests (push) Successful in 2m37s
Go-Tests / sonar (push) Successful in 1m2s
2025-09-16 08:59:27 +02:00
a4647aa69a chore(code): Unecessary type checking
Changed how to use the type checking for label content.
2025-09-16 08:58:51 +02:00
4 changed files with 34 additions and 20 deletions

View File

@@ -78,7 +78,7 @@ tested some concepts.
You can help us in many ways. You can help us in many ways.
- The first things we really need, more than money, more than anything else, is to have feedback. If you use Katenary, - The first things we really need, more than money, more than anything else, is to have feedback. If you use Katenary,
if you have some issues, if you have some ideas, please open an issue on the [GitHub repository](https://github.com/Katenary/katenary). if you have some issues, if you have some ideas, please open an issue on [our repository](https://repo.katenary.io/Katenary/katenary).
- The second thing is to help us to fix issues. If you're a Go developer, or if you want to fix the documentation, - The second thing is to help us to fix issues. If you're a Go developer, or if you want to fix the documentation,
your help is greatly appreciated. your help is greatly appreciated.
- And then, of course, we need money, or sponsors. - And then, of course, we need money, or sponsors.
@@ -88,6 +88,8 @@ You can help us in many ways.
We will be happy to communicate your help by putting your logo on the website and in the documentation. You can sponsor We will be happy to communicate your help by putting your logo on the website and in the documentation. You can sponsor
us by giving us some money, or by giving us some time of your developers, or leaving us some time to work on the project. us by giving us some money, or by giving us some time of your developers, or leaving us some time to work on the project.
Please, contact us by email at [contact at katenary dot io](mailto:contact@katenary.io).
### If you're an individual ### If you're an individual
All main contributors[^3] will be listed on the website and in the documentation. All main contributors[^3] will be listed on the website and in the documentation.

View File

@@ -17,7 +17,7 @@ const DirectoryPermission = 0o755
``` ```
<a name="AsResourceName"></a> <a name="AsResourceName"></a>
## func [AsResourceName](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L197>) ## func [AsResourceName](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L198>)
```go ```go
func AsResourceName(name string) string func AsResourceName(name string) string
@@ -26,7 +26,7 @@ func AsResourceName(name string) string
AsResourceName returns a resource name with underscores to respect the kubernetes naming convention. It's the opposite of FixedResourceName. AsResourceName returns a resource name with underscores to respect the kubernetes naming convention. It's the opposite of FixedResourceName.
<a name="Confirm"></a> <a name="Confirm"></a>
## func [Confirm](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L165>) ## func [Confirm](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L166>)
```go ```go
func Confirm(question string, icon ...logger.Icon) bool func Confirm(question string, icon ...logger.Icon) bool
@@ -44,7 +44,7 @@ func CountStartingSpaces(line string) int
CountStartingSpaces counts the number of spaces at the beginning of a string. CountStartingSpaces counts the number of spaces at the beginning of a string.
<a name="EncodeBasicYaml"></a> <a name="EncodeBasicYaml"></a>
## func [EncodeBasicYaml](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L179>) ## func [EncodeBasicYaml](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L180>)
```go ```go
func EncodeBasicYaml(data any) ([]byte, error) func EncodeBasicYaml(data any) ([]byte, error)
@@ -53,7 +53,7 @@ func EncodeBasicYaml(data any) ([]byte, error)
EncodeBasicYaml encodes a basic yaml from an interface. EncodeBasicYaml encodes a basic yaml from an interface.
<a name="FixedResourceName"></a> <a name="FixedResourceName"></a>
## func [FixedResourceName](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L191>) ## func [FixedResourceName](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L192>)
```go ```go
func FixedResourceName(name string) string func FixedResourceName(name string) string
@@ -152,7 +152,7 @@ func TplValue(serviceName, variable string, pipes ...string) string
TplValue returns a string that can be used in a template to access a value from the values file. TplValue returns a string that can be used in a template to access a value from the values file.
<a name="WordWrap"></a> <a name="WordWrap"></a>
## func [WordWrap](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L160>) ## func [WordWrap](<https://repo.katenary.io/Katenary/katenary/blob/master/internal/utils/utils.go#L161>)
```go ```go
func WordWrap(text string, lineWidth int) string func WordWrap(text string, lineWidth int) string

View File

@@ -1,7 +1,7 @@
'\" t '\" t
.\" Automatically generated by Pandoc 3.1.11.1 .\" Automatically generated by Pandoc 3.1.11.1
.\" .\"
.TH "Katenary" "1" "2025-08-29" "mkdocs-manpage v2.0.1" "Katenary helm chart generator" .TH "Katenary" "1" "2025-09-15" "mkdocs-manpage v2.0.1" "Katenary helm chart generator"
.SH Basic Usage .SH Basic Usage
Basically, you can use \f[CR]katenary\f[R] to transpose a docker\-compose file (or any compose file compatible with \f[CR]podman\-compose\f[R] and \f[CR]docker\-compose\f[R]) to a configurable Helm Chart. Basically, you can use \f[CR]katenary\f[R] to transpose a docker\-compose file (or any compose file compatible with \f[CR]podman\-compose\f[R] and \f[CR]docker\-compose\f[R]) to a configurable Helm Chart.
This resulting helm chart can be installed with \f[CR]helm\f[R] command to your Kubernetes cluster. This resulting helm chart can be installed with \f[CR]helm\f[R] command to your Kubernetes cluster.
@@ -414,11 +414,11 @@ The file or directory is relative to the service directory.
.PP .PP
If it is a directory, all files inside it are added to the ConfigMap. If it is a directory, all files inside it are added to the ConfigMap.
.PP .PP
If the directory as subdirectories, so one configmap per subpath are created. If the directory as subdirectories, so one ConfigMap per sub\-path are created.
.PP .PP
Warning Warning
.PP .PP
It is not intended to be used to store an entire project in configmaps. It is not intended to be used to store an entire project in ConfigMaps.
It is intended to be used to store configuration files that are not managed by the application, like nginx configuration files. It is intended to be used to store configuration files that are not managed by the application, like nginx configuration files.
Keep in mind that your project sources should be stored in an application image or in a storage. Keep in mind that your project sources should be stored in an application image or in a storage.
.PP .PP
@@ -438,8 +438,13 @@ Create a cronjob from the service.
.PP .PP
This adds a cronjob to the chart. This adds a cronjob to the chart.
.PP .PP
The label value is a YAML object with the following attributes: \- command: the command to be executed \- schedule: the cron schedule (cron format or \[at]every where \[dq]every\[dq] is a duration like 1h30m, daily, hourly...) The label value is a YAML object with the following attributes:
\- rbac: false (optionnal), if true, it will create a role, a rolebinding and a serviceaccount to make your cronjob able to connect the Kubernetes API .IP \[bu] 2
command: the command to be executed
.IP \[bu] 2
schedule: the cron schedule (cron format or \[at]every where \[dq]every\[dq] is a duration like 1h30m, daily, hourly...)
.IP \[bu] 2
rbac: false (optionnal), if true, it will create a role, a rolebinding and a serviceaccount to make your cronjob able to connect the Kubernetes API
.PP .PP
\f[B]Example:\f[R] \f[B]Example:\f[R]
.IP .IP
@@ -555,7 +560,13 @@ a \f[CR]voumeMount\f[R] in the pod for \f[B]each container\f[R]
.IP \[bu] 2 .IP \[bu] 2
a \f[CR]initContainer\f[R] for each definition a \f[CR]initContainer\f[R] for each definition
.PP .PP
Fields: \- name: the name of the volume (manadatory) \- mountPath: the path where the volume is mounted in the pod (optional, default is \f[CR]/opt\f[R]) \- init: a command to run to initialize the volume with data (optional) Fields:
.IP \[bu] 2
name: the name of the volume (manadatory)
.IP \[bu] 2
mountPath: the path where the volume is mounted in the pod (optional, default is \f[CR]/opt\f[R])
.IP \[bu] 2
init: a command to run to initialize the volume with data (optional)
.PP .PP
Warning Warning
.PP .PP
@@ -734,7 +745,7 @@ Environment variables to be added to the values.yaml
.PP .PP
\f[B]Type\f[R]: \f[CR][]string or map[string]string\f[R] \f[B]Type\f[R]: \f[CR][]string or map[string]string\f[R]
.PP .PP
By default, all environment variables in the \[dq]env\[dq] and environment files are added to configmaps with the static values set. By default, all environment variables in the \[dq]env\[dq] and environment files are added to ConfigMaps with the static values set.
This label allows adding environment variables to the values.yaml file. This label allows adding environment variables to the values.yaml file.
.PP .PP
Note that the value inside the configmap is \f[CR]{{ tpl vaname . }}\f[R], so you can set the value to a template that will be rendered with the values.yaml file. Note that the value inside the configmap is \f[CR]{{ tpl vaname . }}\f[R], so you can set the value to a template that will be rendered with the values.yaml file.

View File

@@ -136,16 +136,17 @@ func GetValuesFromLabel(service types.ServiceConfig, LabelValues string) map[str
log.Printf("Error parsing label %s: %s", v, err) log.Printf("Error parsing label %s: %s", v, err)
log.Fatal(err) log.Fatal(err)
} }
for _, value := range labelContent { for _, value := range labelContent {
switch val := value.(type) { switch value := value.(type) {
case string: case string:
descriptions[val] = nil descriptions[value] = nil
case map[string]any: case map[string]any:
for k, v := range value.(map[string]any) { for k, v := range value {
descriptions[k] = &EnvConfig{Service: service, Description: v.(string)} descriptions[k] = &EnvConfig{Service: service, Description: v.(string)}
} }
case map[any]any: case map[any]any:
for k, v := range value.(map[any]any) { for k, v := range value {
descriptions[k.(string)] = &EnvConfig{Service: service, Description: v.(string)} descriptions[k.(string)] = &EnvConfig{Service: service, Description: v.(string)}
} }
default: default: