From 156cb691a05736c52b5bc89ef0aa2fe7ef2748ab Mon Sep 17 00:00:00 2001 From: Andreas Resch Date: Tue, 24 Sep 2024 12:40:32 +0200 Subject: [PATCH] fix extension --- helm/ravatar/templates/deployment.yaml | 4 ++-- src/image_processor.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/ravatar/templates/deployment.yaml b/helm/ravatar/templates/deployment.yaml index 53a5afe..8ffab3d 100644 --- a/helm/ravatar/templates/deployment.yaml +++ b/helm/ravatar/templates/deployment.yaml @@ -113,8 +113,8 @@ spec: - name: {{ .Release.Name }}-resized-images mountPath: {{ .Values.ravatar.generatedImagesPath }} {{- end }} - {{ if .Values.volumes }} - {{- toYaml .Values.volumes | nindent 12 }} + {{ if .Values.volumeMounts }} + {{- toYaml .Values.volumeMounts | nindent 12 }} {{- end }} volumes: - name: {{ .Release.Name }}-data-source diff --git a/src/image_processor.rs b/src/image_processor.rs index 7ac1a7c..fbfab06 100644 --- a/src/image_processor.rs +++ b/src/image_processor.rs @@ -19,14 +19,15 @@ use std::{fs, vec}; pub fn resize_default(config: &Config) { create_directory(Path::new(&config.images)); + let extension = config.mm_extension.clone(); let binding = build_path( vec![config.images.clone(), 1024.to_string(), "mm".to_string()], - Some(config.mm_extension.clone()), + Some(extension.clone()), ); let path = binding.as_path(); let binding = build_path( vec!["default".to_string(), "mm".to_string()], - Some(config.mm_extension.clone()), + Some(extension.clone()), ); let default = binding.as_path(); if !needs_update(default, path) { @@ -34,7 +35,6 @@ pub fn resize_default(config: &Config) { return; } let sizes: Vec = vec![16, 32, 48, 64, 80, 96, 128, 256, 512, 1024]; - let extension = config.extension.clone(); let image_path = config.images.clone(); for name in vec!["mm", "default"] { let source_binding = build_path(