Enhancements, see details

- Added a message to explain to the user that it needs to build and push
  images
- The Release Name string is now a constant ins source code, later we will be able to
  change it to (for example) a template call
- SHA256 injected label (from docker-compose file content) is a bit long, SHA1 is shorter
- We now add compose command line and generation date in the Values file
- Code cleanup, refactorisation and enhancements
- More documentation in the source code
This commit is contained in:
2021-12-05 09:05:48 +01:00
parent 714ccf771d
commit fe2a655796
11 changed files with 73 additions and 34 deletions

View File

@@ -10,7 +10,7 @@ type Deployment struct {
func NewDeployment(name string) *Deployment {
d := &Deployment{K8sBase: NewBase(), Spec: NewDepSpec()}
d.K8sBase.Metadata.Name = "{{ .Release.Name }}-" + name
d.K8sBase.Metadata.Name = RELEASE_NAME + "-" + name
d.K8sBase.ApiVersion = "apps/v1"
d.K8sBase.Kind = "Deployment"
d.K8sBase.Metadata.Labels[K+"/component"] = name
@@ -67,7 +67,7 @@ func NewContainer(name, image string, environment, labels map[string]string) *Co
for n, v := range environment {
for _, name := range toServices {
if name == n {
v = "{{ .Release.Name }}-" + v
v = RELEASE_NAME + "-" + v
}
}
container.Env[idx] = Value{Name: n, Value: v}