From f291d17aa31aa516cc08c492544a4bade66e882c Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Sun, 21 Apr 2024 16:37:20 +0200 Subject: [PATCH] Fixup documentation after changing packages --- doc/docs/packages/generator.md | 30 ++++++++++++----------- doc/docs/packages/generator/extrafiles.md | 6 ++--- doc/docs/packages/parser.md | 2 +- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/doc/docs/packages/generator.md b/doc/docs/packages/generator.md index a8ab1a1..acbced0 100644 --- a/doc/docs/packages/generator.md +++ b/doc/docs/packages/generator.md @@ -274,7 +274,7 @@ Yaml returns the yaml representation of the cronjob. Implements the Yaml interface. -## type [CronJobValue]() +## type [CronJobValue]() CronJobValue is a cronjob configuration that will be saved in values.yaml. @@ -345,7 +345,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. -### func \(\*Deployment\) [AddContainer]() +### func \(\*Deployment\) [AddContainer]() ```go func (d *Deployment) AddContainer(service types.ServiceConfig) @@ -354,7 +354,7 @@ func (d *Deployment) AddContainer(service types.ServiceConfig) AddContainer adds a container to the deployment. -### func \(\*Deployment\) [AddHealthCheck]() +### func \(\*Deployment\) [AddHealthCheck]() ```go func (d *Deployment) AddHealthCheck(service types.ServiceConfig, container *corev1.Container) @@ -363,7 +363,7 @@ func (d *Deployment) AddHealthCheck(service types.ServiceConfig, container *core -### func \(\*Deployment\) [AddIngress]() +### func \(\*Deployment\) [AddIngress]() ```go func (d *Deployment) AddIngress(service types.ServiceConfig, appName string) *Ingress @@ -372,7 +372,7 @@ func (d *Deployment) AddIngress(service types.ServiceConfig, appName string) *In AddIngress adds an ingress to the deployment. It creates the ingress object. -### func \(\*Deployment\) [AddVolumes]() +### func \(\*Deployment\) [AddVolumes]() ```go func (d *Deployment) AddVolumes(service types.ServiceConfig, appName string) @@ -381,7 +381,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. -### func \(\*Deployment\) [BindFrom]() +### func \(\*Deployment\) [BindFrom]() ```go func (d *Deployment) BindFrom(service types.ServiceConfig, binded *Deployment) @@ -390,7 +390,7 @@ func (d *Deployment) BindFrom(service types.ServiceConfig, binded *Deployment) -### func \(\*Deployment\) [DependsOn]() +### func \(\*Deployment\) [DependsOn]() ```go func (d *Deployment) DependsOn(to *Deployment, servicename string) error @@ -399,7 +399,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. -### func \(\*Deployment\) [Filename]() +### func \(\*Deployment\) [Filename]() ```go func (d *Deployment) Filename() string @@ -408,7 +408,7 @@ func (d *Deployment) Filename() string Filename returns the filename of the deployment. -### func \(\*Deployment\) [SetEnvFrom]() +### func \(\*Deployment\) [SetEnvFrom]() ```go func (d *Deployment) SetEnvFrom(service types.ServiceConfig, appName string) @@ -417,7 +417,7 @@ func (d *Deployment) SetEnvFrom(service types.ServiceConfig, appName string) SetEnvFrom sets the environment variables to a configmap. The configmap is created. -### func \(\*Deployment\) [Yaml]() +### func \(\*Deployment\) [Yaml]() ```go func (d *Deployment) Yaml() ([]byte, error) @@ -855,7 +855,7 @@ func (r *ServiceAccount) Yaml() ([]byte, error) -## type [Value]() +## type [Value]() Value will be saved in values.yaml. It contains configuraiton for all deployment and services. The content will be lile: @@ -885,11 +885,13 @@ type Value struct { Environment map[string]any `yaml:"environment,omitempty"` Replicas *uint32 `yaml:"replicas,omitempty"` CronJob *CronJobValue `yaml:"cronjob,omitempty"` + NodeSelector map[string]string `yaml:"nodeSelector"` + ServiceAccount string `yaml:"serviceAccount"` } ``` -### func [NewValue]() +### func [NewValue]() ```go func NewValue(service types.ServiceConfig, main ...bool) *Value @@ -900,7 +902,7 @@ NewValue creates a new Value from a compose service. The value contains the nece If \`main\` is true, the tag will be empty because it will be set in the helm chart appVersion. -### func \(\*Value\) [AddIngress]() +### func \(\*Value\) [AddIngress]() ```go func (v *Value) AddIngress(host, path string) @@ -909,7 +911,7 @@ func (v *Value) AddIngress(host, path string) -### func \(\*Value\) [AddPersistence]() +### func \(\*Value\) [AddPersistence]() ```go func (v *Value) AddPersistence(volumeName string) diff --git a/doc/docs/packages/generator/extrafiles.md b/doc/docs/packages/generator/extrafiles.md index a0a6b84..aa76efe 100644 --- a/doc/docs/packages/generator/extrafiles.md +++ b/doc/docs/packages/generator/extrafiles.md @@ -8,13 +8,13 @@ import "katenary/generator/extrafiles" extrafiles package provides function to generate the Chart files that are not objects. Like README.md and notes.txt... -## func [NotesFile]() +## func [NotesFile]() ```go -func NotesFile() string +func NotesFile(services []string) string ``` -NoteTXTFile returns the content of the note.txt file. +NotesFile returns the content of the note.txt file. ## func [ReadMeFile]() diff --git a/doc/docs/packages/parser.md b/doc/docs/packages/parser.md index 1acfc81..834b50a 100644 --- a/doc/docs/packages/parser.md +++ b/doc/docs/packages/parser.md @@ -8,7 +8,7 @@ import "katenary/parser" Parser package is a wrapper around compose\-go to parse compose files. -## func [Parse]() +## func [Parse]() ```go func Parse(profiles []string, dockerComposeFile ...string) (*types.Project, error)