Skip to content

Commit

Permalink
Merge pull request #139 from OneLiteFeatherNET/feat/helm-dashboard-co…
Browse files Browse the repository at this point in the history
…nfig

Feat/helm dashboard config
  • Loading branch information
Randoooom authored Jan 20, 2025
2 parents 23dd9f8 + cce90c9 commit 38c274b
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "feedback-fusion"
version = "0.2.0"
version = "0.3.0"
edition = "2021"
license = "MIT"

Expand Down
4 changes: 2 additions & 2 deletions charts/feedback-fusion/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.2.0"
appVersion: "0.3.0"
6 changes: 3 additions & 3 deletions charts/feedback-fusion/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ Create the name of the service account to use
{{- if .Values.dashboard.fullnameOverride }}
{{- .Values.dashboard.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.dashboard.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- $name := default (printf "%s-%s" .Chart.Name "dashboard") .Values.dashboard.nameOverride }}
{{- if contains $name (printf "%s-%s" .Release.Name "dashboard") }}
{{- printf "%s-%s" .Release.Name "dashboard" | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/feedback-fusion/templates/api-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.api.ingress.enabled -}}
{{- $fullName := include "feedback-fusion.fullname" . -}}
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down
25 changes: 6 additions & 19 deletions charts/feedback-fusion/templates/dashboard-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,28 @@ spec:
securityContext:
{{- toYaml .Values.dashboard.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
- name: {{ .Chart.Name }}-dashboard
securityContext:
{{- toYaml .Values.dashboard.securityContext | nindent 12 }}
image: "{{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }}
ports:
- name: grpc
containerPort: 8000
- name: http
containerPort: 3000
protocol: TCP
env:
- name: RUST_LOG
value: {{ .Values.feedbackFusion.log }}
- name: FEEDBACK_FUSION_CONFIG
value: /etc/config/config.yaml
livenessProbe:
{{- toYaml .Values.dashboard.livenessProbe | nindent 12 }}
startupProbe:
{{- toYaml .Values.dashboard.startupProbe | nindent 12 }}
resources:
{{- toYaml .Values.dashboard.resources | nindent 12 }}
volumeMounts:
{{- with .Values.dashboard.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}

- name: {{ .Values.feedbackFusion.config.secret }}
mountPath: /etc/config
envFrom:
- secretRef:
name: {{ .Values.feedbackFusion.dashboard.config.secret }}
volumes:
{{- with .Values.dashboard.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}

- name: {{ .Values.feedbackFusion.config.secret }}
secret:
secretName: {{ .Values.feedbackFusion.config.secret }}
{{- with .Values.dashboard.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/feedback-fusion/templates/dashboard-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if and .Values.dashboard.ingress.enabled .Values.dashboard.enabled -}}
{{- $fullName := include "feedback-fusion-dashboard.fullname" . -}}
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down
4 changes: 4 additions & 0 deletions charts/feedback-fusion/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,7 @@ feedbackFusion:
# -- the secret containing the config.yaml
# For all configuration options see https://onelitefeathernet.github.io/feedback-fusion/nightly/docs/configuration.html
secret: feedback-fusion-config

dashboard:
config:
secret: feedback-fusion-dashboard-config
1 change: 0 additions & 1 deletion dashboard/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@ export default defineNuxtConfig({
bundledThemes: ["github-dark", "github-light"],
},
});

4 changes: 2 additions & 2 deletions src/services/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ impl<'de> Visitor<'de> for OIDCClaimsVisitor {

let iss = iss.ok_or_else(|| serde::de::Error::missing_field("iss"))?;
let iat = iat.ok_or_else(|| serde::de::Error::missing_field("iat"))?;
let aud = aud.or_else(|| Some(jwt::Audiences::default())).unwrap();
let aud = aud.unwrap_or(jwt::Audiences::default());
let exp = exp.ok_or_else(|| serde::de::Error::missing_field("exp"))?;
let scope = scope.ok_or_else(|| serde::de::Error::missing_field("scope"))?;
let scope = scope.unwrap_or(Scope::empty());
let groups = groups
.ok_or_else(|| serde::de::Error::missing_field(CONFIG.oidc().group_claim().as_str()))?;

Expand Down

0 comments on commit 38c274b

Please sign in to comment.