Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e075ff13fa | |||
09e9b5dabd | |||
95a1042c41 |
@@ -85,6 +85,8 @@ spec:
|
||||
type: array
|
||||
tag:
|
||||
type: string
|
||||
volume:
|
||||
type: string
|
||||
working_dir:
|
||||
type: string
|
||||
required:
|
||||
|
@@ -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
|
||||
|
32
config/samples/factorio_image-2.0.47.yaml
Normal file
32
config/samples/factorio_image-2.0.47.yaml
Normal 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"
|
@@ -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{
|
||||
{
|
||||
|
Reference in New Issue
Block a user