3 Commits

Author SHA1 Message Date
926828a2dc fix(filebrowser): add admin perm to users
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m49s
2026-01-10 22:14:51 +02:00
9ec3ed0f1c fix(filebrowser): fix filebrowser image setter
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 6m4s
2025-09-23 13:23:42 +03:00
e075ff13fa fixed bug where controller did not look at protocol
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 1m54s
2025-05-26 16:47:26 +03:00
2 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ spec:
containers:
- command:
- /manager
image: git.acooldomain.co/server-manager/kubernetes-operator:v0.0.8
image: git.acooldomain.co/server-manager/kubernetes-operator:v0.0.9
env:
- name: CONFIG_PATH
value: /etc/server-manager/config.yaml

View File

@@ -561,7 +561,7 @@ func (r *ServerManagerReconciler) BrowserPod(s *servermanagerv1alpha1.ServerMana
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: ports,
Command: []string{"/bin/sh"},
Args: []string{"-c", fmt.Sprintf("rm /tmp/database/filebrowser.db; /filebrowser config init -d /tmp/database/filebrowser.db && /filebrowser config set --auth.method=proxy --auth.header=%s -d /tmp/database/filebrowser.db", r.Config.Browser.AuthHeader)},
Args: []string{"-c", fmt.Sprintf("rm /tmp/database/filebrowser.db; filebrowser config init -d /tmp/database/filebrowser.db && filebrowser config set --auth.method=noauth --auth.header=%s --perm.admin=true -d /tmp/database/filebrowser.db", r.Config.Browser.AuthHeader)},
VolumeMounts: []corev1.VolumeMount{
{
Name: "browser-volume",
@@ -576,7 +576,7 @@ func (r *ServerManagerReconciler) BrowserPod(s *servermanagerv1alpha1.ServerMana
Image: "filebrowser/filebrowser",
ImagePullPolicy: corev1.PullIfNotPresent,
Ports: ports,
Args: []string{"-d", "/tmp/database/filebrowser.db", "-r", "/tmp/data", "-b", r.GenerateBrowserSubPath(s)},
Args: []string{"--noauth", "-d", "/tmp/database/filebrowser.db", "-r", "/tmp/data", "-b", r.GenerateBrowserSubPath(s)},
VolumeMounts: []corev1.VolumeMount{
{
Name: "volume",
@@ -599,7 +599,7 @@ func (r *ServerManagerReconciler) BrowserPod(s *servermanagerv1alpha1.ServerMana
func (r *ServerManagerReconciler) ServerService(s *servermanagerv1alpha1.ServerManager) *corev1.Service {
ports := make([]corev1.ServicePort, len(s.Spec.Server.Ports))
for i, port := range s.Spec.Server.Ports {
ports[i] = corev1.ServicePort{NodePort: 0, Port: port.Port, TargetPort: intstr.FromInt32(port.Port), Name: fmt.Sprintf("%s-%d", strings.ToLower(string(port.Protocol)), port.Port)}
ports[i] = corev1.ServicePort{NodePort: 0, Port: port.Port, TargetPort: intstr.FromInt32(port.Port), Name: fmt.Sprintf("%s-%d", strings.ToLower(string(port.Protocol)), port.Port), Protocol: port.Protocol}
}
service := &corev1.Service{
ObjectMeta: metav1.ObjectMeta{