doc(fix): Regenerate the doc

This commit is contained in:
2024-11-08 13:13:27 +01:00
parent dd63bb6343
commit 5b51ba6d98
3 changed files with 73 additions and 54 deletions

View File

@@ -187,9 +187,10 @@ Health check to be added to the deployment.
```yaml ```yaml
labels: labels:
katenary.v3/health-check: |- katenary.v3/health-check: |-
httpGet: livenessProbe:
path: /health httpGet:
port: 8080 path: /health
port: 8080
``` ```
### katenary.v3/ignore ### katenary.v3/ignore

View File

@@ -98,7 +98,7 @@ func Helper(name string) string
Helper returns the \_helpers.tpl file for a chart. Helper returns the \_helpers.tpl file for a chart.
<a name="NewCronJob"></a> <a name="NewCronJob"></a>
## func [NewCronJob](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L29>) ## func [NewCronJob](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L28>)
```go ```go
func NewCronJob(service types.ServiceConfig, chart *HelmChart, appName string) (*CronJob, *RBAC) func NewCronJob(service types.ServiceConfig, chart *HelmChart, appName string) (*CronJob, *RBAC)
@@ -115,6 +115,15 @@ func Prefix() string
<a name="UnWrapTPL"></a>
## func [UnWrapTPL](<https://github.com/metal3d/katenary/blob/develop/generator/utils.go#L84>)
```go
func UnWrapTPL(in []byte) []byte
```
UnWrapTPL removes the line wrapping from a template.
<a name="ChartTemplate"></a> <a name="ChartTemplate"></a>
## type [ChartTemplate](<https://github.com/metal3d/katenary/blob/develop/generator/chart.go#L17-L20>) ## type [ChartTemplate](<https://github.com/metal3d/katenary/blob/develop/generator/chart.go#L17-L20>)
@@ -149,7 +158,7 @@ func NewConfigMap(service types.ServiceConfig, appName string, forFile bool) *Co
NewConfigMap creates a new ConfigMap from a compose service. The appName is the name of the application taken from the project name. The ConfigMap is filled by environment variables and labels "map\-env". NewConfigMap creates a new ConfigMap from a compose service. The appName is the name of the application taken from the project name. The ConfigMap is filled by environment variables and labels "map\-env".
<a name="NewConfigMapFromDirectory"></a> <a name="NewConfigMapFromDirectory"></a>
### func [NewConfigMapFromDirectory](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L131>) ### func [NewConfigMapFromDirectory](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L128>)
```go ```go
func NewConfigMapFromDirectory(service types.ServiceConfig, appName, path string) *ConfigMap func NewConfigMapFromDirectory(service types.ServiceConfig, appName, path string) *ConfigMap
@@ -158,7 +167,7 @@ func NewConfigMapFromDirectory(service types.ServiceConfig, appName, path string
NewConfigMapFromDirectory creates a new ConfigMap from a compose service. This path is the path to the file or directory. If the path is a directory, all files in the directory are added to the ConfigMap. Each subdirectory are ignored. Note that the Generate\(\) function will create the subdirectories ConfigMaps. NewConfigMapFromDirectory creates a new ConfigMap from a compose service. This path is the path to the file or directory. If the path is a directory, all files in the directory are added to the ConfigMap. Each subdirectory are ignored. Note that the Generate\(\) function will create the subdirectories ConfigMaps.
<a name="ConfigMap.AddData"></a> <a name="ConfigMap.AddData"></a>
### func \(\*ConfigMap\) [AddData](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L162>) ### func \(\*ConfigMap\) [AddData](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L159>)
```go ```go
func (c *ConfigMap) AddData(key, value string) func (c *ConfigMap) AddData(key, value string)
@@ -167,7 +176,7 @@ func (c *ConfigMap) AddData(key, value string)
AddData adds a key value pair to the configmap. Append or overwrite the value if the key already exists. AddData adds a key value pair to the configmap. Append or overwrite the value if the key already exists.
<a name="ConfigMap.AppendDir"></a> <a name="ConfigMap.AppendDir"></a>
### func \(\*ConfigMap\) [AppendDir](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L168>) ### func \(\*ConfigMap\) [AppendDir](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L165>)
```go ```go
func (c *ConfigMap) AppendDir(path string) func (c *ConfigMap) AppendDir(path string)
@@ -176,7 +185,7 @@ func (c *ConfigMap) AppendDir(path string)
AddFile adds files from given path to the configmap. It is not recursive, to add all files in a directory, you need to call this function for each subdirectory. AddFile adds files from given path to the configmap. It is not recursive, to add all files in a directory, you need to call this function for each subdirectory.
<a name="ConfigMap.AppendFile"></a> <a name="ConfigMap.AppendFile"></a>
### func \(\*ConfigMap\) [AppendFile](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L204>) ### func \(\*ConfigMap\) [AppendFile](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L201>)
```go ```go
func (c *ConfigMap) AppendFile(path string) func (c *ConfigMap) AppendFile(path string)
@@ -185,7 +194,7 @@ func (c *ConfigMap) AppendFile(path string)
<a name="ConfigMap.Filename"></a> <a name="ConfigMap.Filename"></a>
### func \(\*ConfigMap\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L222>) ### func \(\*ConfigMap\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L219>)
```go ```go
func (c *ConfigMap) Filename() string func (c *ConfigMap) Filename() string
@@ -194,7 +203,7 @@ func (c *ConfigMap) Filename() string
Filename returns the filename of the configmap. If the configmap is used for files, the filename contains the path. Filename returns the filename of the configmap. If the configmap is used for files, the filename contains the path.
<a name="ConfigMap.SetData"></a> <a name="ConfigMap.SetData"></a>
### func \(\*ConfigMap\) [SetData](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L232>) ### func \(\*ConfigMap\) [SetData](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L229>)
```go ```go
func (c *ConfigMap) SetData(data map[string]string) func (c *ConfigMap) SetData(data map[string]string)
@@ -203,7 +212,7 @@ func (c *ConfigMap) SetData(data map[string]string)
SetData sets the data of the configmap. It replaces the entire data. SetData sets the data of the configmap. It replaces the entire data.
<a name="ConfigMap.Yaml"></a> <a name="ConfigMap.Yaml"></a>
### func \(\*ConfigMap\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L237>) ### func \(\*ConfigMap\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/configMap.go#L234>)
```go ```go
func (c *ConfigMap) Yaml() ([]byte, error) func (c *ConfigMap) Yaml() ([]byte, error)
@@ -234,14 +243,14 @@ type ConvertOptions struct {
ChartVersion string ChartVersion string
Icon string Icon string
Profiles []string Profiles []string
EnvFiles []string
Force bool Force bool
HelmUpdate bool HelmUpdate bool
EnvFiles []string
} }
``` ```
<a name="CronJob"></a> <a name="CronJob"></a>
## type [CronJob](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L23-L26>) ## type [CronJob](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L22-L25>)
CronJob is a kubernetes CronJob. CronJob is a kubernetes CronJob.
@@ -253,7 +262,7 @@ type CronJob struct {
``` ```
<a name="CronJob.Filename"></a> <a name="CronJob.Filename"></a>
### func \(\*CronJob\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L115>) ### func \(\*CronJob\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L114>)
```go ```go
func (c *CronJob) Filename() string func (c *CronJob) Filename() string
@@ -264,7 +273,7 @@ Filename returns the filename of the cronjob.
Implements the Yaml interface. Implements the Yaml interface.
<a name="CronJob.Yaml"></a> <a name="CronJob.Yaml"></a>
### func \(\*CronJob\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L122>) ### func \(\*CronJob\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/cronJob.go#L121>)
```go ```go
func (c *CronJob) Yaml() ([]byte, error) func (c *CronJob) Yaml() ([]byte, error)
@@ -275,7 +284,7 @@ Yaml returns the yaml representation of the cronjob.
Implements the Yaml interface. Implements the Yaml interface.
<a name="CronJobValue"></a> <a name="CronJobValue"></a>
## type [CronJobValue](<https://github.com/metal3d/katenary/blob/develop/generator/values.go#L107-L112>) ## type [CronJobValue](<https://github.com/metal3d/katenary/blob/develop/generator/values.go#L108-L113>)
CronJobValue is a cronjob configuration that will be saved in values.yaml. CronJobValue is a cronjob configuration that will be saved in values.yaml.
@@ -310,7 +319,7 @@ func NewFileMap(service types.ServiceConfig, appName, kind string) DataMap
NewFileMap creates a new DataMap from a compose service. The appName is the name of the application taken from the project name. NewFileMap creates a new DataMap from a compose service. The appName is the name of the application taken from the project name.
<a name="Deployment"></a> <a name="Deployment"></a>
## type [Deployment](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L34-L41>) ## type [Deployment](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L34-L42>)
Deployment is a kubernetes Deployment. Deployment is a kubernetes Deployment.
@@ -322,7 +331,7 @@ type Deployment struct {
``` ```
<a name="NewDeployment"></a> <a name="NewDeployment"></a>
### func [NewDeployment](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L45>) ### func [NewDeployment](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L46>)
```go ```go
func NewDeployment(service types.ServiceConfig, chart *HelmChart) *Deployment func NewDeployment(service types.ServiceConfig, chart *HelmChart) *Deployment
@@ -331,7 +340,7 @@ func NewDeployment(service types.ServiceConfig, chart *HelmChart) *Deployment
NewDeployment creates a new Deployment from a compose service. The appName is the name of the application taken from the project name. It also creates the Values map that will be used to create the values.yaml file. NewDeployment creates a new Deployment from a compose service. The appName is the name of the application taken from the project name. It also creates the Values map that will be used to create the values.yaml file.
<a name="Deployment.AddContainer"></a> <a name="Deployment.AddContainer"></a>
### func \(\*Deployment\) [AddContainer](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L109>) ### func \(\*Deployment\) [AddContainer](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L111>)
```go ```go
func (d *Deployment) AddContainer(service types.ServiceConfig) func (d *Deployment) AddContainer(service types.ServiceConfig)
@@ -340,7 +349,7 @@ func (d *Deployment) AddContainer(service types.ServiceConfig)
AddContainer adds a container to the deployment. AddContainer adds a container to the deployment.
<a name="Deployment.AddHealthCheck"></a> <a name="Deployment.AddHealthCheck"></a>
### func \(\*Deployment\) [AddHealthCheck](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L154>) ### func \(\*Deployment\) [AddHealthCheck](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L156>)
```go ```go
func (d *Deployment) AddHealthCheck(service types.ServiceConfig, container *corev1.Container) func (d *Deployment) AddHealthCheck(service types.ServiceConfig, container *corev1.Container)
@@ -349,7 +358,7 @@ func (d *Deployment) AddHealthCheck(service types.ServiceConfig, container *core
<a name="Deployment.AddIngress"></a> <a name="Deployment.AddIngress"></a>
### func \(\*Deployment\) [AddIngress](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L183>) ### func \(\*Deployment\) [AddIngress](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L185>)
```go ```go
func (d *Deployment) AddIngress(service types.ServiceConfig, appName string) *Ingress func (d *Deployment) AddIngress(service types.ServiceConfig, appName string) *Ingress
@@ -358,7 +367,7 @@ func (d *Deployment) AddIngress(service types.ServiceConfig, appName string) *In
AddIngress adds an ingress to the deployment. It creates the ingress object. AddIngress adds an ingress to the deployment. It creates the ingress object.
<a name="Deployment.AddVolumes"></a> <a name="Deployment.AddVolumes"></a>
### func \(\*Deployment\) [AddVolumes](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L189>) ### func \(\*Deployment\) [AddVolumes](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L191>)
```go ```go
func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string) func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string)
@@ -367,7 +376,7 @@ func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string)
AddVolumes adds a volume to the deployment. It does not create the PVC, it only adds the volumes to the deployment. If the volume is a bind volume it will warn the user that it is not supported yet. AddVolumes adds a volume to the deployment. It does not create the PVC, it only adds the volumes to the deployment. If the volume is a bind volume it will warn the user that it is not supported yet.
<a name="Deployment.BindFrom"></a> <a name="Deployment.BindFrom"></a>
### func \(\*Deployment\) [BindFrom](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L213>) ### func \(\*Deployment\) [BindFrom](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L215>)
```go ```go
func (d *Deployment) BindFrom(service types.ServiceConfig, binded *Deployment) func (d *Deployment) BindFrom(service types.ServiceConfig, binded *Deployment)
@@ -376,7 +385,7 @@ func (d *Deployment) BindFrom(service types.ServiceConfig, binded *Deployment)
<a name="Deployment.DependsOn"></a> <a name="Deployment.DependsOn"></a>
### func \(\*Deployment\) [DependsOn](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L241>) ### func \(\*Deployment\) [DependsOn](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L243>)
```go ```go
func (d *Deployment) DependsOn(to *Deployment, servicename string) error func (d *Deployment) DependsOn(to *Deployment, servicename string) error
@@ -385,7 +394,7 @@ func (d *Deployment) DependsOn(to *Deployment, servicename string) error
DependsOn adds a initContainer to the deployment that will wait for the service to be up. DependsOn adds a initContainer to the deployment that will wait for the service to be up.
<a name="Deployment.Filename"></a> <a name="Deployment.Filename"></a>
### func \(\*Deployment\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L267>) ### func \(\*Deployment\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L269>)
```go ```go
func (d *Deployment) Filename() string func (d *Deployment) Filename() string
@@ -394,7 +403,7 @@ func (d *Deployment) Filename() string
Filename returns the filename of the deployment. Filename returns the filename of the deployment.
<a name="Deployment.SetEnvFrom"></a> <a name="Deployment.SetEnvFrom"></a>
### func \(\*Deployment\) [SetEnvFrom](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L272>) ### func \(\*Deployment\) [SetEnvFrom](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L274>)
```go ```go
func (d *Deployment) SetEnvFrom(service types.ServiceConfig, appName string) func (d *Deployment) SetEnvFrom(service types.ServiceConfig, appName string)
@@ -403,7 +412,7 @@ func (d *Deployment) SetEnvFrom(service types.ServiceConfig, appName string)
SetEnvFrom sets the environment variables to a configmap. The configmap is created. SetEnvFrom sets the environment variables to a configmap. The configmap is created.
<a name="Deployment.Yaml"></a> <a name="Deployment.Yaml"></a>
### func \(\*Deployment\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L365>) ### func \(\*Deployment\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/deployment.go#L367>)
```go ```go
func (d *Deployment) Yaml() ([]byte, error) func (d *Deployment) Yaml() ([]byte, error)
@@ -453,7 +462,7 @@ type HelmChart struct {
``` ```
<a name="Generate"></a> <a name="Generate"></a>
### func [Generate](<https://github.com/metal3d/katenary/blob/develop/generator/generator.go#L29>) ### func [Generate](<https://github.com/metal3d/katenary/blob/develop/generator/generator.go#L28>)
```go ```go
func Generate(project *types.Project) (*HelmChart, error) func Generate(project *types.Project) (*HelmChart, error)
@@ -505,7 +514,7 @@ type Help struct {
``` ```
<a name="Ingress"></a> <a name="Ingress"></a>
## type [Ingress](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L18-L21>) ## type [Ingress](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L17-L20>)
@@ -517,7 +526,7 @@ type Ingress struct {
``` ```
<a name="NewIngress"></a> <a name="NewIngress"></a>
### func [NewIngress](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L24>) ### func [NewIngress](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L23>)
```go ```go
func NewIngress(service types.ServiceConfig, Chart *HelmChart) *Ingress func NewIngress(service types.ServiceConfig, Chart *HelmChart) *Ingress
@@ -526,7 +535,7 @@ func NewIngress(service types.ServiceConfig, Chart *HelmChart) *Ingress
NewIngress creates a new Ingress from a compose service. NewIngress creates a new Ingress from a compose service.
<a name="Ingress.Filename"></a> <a name="Ingress.Filename"></a>
### func \(\*Ingress\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L122>) ### func \(\*Ingress\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L121>)
```go ```go
func (ingress *Ingress) Filename() string func (ingress *Ingress) Filename() string
@@ -535,7 +544,7 @@ func (ingress *Ingress) Filename() string
<a name="Ingress.Yaml"></a> <a name="Ingress.Yaml"></a>
### func \(\*Ingress\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L126>) ### func \(\*Ingress\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/ingress.go#L125>)
```go ```go
func (ingress *Ingress) Yaml() ([]byte, error) func (ingress *Ingress) Yaml() ([]byte, error)
@@ -697,7 +706,7 @@ func (r *RoleBinding) Yaml() ([]byte, error)
<a name="Secret"></a> <a name="Secret"></a>
## type [Secret](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L24-L27>) ## type [Secret](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L23-L26>)
Secret is a kubernetes Secret. Secret is a kubernetes Secret.
@@ -711,7 +720,7 @@ type Secret struct {
``` ```
<a name="NewSecret"></a> <a name="NewSecret"></a>
### func [NewSecret](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L30>) ### func [NewSecret](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L29>)
```go ```go
func NewSecret(service types.ServiceConfig, appName string) *Secret func NewSecret(service types.ServiceConfig, appName string) *Secret
@@ -720,7 +729,7 @@ func NewSecret(service types.ServiceConfig, appName string) *Secret
NewSecret creates a new Secret from a compose service NewSecret creates a new Secret from a compose service
<a name="Secret.AddData"></a> <a name="Secret.AddData"></a>
### func \(\*Secret\) [AddData](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L80>) ### func \(\*Secret\) [AddData](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L79>)
```go ```go
func (s *Secret) AddData(key, value string) func (s *Secret) AddData(key, value string)
@@ -729,7 +738,7 @@ func (s *Secret) AddData(key, value string)
AddData adds a key value pair to the secret. AddData adds a key value pair to the secret.
<a name="Secret.Filename"></a> <a name="Secret.Filename"></a>
### func \(\*Secret\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L88>) ### func \(\*Secret\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L87>)
```go ```go
func (s *Secret) Filename() string func (s *Secret) Filename() string
@@ -738,7 +747,7 @@ func (s *Secret) Filename() string
Filename returns the filename of the secret. Filename returns the filename of the secret.
<a name="Secret.SetData"></a> <a name="Secret.SetData"></a>
### func \(\*Secret\) [SetData](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L93>) ### func \(\*Secret\) [SetData](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L92>)
```go ```go
func (s *Secret) SetData(data map[string]string) func (s *Secret) SetData(data map[string]string)
@@ -747,7 +756,7 @@ func (s *Secret) SetData(data map[string]string)
SetData sets the data of the secret. SetData sets the data of the secret.
<a name="Secret.Yaml"></a> <a name="Secret.Yaml"></a>
### func \(\*Secret\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L100>) ### func \(\*Secret\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/secret.go#L99>)
```go ```go
func (s *Secret) Yaml() ([]byte, error) func (s *Secret) Yaml() ([]byte, error)
@@ -756,7 +765,7 @@ func (s *Secret) Yaml() ([]byte, error)
Yaml returns the yaml representation of the secret. Yaml returns the yaml representation of the secret.
<a name="Service"></a> <a name="Service"></a>
## type [Service](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L19-L22>) ## type [Service](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L18-L21>)
Service is a kubernetes Service. Service is a kubernetes Service.
@@ -768,7 +777,7 @@ type Service struct {
``` ```
<a name="NewService"></a> <a name="NewService"></a>
### func [NewService](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L25>) ### func [NewService](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L24>)
```go ```go
func NewService(service types.ServiceConfig, appName string) *Service func NewService(service types.ServiceConfig, appName string) *Service
@@ -777,7 +786,7 @@ func NewService(service types.ServiceConfig, appName string) *Service
NewService creates a new Service from a compose service. NewService creates a new Service from a compose service.
<a name="Service.AddPort"></a> <a name="Service.AddPort"></a>
### func \(\*Service\) [AddPort](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L54>) ### func \(\*Service\) [AddPort](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L53>)
```go ```go
func (s *Service) AddPort(port types.ServicePortConfig, serviceName ...string) func (s *Service) AddPort(port types.ServicePortConfig, serviceName ...string)
@@ -786,7 +795,7 @@ func (s *Service) AddPort(port types.ServicePortConfig, serviceName ...string)
AddPort adds a port to the service. AddPort adds a port to the service.
<a name="Service.Filename"></a> <a name="Service.Filename"></a>
### func \(\*Service\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L78>) ### func \(\*Service\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L77>)
```go ```go
func (s *Service) Filename() string func (s *Service) Filename() string
@@ -795,7 +804,7 @@ func (s *Service) Filename() string
Filename returns the filename of the service. Filename returns the filename of the service.
<a name="Service.Yaml"></a> <a name="Service.Yaml"></a>
### func \(\*Service\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L83>) ### func \(\*Service\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/service.go#L82>)
```go ```go
func (s *Service) Yaml() ([]byte, error) func (s *Service) Yaml() ([]byte, error)
@@ -804,7 +813,7 @@ func (s *Service) Yaml() ([]byte, error)
Yaml returns the yaml representation of the service. Yaml returns the yaml representation of the service.
<a name="ServiceAccount"></a> <a name="ServiceAccount"></a>
## type [ServiceAccount](<https://github.com/metal3d/katenary/blob/develop/generator/rbac.go#L128-L131>) ## type [ServiceAccount](<https://github.com/metal3d/katenary/blob/develop/generator/rbac.go#L132-L135>)
ServiceAccount is a kubernetes ServiceAccount. ServiceAccount is a kubernetes ServiceAccount.
@@ -816,7 +825,7 @@ type ServiceAccount struct {
``` ```
<a name="ServiceAccount.Filename"></a> <a name="ServiceAccount.Filename"></a>
### func \(\*ServiceAccount\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/rbac.go#L133>) ### func \(\*ServiceAccount\) [Filename](<https://github.com/metal3d/katenary/blob/develop/generator/rbac.go#L137>)
```go ```go
func (r *ServiceAccount) Filename() string func (r *ServiceAccount) Filename() string
@@ -825,7 +834,7 @@ func (r *ServiceAccount) Filename() string
<a name="ServiceAccount.Yaml"></a> <a name="ServiceAccount.Yaml"></a>
### func \(\*ServiceAccount\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/rbac.go#L137>) ### func \(\*ServiceAccount\) [Yaml](<https://github.com/metal3d/katenary/blob/develop/generator/rbac.go#L141>)
```go ```go
func (r *ServiceAccount) Yaml() ([]byte, error) func (r *ServiceAccount) Yaml() ([]byte, error)
@@ -883,7 +892,7 @@ func (v *Value) AddPersistence(volumeName string)
AddPersistence adds persistence configuration to the Value. AddPersistence adds persistence configuration to the Value.
<a name="VolumeClaim"></a> <a name="VolumeClaim"></a>
## type [VolumeClaim](<https://github.com/metal3d/katenary/blob/develop/generator/volume.go#L20-L25>) ## type [VolumeClaim](<https://github.com/metal3d/katenary/blob/develop/generator/volume.go#L19-L24>)
VolumeClaim is a kubernetes VolumeClaim. This is a PersistentVolumeClaim. VolumeClaim is a kubernetes VolumeClaim. This is a PersistentVolumeClaim.
@@ -895,7 +904,7 @@ type VolumeClaim struct {
``` ```
<a name="NewVolumeClaim"></a> <a name="NewVolumeClaim"></a>
### func [NewVolumeClaim](<https://github.com/metal3d/katenary/blob/develop/generator/volume.go#L28>) ### func [NewVolumeClaim](<https://github.com/metal3d/katenary/blob/develop/generator/volume.go#L27>)
```go ```go
func NewVolumeClaim(service types.ServiceConfig, volumeName, appName string) *VolumeClaim func NewVolumeClaim(service types.ServiceConfig, volumeName, appName string) *VolumeClaim

View File

@@ -8,7 +8,7 @@ import "katenary/utils"
Utils package provides some utility functions used in katenary. It defines some constants and functions used in the whole project. Utils package provides some utility functions used in katenary. It defines some constants and functions used in the whole project.
## func [Confirm](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L173>) ## func [Confirm](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L174>)
```go ```go
func Confirm(question string, icon ...Icon) bool func Confirm(question string, icon ...Icon) bool
@@ -26,7 +26,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://github.com/metal3d/katenary/blob/develop/utils/utils.go#L185>) ## func [EncodeBasicYaml](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L186>)
```go ```go
func EncodeBasicYaml(data any) ([]byte, error) func EncodeBasicYaml(data any) ([]byte, error)
@@ -34,6 +34,15 @@ 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>
## func [FixedResourceName](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L198>)
```go
func FixedResourceName(name string) string
```
FixedResourceName returns a resource name without underscores to respect the kubernetes naming convention.
<a name="GetContainerByName"></a> <a name="GetContainerByName"></a>
## func [GetContainerByName](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L89>) ## func [GetContainerByName](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L89>)
@@ -62,7 +71,7 @@ func GetServiceNameByPort(port int) string
GetServiceNameByPort returns the service name for a port. It the service name is not found, it returns an empty string. GetServiceNameByPort returns the service name for a port. It the service name is not found, it returns an empty string.
<a name="GetValuesFromLabel"></a> <a name="GetValuesFromLabel"></a>
## func [GetValuesFromLabel](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L130>) ## func [GetValuesFromLabel](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L131>)
```go ```go
func GetValuesFromLabel(service types.ServiceConfig, LabelValues string) map[string]*EnvConfig func GetValuesFromLabel(service types.ServiceConfig, LabelValues string) map[string]*EnvConfig
@@ -89,7 +98,7 @@ func Int32Ptr(i int32) *int32
Int32Ptr returns a pointer to an int32. Int32Ptr returns a pointer to an int32.
<a name="MapKeys"></a> <a name="MapKeys"></a>
## func [MapKeys](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L164>) ## func [MapKeys](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L165>)
```go ```go
func MapKeys(m map[string]interface{}) []string func MapKeys(m map[string]interface{}) []string
@@ -143,7 +152,7 @@ func Warn(msg ...interface{})
Warn prints a warning message Warn prints a warning message
<a name="WordWrap"></a> <a name="WordWrap"></a>
## func [WordWrap](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L160>) ## func [WordWrap](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L161>)
```go ```go
func WordWrap(text string, lineWidth int) string func WordWrap(text string, lineWidth int) string
@@ -170,7 +179,7 @@ func WrapBytes(src, above, below []byte) []byte
WrapBytes wraps a byte array with a byte array above and below. It will respect the indentation of the src string. WrapBytes wraps a byte array with a byte array above and below. It will respect the indentation of the src string.
<a name="EnvConfig"></a> <a name="EnvConfig"></a>
## type [EnvConfig](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L124-L127>) ## type [EnvConfig](<https://github.com/metal3d/katenary/blob/develop/utils/utils.go#L125-L128>)
EnvConfig is a struct to hold the description of an environment variable. EnvConfig is a struct to hold the description of an environment variable.