Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
youtrack: upgrade common lib 0.0.2 => 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
avakarev committed May 18, 2023
1 parent 5c23ba9 commit 6cf2045
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 58 deletions.
2 changes: 2 additions & 0 deletions charts/youtrack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Upgrade common lib 0.0.2 => 0.0.3

## [1.0.4] - 2023-05-17
### Changed
Expand Down
6 changes: 3 additions & 3 deletions charts/youtrack/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: https://minicloudlabs.github.io/helm-charts
version: 0.0.2
digest: sha256:379897a7b8799c7dca74216456928c4034f7a8e2b742ff6bbd513d347066374b
generated: "2023-05-17T21:41:19.488763+02:00"
version: 0.0.3
digest: sha256:ae466733e97ba6168672c3fca71858eee85524be2962d80b7b1cce7f0e1e40bf
generated: "2023-05-18T16:10:15.254794+02:00"
2 changes: 2 additions & 0 deletions charts/youtrack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc
| `service.annotations` | Service annotations | `{}` |
| `service.labels` | Custom labels | `{}` |
| `ingress.enabled` | Enables Ingress | `false` |
| `ingress.ingressClassName` | Ingress ClassName (for k8s 1.18+) | `` |
| `ingress.name` | Ingress name | `` |
| `ingress.annotations` | Ingress annotations (values are templated) | `{}` |
| `ingress.labels` | Custom labels | `{}` |
| `ingress.path` | Ingress accepted path | `/` |
Expand Down
21 changes: 0 additions & 21 deletions charts/youtrack/templates/_helpers.tpl

This file was deleted.

49 changes: 15 additions & 34 deletions charts/youtrack/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressApiIsStable := eq (include "youtrack.ingress.isStable" .) "true" -}}
{{- $ingressSupportsIngressClassName := eq (include "youtrack.ingress.supportsIngressClassName" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "youtrack.ingress.supportsPathType" .) "true" -}}
{{- $ingressSupportsIngressClassName := eq (include "common.ingress.supportsIngressClassName" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "common.ingress.supportsPathType" .) "true" -}}
{{- $fullName := include "common.names.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $ingressPathType := .Values.ingress.pathType -}}
{{- $extraPaths := .Values.ingress.extraPaths -}}
apiVersion: {{ include "youtrack.ingress.apiVersion" . }}
apiVersion: {{ include "common.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ .Values.ingress.name | default $fullName }}
namespace: {{ include "common.names.namespace" . }}
labels:
{{- include "common.labels.baseLabels" . | nindent 4 }}
{{- if .Values.ingress.labels }}
{{ toYaml .Values.ingress.labels | indent 4 }}
{{- end }}
{{- if .Values.ingress.annotations }}
{{- with .Values.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{- range $key, $value := . }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
spec:
{{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
Expand All @@ -37,37 +36,19 @@ spec:
- host: {{ tpl . $}}
http:
paths:
{{- if $extraPaths }}
{{ toYaml $extraPaths | indent 10 }}
{{- end }}
- path: {{ $ingressPath }}
{{- if $ingressSupportsPathType }}
pathType: {{ $ingressPathType }}
{{- end }}
backend:
{{- if $ingressApiIsStable }}
service:
name: {{ $fullName }}
port:
number: {{ $servicePort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $servicePort }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" $fullName "servicePort" $servicePort "context" $) | nindent 14 }}
{{- with $extraPaths }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- else }}
- http:
paths:
- backend:
{{- if $ingressApiIsStable }}
service:
name: {{ $fullName }}
port:
number: {{ $servicePort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $servicePort }}
{{- end }}
- backend: {{- include "common.ingress.backend" (dict "serviceName" $fullName "servicePort" $servicePort "context" $) | nindent 14 }}
{{- if $ingressPath }}
path: {{ $ingressPath }}
{{- end }}
Expand Down

0 comments on commit 6cf2045

Please sign in to comment.