question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Suggestion] - Library chart which contains common logic between Atlassian charts

See original GitHub issue

Suggestion

There is a duplication of logic between charts. An examples of this is the fullname definition which is duplicated in each of the charts. For example bitbucket and jira examples below:

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "bitbucket.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "jira.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

These definitions are essentially the same logic which could be defined in one chart, a Helm Library Chart and used between the Atlassian charts.

Some of the benefits of introducing a common or library chart are:

  • Code re-use and keeping charts DRY
  • Minimizing errors
  • Maintenance improvements

Note: The common logic can be extracted from the charts and added to the common chart on a bit by bit basis and avoid “big bang” approach.

Product

Jira, Confluence, Bitbucket, Other

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
nanuxcommented, Nov 29, 2021

Hi @hickeyma, sorry it took some time, there were other moving pieces that I was working on. I think we are now at the point where we can start introducing the library chart. Do you think you can pick up the PR and update it to make it work with the latest changes? Thank you

1reaction
nanuxcommented, Sep 21, 2021

Hi @hickeyma, this is an interesting change that we have considered as well. Thank you very much for the PR it is something we can test and see how to work with the current installations and going forward. We haven’t introduced an “umbrella” chart as we didn’t want to have explicit product dependency on other charts but with more duplication, this should make it easier for maintaining the helm charts and also maintaining installations.

Right now, there is another major work currently in progress that might utilise this but for now, we would like to avoid any impact on the development so I will put the issue on hold and revisit it within a ~month.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chart types | Atlassian Analytics
Bar charts are mainly used to visualize discontinuous (or discrete) data or to show the relationship between a part to a whole. For...
Read more >
common 1.0.0 · atlassian/atlassian-data-center - Artifact Hub
A Library Helm Chart for grouping common logic between Atlassian charts. This chart is not deployable by itself.
Read more >
Configure charts using globals - GitLab Docs
These global settings are used across several charts, while all other settings are scoped within their chart. See the Helm documentation on globals...
Read more >
10 Best Free Flowchart Software For Windows and Mac
Flowcharts have some limitations like complex logic, alterations, and reproduction. ... Can draw any diagram from flowcharts to wireframes.
Read more >
common | A Library Helm Chart for grouping ... - StackShare
A Library Helm Chart for grouping common logic between Atlassian charts. This chart is not deployable by itself. common is a tool in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found