Skip to content

Commit

Permalink
add ldap config to helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
reschandreas committed Jul 23, 2024
1 parent 841f79f commit 761ac78
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- main
paths-ignore:
- "README.md"
- "helm/**"

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -78,7 +79,7 @@ jobs:
}
return "canary";
- name: log in to the Container registry
- name: log in to the container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-test-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0

- name: configure Git
- name: configure git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
Expand Down
4 changes: 2 additions & 2 deletions 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
Expand Up @@ -14,7 +14,7 @@ image = "0.25.2"
filetime = "0.2.23"
actix-web = "4.8.0"
serde = { version = "1.0.204", features = ["derive"] }
env_logger = "0.11.3"
env_logger = "0.11.4"
rayon = "1.10.0"
anyhow = "1.0.86"
log = "0.4.22"
Expand Down
17 changes: 17 additions & 0 deletions helm/ravatar/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ spec:
value: {{ .Values.ravatar.logLevel | default "info" }}
- name: OFFER_ORIGINAL_DIMENSIONS
value: {{ .Values.ravatar.offerOriginalDimensions | default "false" }}
{{ if .Values.ravatar.ldap.enabled }}
- name: LDAP_URL
value: {{ .Values.ravatar.ldap.url | quote }}
- name: LDAP_BIND_USERNAME
value: {{ .Values.ravatar.ldap.bindUsername | quote }}
- name: LDAP_BIND_PASSWORD
value: {{ .Values.ravatar.ldap.bindPassword | quote }}
- name: LDAP_BASE_DN
value: {{ .Values.ravatar.ldap.baseDN | quote }}
- name: LDAP_SEARCH_FILTER
value: {{ .Values.ravatar.ldap.searchFilter | quote }}
- name: LDAP_INPUT_ATTRIBUTE
value: {{ .Values.ravatar.ldap.inputAttribute | quote }}
- name: LDAP_TARGET_ATTRIBUTES
value: {{ .Values.ravatar.ldap.targetAttributes | quote }}
{{ end }}

livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
Expand Down
16 changes: 0 additions & 16 deletions helm/ravatar/templates/storage.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion helm/ravatar/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spec:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "ravatar.fullname" . }}:{{ .Values.service.port }}']
args: ['{{ include "ravatar.fullname" . }}:{{ .Values.service.port }}/healthz']
restartPolicy: Never
2 changes: 2 additions & 0 deletions helm/ravatar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ravatar:
generatedImagesPath: "/images"
logLevel: "info"
offerOriginalDimensions: false
ldap:
enabled: false


imagePullSecrets: [ ]
Expand Down
1 change: 0 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::env;
use actix_web::web::Query;
use log::log;
use crate::structs::{Config, ImageRequest, LdapConfig};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/image_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use futures::{SinkExt, StreamExt};
use image::ImageReader;
use notify::event::DataChange::Content;
use notify::event::{ModifyKind, RenameMode};
use notify::{Event, PollWatcher, RecommendedWatcher, RecursiveMode, Watcher};
use notify::{Event, RecommendedWatcher, RecursiveMode, Watcher};
use rand::random;
use rayon::iter::IntoParallelRefIterator;
use rayon::prelude::*;
Expand Down

0 comments on commit 761ac78

Please sign in to comment.