Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move chart to subdirectory #2

Merged
merged 9 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

# Misc
tmp.*
charts/**
charts/netobserv/charts/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
charts/netobserv/charts/**
charts/netobserv/**

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would ignore all of the templates 😱

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But charts/netobserv/charts/** does not seem to exist

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is where the helm dep update and helm dep build write to

File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 17 additions & 19 deletions templates/_helpers.tpl → charts/netobserv/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@
Expand the name of the chart.
*/}}
{{- define "netobserv.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "netobserv.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 }}

{{/*
Expand Down Expand Up @@ -31,21 +47,3 @@ Selector labels
app.kubernetes.io/name: {{ include "netobserv.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
Create image name and tag used by the deployment.
*/}}
{{- define "netobserv.image" -}}
{{- $fullOverride := .Values.image.fullOverride | default "" -}}
{{- $registry := .Values.image.registry | default .Values.image.registry -}}
{{- $repository := .Values.image.repository -}}
{{- $separator := ":" -}}
{{- $tag := .Values.image.tag | default .Chart.AppVersion -}}
{{- if $fullOverride }}
{{- printf "%s" $fullOverride -}}
{{- else if $registry }}
{{- printf "%s/%s%s%s" $registry $repository $separator $tag -}}
{{- else -}}
{{- printf "%s%s%s" $repository $separator $tag -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ spec:
restartPolicy: Always
containers:
- name: {{ include "netobserv.name" . }}
# image: "elastiflow/flow-collector:{{ .Values.image.tag }}"
image: "{{ include "netobserv.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- if .Values.args }}
args:
{{- .Values.args | toYaml | nindent 12 }}
Expand Down
1 change: 0 additions & 1 deletion values.yaml → charts/netobserv/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ service:
labels: {}

image:
registry: ""
repository: elastiflow/flow-collector
tag: ""
kgrubb marked this conversation as resolved.
Show resolved Hide resolved
pullPolicy: IfNotPresent
Expand Down
Loading