From 45101a04c91fd18cbbc20fb35441ca54c5795dc0 Mon Sep 17 00:00:00 2001 From: David Landry Date: Sun, 12 Nov 2023 14:26:06 -0500 Subject: [PATCH] Move to app-of-apps chart --- projects/media/Chart.yaml | 28 +++------ projects/media/templates/_helpers.tpl | 72 ------------------------ projects/media/templates/app-kavita.yaml | 19 ------- projects/media/values.yaml | 10 +++- 4 files changed, 15 insertions(+), 114 deletions(-) delete mode 100644 projects/media/templates/_helpers.tpl delete mode 100644 projects/media/templates/app-kavita.yaml diff --git a/projects/media/Chart.yaml b/projects/media/Chart.yaml index 1be7624..c5d93c2 100644 --- a/projects/media/Chart.yaml +++ b/projects/media/Chart.yaml @@ -1,24 +1,12 @@ +--- apiVersion: v2 name: media +type: application +version: 1.0.0 +appVersion: "1.16.1" description: App-of-apps for self-hosted media applications -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" +dependencies: + - name: app-of-apps + version: 1.0.2 + repository: file://../../charts/app-of-apps diff --git a/projects/media/templates/_helpers.tpl b/projects/media/templates/_helpers.tpl deleted file mode 100644 index ed7b145..0000000 --- a/projects/media/templates/_helpers.tpl +++ /dev/null @@ -1,72 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "media.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- 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 "media.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 chart name and version as used by the chart label. -*/}} -{{- define "media.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Set namespace -*/}} -{{- define "media.destination" -}} -destination: - namespace: {{ .Values.spec.destination.namespace }} - server: {{ .Values.spec.destination.server }} -{{- end }} - - -{{/* -Common labels -*/}} -{{- define "media.labels" -}} -helm.sh/chart: {{ include "media.chart" . }} -{{ include "media.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "media.selectorLabels" -}} -app.kubernetes.io/name: {{ include "media.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "media.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "media.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/projects/media/templates/app-kavita.yaml b/projects/media/templates/app-kavita.yaml deleted file mode 100644 index e87e87d..0000000 --- a/projects/media/templates/app-kavita.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: kavita - namespace: argocd - labels: - {{- include "media.labels" . | nindent 4 }} - finalizers: - - resources-finalizer.argocd.argoproj.io -spec: -{{- include "media.destination" . | nindent 2 }} - project: default - source: - path: apps/kavita - repoURL: {{ .Values.spec.source.repoURL }} - targetRevision: {{ .Values.spec.source.targetRevision }} - syncPolicy: - syncOptions: - - CreateNamespace=true diff --git a/projects/media/values.yaml b/projects/media/values.yaml index d90a5be..ffbe183 100644 --- a/projects/media/values.yaml +++ b/projects/media/values.yaml @@ -1,7 +1,11 @@ -spec: +--- +app-of-apps: + project: apps destination: server: https://kubernetes.default.svc - namespace: media source: repoURL: https://git.nc.landry.land/davad/argo.git - targetRevision: HEAD + path: apps + apps: + - name: kavita + namespace: kavita