07070100000000000081a4000000000000000000000001692f31a400000456000000000000000000000000000000000000002900000000patches/0001-Remove-unwanted-files.patchdiff --git a/packages/ollama/0.12/artifacthub-repo.yml b/packages/ollama/0.12/artifacthub-repo.yml deleted file mode 100644 index 4393e1a..0000000 --- a/packages/ollama/0.12/artifacthub-repo.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Artifact Hub repository metadata file -# -# Some settings like the verified publisher flag or the ignored packages won't -# be applied until the next time the repository is processed. Please keep in -# mind that the repository won't be processed if it has not changed since the -# last time it was processed. Depending on the repository kind, this is checked -# in a different way. For Helm http based repositories, we consider it has -# changed if the `index.yaml` file changes. For git based repositories, it does -# when the hash of the last commit in the branch you set up changes. This does -# NOT apply to ownership claim operations, which are processed immediately. -# -repositoryID: 2ccfd0bd-c123-483e-96f6-eb446fa850ac -owners: - - name: OTWLD - email: tech@otwld.com - - name: Jean-Baptiste DETROYES - email: jean-baptiste@detroyes.fr \ No newline at end of file 07070100000001000081a4000000000000000000000001692f31a400000204000000000000000000000000000000000000002e00000000patches/0001-Standardized-global-values.patchdiff --git a/packages/ollama/0.12/values.yaml b/packages/ollama/0.12/values.yaml index 499df47..f25288a 100644 --- a/packages/ollama/0.12/values.yaml +++ b/packages/ollama/0.12/values.yaml @@ -1,3 +1,9 @@ +global: + # -- Global override for container image registry + imageRegistry: "" + # -- Global override for container image registry pull secrets + imagePullSecrets: [] + # Default values for ollama-helm. # This is a YAML-formatted file. # Declare variables to be passed into your templates. -- 2.43.0 07070100000002000081a4000000000000000000000001692f31a40000058d000000000000000000000000000000000000003000000000patches/0002-Standardize-imagePullSecrets.patchdiff --git a/packages/ollama/0.12/templates/_helpers.tpl b/packages/ollama/0.12/templates/_helpers.tpl index 9840ab5..bf677df 100644 --- a/packages/ollama/0.12/templates/_helpers.tpl +++ b/packages/ollama/0.12/templates/_helpers.tpl @@ -78,3 +78,35 @@ Models mount path {{- define "ollama.modelsMountPath" -}} {{- printf "%s/models" ( default "/root/.ollama") }} {{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "ollama.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + {{- $imagePullSecrets := list }} + {{- if kindIs "string" . }} + {{- $imagePullSecrets = append $imagePullSecrets (dict "name" .) }} + {{- else }} + {{- $imagePullSecrets = append $imagePullSecrets . }} + {{- end }} + {{- toYaml $imagePullSecrets | nindent 2 }} +{{- end }} +{{- else if .Values.imagePullSecrets }} +imagePullSecrets: + {{ toYaml .Values.imagePullSecrets }} +{{- end -}} +{{- else if .Values.imagePullSecrets }} +imagePullSecrets: + {{ toYaml .Values.imagePullSecrets }} +{{- end -}} +{{- end -}} + 07070100000003000081a4000000000000000000000001692f31a400000c69000000000000000000000000000000000000002d00000000patches/0003-Standardize-imageRegistry.patchdiff --git a/packages/ollama/0.12/templates/deployment.yaml b/packages/ollama/0.12/templates/deployment.yaml index 141c757..ec5287a 100644 --- a/packages/ollama/0.12/templates/deployment.yaml +++ b/packages/ollama/0.12/templates/deployment.yaml @@ -36,10 +36,7 @@ spec: {{- if .Values.hostNetwork }} hostNetwork: {{ .Values.hostNetwork }} {{- end }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- include "ollama.imagePullSecrets" . | nindent 6 }} serviceAccountName: {{ include "ollama.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -54,7 +51,7 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default (ternary (printf "%s-rocm" .Chart.AppVersion) (.Chart.AppVersion) (and (.Values.ollama.gpu.enabled) (eq .Values.ollama.gpu.type "amd"))) }}" + image: "{{ with (coalesce .Values.global.imageRegistry .Values.image.registry) }}{{ . }}/{{ end }}{{ .Values.image.repository }}:{{ .Values.image.tag | default (ternary (printf "%s-rocm" .Chart.AppVersion) (.Chart.AppVersion) (and (.Values.ollama.gpu.enabled) (eq .Values.ollama.gpu.type "amd"))) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/packages/ollama/0.12/templates/knative/service.yaml b/packages/ollama/0.12/templates/knative/service.yaml index 4c53647..0d4329b 100644 --- a/packages/ollama/0.12/templates/knative/service.yaml +++ b/packages/ollama/0.12/templates/knative/service.yaml @@ -12,10 +12,7 @@ spec: timeoutSeconds: {{ .Values.knative.timeoutSeconds }} responseStartTimeoutSeconds: {{ .Values.knative.responseStartTimeoutSeconds }} idleTimeoutSeconds: {{ .Values.knative.idleTimeoutSeconds }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- include "ollama.imagePullSecrets" . | nindent 6 }} serviceAccountName: {{ include "ollama.serviceAccountName" . }} {{- if .Values.runtimeClassName }} runtimeClassName: {{ .Values.runtimeClassName | quote }} @@ -25,7 +22,7 @@ spec: {{- tpl (toYaml . ) $ | nindent 8 }} {{- end }} containers: - - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default (ternary (printf "%s-rocm" .Chart.AppVersion) (.Chart.AppVersion) (and (.Values.ollama.gpu.enabled) (eq .Values.ollama.gpu.type "amd"))) }}" + - image: "{{ with (coalesce .Values.global.imageRegistry .Values.image.registry) }}{{ . }}/{{ end }}{{ .Values.image.repository }}:{{ .Values.image.tag | default (ternary (printf "%s-rocm" .Chart.AppVersion) (.Chart.AppVersion) (and (.Values.ollama.gpu.enabled) (eq .Values.ollama.gpu.type "amd"))) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} -- 2.43.0 07070100000004000081a4000000000000000000000001692f31a400000324000000000000000000000000000000000000001700000000patches/Chart.yaml.tpl# SPDX-License-Identifier: MIT #!BuildTag: charts/ollama:${VERSION}-%RELEASE% #!BuildTag: charts/ollama:${VERSION} annotations: helm.sh/images: | - image: ${CONTAINER_REGISTRY}/containers/ollama:${APP_VERSION} name: ollama - image: ${CONTAINER_REGISTRY}/containers/bci-busybox:15.5 name: bci-busybox license: MIT apiVersion: v2 appVersion: ${APP_VERSION} description: Get up and running with Llama 3.2, Mistral, Gemma 2, and other large language models. home: https://apps.rancher.io/applications/ollama icon: https://apps.rancher.io/logos/ollama.png keywords: - ai - llm - llama - mistral kubeVersion: ^1.16.0-0 maintainers: - url: https://www.suse.com name: SUSE LLC name: ollama sources: - https://github.com/ollama/ollama type: application version: ${VERSION} 07070100000005000081a4000000000000000000000001692f31a400000065000000000000000000000000000000000000001d00000000patches/values-suse.yaml.tplimage: registry: ${CONTAINER_REGISTRY} repository: containers/ollama tag: ${APP_VERSION} 07070100000006000041ed000000000000000000000001692f31a400000000000000000000000000000000000000000000000800000000patches07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!