Skip to content

Commit

Permalink
format helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson committed Oct 2, 2024
1 parent 61ad335 commit cd9dc67
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
12 changes: 6 additions & 6 deletions charts/tembo-ai/templates/inference-service/external-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if .Values.inferenceService.services }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) $mergedConfig.externalSecrets.secretName }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) $mergedConfig.externalSecrets.secretName }}
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
Expand All @@ -24,6 +24,6 @@ spec:
- find:
name:
regexp: {{ $mergedConfig.externalSecrets.secretRegex }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
14 changes: 7 additions & 7 deletions charts/tembo-ai/templates/inference-service/pod-monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- if .Values.inferenceService.services }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- $releaseName := default "release-name" .Release.Name }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) (default false $mergedConfig.podMonitor.enabled) }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- $releaseName := default "release-name" .Release.Name }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) (default false $mergedConfig.podMonitor.enabled) }}
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
Expand All @@ -29,6 +29,6 @@ spec:
selector:
matchLabels:
{{- include "tembo-ai.inferenceService.selectorLabels" $ | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
12 changes: 6 additions & 6 deletions charts/tembo-ai/templates/inference-service/service.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if .Values.inferenceService.services }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) (default true $mergedConfig.service.enabled) }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) (default true $mergedConfig.service.enabled) }}
---
apiVersion: v1
kind: Service
Expand All @@ -23,6 +23,6 @@ spec:
selector:
{{- include "tembo-ai.inferenceService.selectorLabels" $ | nindent 4 }}
app.kubernetes.io/component: {{ $serviceName }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
12 changes: 6 additions & 6 deletions charts/tembo-ai/templates/inference-service/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if .Values.inferenceService.services }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) (default false $mergedConfig.serviceAccount.create) }}
{{- $defaults := .Values.inferenceService.defaults }}
{{- range $serviceName, $serviceConfig := .Values.inferenceService.services }}
{{- $mergedConfig := fromYaml (include "tembo-ai.mergeConfigs" (dict "defaults" $defaults "service" $serviceConfig)) }}
{{- if and (default false $mergedConfig.enabled) (default true $mergedConfig.serviceAccount.create) }}
---
apiVersion: v1
kind: ServiceAccount
Expand All @@ -26,6 +26,6 @@ imagePullSecrets:
{{- if hasKey $mergedConfig.serviceAccount "automountServiceAccountToken" }}
automountServiceAccountToken: {{ $mergedConfig.serviceAccount.automountServiceAccountToken }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit cd9dc67

Please sign in to comment.