Skip to content

Commit 38c274b

Browse files
authored
Merge pull request #139 from OneLiteFeatherNET/feat/helm-dashboard-config
Feat/helm dashboard config
2 parents 23dd9f8 + cce90c9 commit 38c274b

File tree

10 files changed

+21
-31
lines changed

10 files changed

+21
-31
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "feedback-fusion"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
edition = "2021"
55
license = "MIT"
66

charts/feedback-fusion/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.2.0
18+
version: 0.3.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.2.0"
24+
appVersion: "0.3.0"

charts/feedback-fusion/templates/_helpers.tpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Create the name of the service account to use
6969
{{- if .Values.dashboard.fullnameOverride }}
7070
{{- .Values.dashboard.fullnameOverride | trunc 63 | trimSuffix "-" }}
7171
{{- else }}
72-
{{- $name := default .Chart.Name .Values.dashboard.nameOverride }}
73-
{{- if contains $name .Release.Name }}
74-
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
72+
{{- $name := default (printf "%s-%s" .Chart.Name "dashboard") .Values.dashboard.nameOverride }}
73+
{{- if contains $name (printf "%s-%s" .Release.Name "dashboard") }}
74+
{{- printf "%s-%s" .Release.Name "dashboard" | trunc 63 | trimSuffix "-" }}
7575
{{- else }}
7676
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
7777
{{- end }}

charts/feedback-fusion/templates/api-ingress.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- if .Values.api.ingress.enabled -}}
22
{{- $fullName := include "feedback-fusion.fullname" . -}}
3-
apiVersion: extensions/v1beta1
3+
apiVersion: networking.k8s.io/v1
44
kind: Ingress
55
metadata:
66
name: {{ $fullName }}

charts/feedback-fusion/templates/dashboard-deployment.yaml

+6-19
Original file line numberDiff line numberDiff line change
@@ -30,41 +30,28 @@ spec:
3030
securityContext:
3131
{{- toYaml .Values.dashboard.podSecurityContext | nindent 8 }}
3232
containers:
33-
- name: {{ .Chart.Name }}
33+
- name: {{ .Chart.Name }}-dashboard
3434
securityContext:
3535
{{- toYaml .Values.dashboard.securityContext | nindent 12 }}
3636
image: "{{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag | default .Chart.AppVersion }}"
3737
imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }}
3838
ports:
39-
- name: grpc
40-
containerPort: 8000
39+
- name: http
40+
containerPort: 3000
4141
protocol: TCP
42-
env:
43-
- name: RUST_LOG
44-
value: {{ .Values.feedbackFusion.log }}
45-
- name: FEEDBACK_FUSION_CONFIG
46-
value: /etc/config/config.yaml
4742
livenessProbe:
4843
{{- toYaml .Values.dashboard.livenessProbe | nindent 12 }}
4944
startupProbe:
5045
{{- toYaml .Values.dashboard.startupProbe | nindent 12 }}
5146
resources:
5247
{{- toYaml .Values.dashboard.resources | nindent 12 }}
53-
volumeMounts:
54-
{{- with .Values.dashboard.volumeMounts }}
55-
{{- toYaml . | nindent 12 }}
56-
{{- end }}
57-
58-
- name: {{ .Values.feedbackFusion.config.secret }}
59-
mountPath: /etc/config
48+
envFrom:
49+
- secretRef:
50+
name: {{ .Values.feedbackFusion.dashboard.config.secret }}
6051
volumes:
6152
{{- with .Values.dashboard.volumes }}
6253
{{- toYaml . | nindent 8 }}
6354
{{- end }}
64-
65-
- name: {{ .Values.feedbackFusion.config.secret }}
66-
secret:
67-
secretName: {{ .Values.feedbackFusion.config.secret }}
6855
{{- with .Values.dashboard.nodeSelector }}
6956
nodeSelector:
7057
{{- toYaml . | nindent 8 }}

charts/feedback-fusion/templates/dashboard-ingress.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- if and .Values.dashboard.ingress.enabled .Values.dashboard.enabled -}}
22
{{- $fullName := include "feedback-fusion-dashboard.fullname" . -}}
3-
apiVersion: extensions/v1beta1
3+
apiVersion: networking.k8s.io/v1
44
kind: Ingress
55
metadata:
66
name: {{ $fullName }}

charts/feedback-fusion/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,7 @@ feedbackFusion:
234234
# -- the secret containing the config.yaml
235235
# For all configuration options see https://onelitefeathernet.github.io/feedback-fusion/nightly/docs/configuration.html
236236
secret: feedback-fusion-config
237+
238+
dashboard:
239+
config:
240+
secret: feedback-fusion-dashboard-config

dashboard/nuxt.config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ export default defineNuxtConfig({
8080
bundledThemes: ["github-dark", "github-light"],
8181
},
8282
});
83-

src/services/oidc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ impl<'de> Visitor<'de> for OIDCClaimsVisitor {
176176

177177
let iss = iss.ok_or_else(|| serde::de::Error::missing_field("iss"))?;
178178
let iat = iat.ok_or_else(|| serde::de::Error::missing_field("iat"))?;
179-
let aud = aud.or_else(|| Some(jwt::Audiences::default())).unwrap();
179+
let aud = aud.unwrap_or(jwt::Audiences::default());
180180
let exp = exp.ok_or_else(|| serde::de::Error::missing_field("exp"))?;
181-
let scope = scope.ok_or_else(|| serde::de::Error::missing_field("scope"))?;
181+
let scope = scope.unwrap_or(Scope::empty());
182182
let groups = groups
183183
.ok_or_else(|| serde::de::Error::missing_field(CONFIG.oidc().group_claim().as_str()))?;
184184

0 commit comments

Comments
 (0)