4 Commits

Author SHA1 Message Date
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
09e9b5dabd added factorio image
All checks were successful
Build and Push Docker Image / Build image (push) Successful in 2m0s
2025-05-22 23:07:50 +03:00
95a1042c41 fix bug 2025-05-22 23:07:24 +03:00
4 changed files with 38 additions and 4 deletions

View File

@@ -85,6 +85,8 @@ spec:
type: array
tag:
type: string
volume:
type: string
working_dir:
type: string
required:

View File

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

View File

@@ -0,0 +1,32 @@
apiVersion: server-manager.acooldomain.co/v1alpha1
kind: Image
metadata:
labels:
app.kubernetes.io/name: kubernetes-operator
app.kubernetes.io/managed-by: kustomize
name: factorio-2-0-47
spec:
location: git.acooldomain.co/server-manager/factorio:2.0.47
name: factorio
tag: 2.0.47
working_dir: /opt/factorio
volume: /opt/server
command:
- /opt/factorio/bin/x64/factorio
- --port
- "34197"
args:
- --start-server
- saves/default.zip
ports:
- port: 34197
protocol: TCP
init_script:
image: alpine:latest
command:
- /bin/sh
args:
- /bin/sh
- "-c"
- "cp /opt/factorio /opt/server"

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=proxy --auth.header=%s -d /tmp/database/filebrowser.db", r.Config.Browser.AuthHeader)},
VolumeMounts: []corev1.VolumeMount{
{
Name: "browser-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{
@@ -668,7 +668,7 @@ func (r *ServerManagerReconciler) ServerPod(s *servermanagerv1alpha1.ServerManag
Name: "init",
Image: image.Spec.InitScript.Image,
ImagePullPolicy: corev1.PullIfNotPresent,
Command: image.Spec.Command,
Command: image.Spec.InitScript.Command,
Args: image.Spec.InitScript.Args,
VolumeMounts: []corev1.VolumeMount{
{