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

Add dependent charts #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ _build
gh.gpg
secrets/
test.yaml
charts/
1,181 changes: 568 additions & 613 deletions Pipfile.lock

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "nautobot.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default .Chart.Name .Release.Name | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -11,10 +11,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nautobot.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- if .Chart.Name }}
{{- .Chart.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- $name := default .Chart.Name .Release.Name }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -35,7 +35,7 @@ Common labels
*/}}
{{- define "nautobot.labels" -}}
helm.sh/chart: {{ include "nautobot.chart" . }}
app.kubernetes.io/part-of: nautobot
app.kubernetes.io/part-of: {{ .Chart.Name }}
{{ include "nautobot.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
Expand All @@ -48,6 +48,7 @@ Selector labels
*/}}
{{- define "nautobot.selectorLabels" -}}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: {{ .Chart.Name }}
{{- end }}

{{/*
Expand Down
6 changes: 3 additions & 3 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.config.name }}
name: nautobot-config
labels:
app.kubernetes.io/name: nautobot
app.kubernetes.io/instance: {{ .Release.Name }}
Expand All @@ -25,9 +25,9 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.config.celery.name }}
name: nautobot-celery-config
labels:
app.kubernetes.io/name: celery
app.kubernetes.io/name: nautobot-celery-config
app.kubernetes.io/instance: {{ .Release.Name }}
data:
.bashrc: |-
Expand Down
Loading
Loading