diff --git a/ops/kubeseal.yaml b/ops/kubeseal.yaml index 1e62e62..c33116c 100755 --- a/ops/kubeseal.yaml +++ b/ops/kubeseal.yaml @@ -11,4 +11,5 @@ spec: version: 2.17.3 targetNamespace: kube-system valuesContent: |- + # lets you use cli without speciying name fullnameOverride: sealed-secrets-controller diff --git a/spacerace/spacerace.ingress.yaml b/spacerace/spacerace.ingress.yaml index 85e7370..4bbee65 100644 --- a/spacerace/spacerace.ingress.yaml +++ b/spacerace/spacerace.ingress.yaml @@ -17,8 +17,8 @@ spec: - host: spacerace.ntwl.xyz http: paths: - - path: /api(/|$)(.*) - pathType: ImplementationSpecific + - path: / + pathType: Prefix backend: service: name: spacerace-api diff --git a/spacerace/spacerace.yaml b/spacerace/spacerace.yaml index 57af904..996c5db 100644 --- a/spacerace/spacerace.yaml +++ b/spacerace/spacerace.yaml @@ -97,33 +97,34 @@ spec: --- -# apiVersion: apps/v1 -# kind: Deployment -# metadata: -# name: spacerace-api -# namespace: spacerace -# spec: -# replicas: 1 -# selector: -# matchLabels: -# app: spacerace-api -# template: -# metadata: -# labels: -# app: spacerace-api -# spec: -# containers: -# - name: spacerace-api -# image: registry.ntwl.xyz/spacerace-api -# imagePullPolicy: IfNotPresent -# ports: -# - containerPort: 80 -# env: -# - name: CONNECTIONSTRINGS__SPACERACE -# valueFrom: -# secretKeyRef: -# name: spacerace -# key: CONNECTIONSTRINGS__SPACERACE +apiVersion: apps/v1 +kind: Deployment +metadata: + name: spacerace-api + namespace: spacerace +spec: + replicas: 1 + selector: + matchLabels: + app: spacerace-api + template: + metadata: + labels: + app: spacerace-api + spec: + containers: + - name: spacerace-api + image: registry.ntwl.xyz/spacerace-api + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + env: + - name: CONNECTIONSTRINGS__SPACERACE + valueFrom: + secretKeyRef: + name: spacerace + key: CONNECTIONSTRINGS__SPACERACE + --- # ----------------------------------------------------------------------- diff --git a/surf/mariadb.yaml b/surf/mariadb.yaml new file mode 100755 index 0000000..1d63444 --- /dev/null +++ b/surf/mariadb.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mariadb + namespace: surf +spec: + replicas: 1 + selector: + matchLabels: + app: mariadb + template: + metadata: + labels: + app: mariadb + spec: + containers: + - name: mariadb + image: mariadb:12 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3306 + env: + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: surf + key: MYSQL_ROOT_PASSWORD + - name: MYSQL_DATABASE + value: "shavit" + volumeMounts: + - name: mariadb-data + mountPath: /var/lib/mysql + volumes: + - name: mariadb-data + persistentVolumeClaim: + claimName: mariadb-data + +--- + +# ----------------------------------------------------------------------- +# SERVICE +# ----------------------------------------------------------------------- + +apiVersion: v1 +kind: Service +metadata: + name: mariadb + namespace: surf +spec: + type: ClusterIP + selector: + app: mariadb + ports: + - protocol: TCP + port: 3306 + targetPort: 3306 + +--- + +# ----------------------------------------------------------------------- +# VOLUMES +# ----------------------------------------------------------------------- + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: mariadb-data + namespace: surf +spec: + storageClassName: zfs-fast + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + diff --git a/surf/megastructure-surf.yaml b/surf/megastructure-surf.yaml new file mode 100755 index 0000000..a858b5a --- /dev/null +++ b/surf/megastructure-surf.yaml @@ -0,0 +1,115 @@ +--- + +apiVersion: v1 +kind: Namespace +metadata: + name: surf + + +# ----------------------------------------------------------------------- +# VOLUMES +# ----------------------------------------------------------------------- + +--- + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: cssds-data + namespace: surf +spec: + storageClassName: zfs-fast + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + +--- + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: tf2ds-data + namespace: surf +spec: + storageClassName: zfs-fast + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + +--- + +# ----------------------------------------------------------------------- +# DEPLOYMENT +# ----------------------------------------------------------------------- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: megastructure-surf + namespace: surf +spec: + replicas: 1 + selector: + matchLabels: + app: megastructure-surf + template: + metadata: + labels: + app: megastructure-surf + spec: + containers: + - name: megastructure-surf + image: registry.ntwl.xyz/megastructure-surf + imagePullPolicy: Always + command: ["sleep", "100000000"] + ports: + - containerPort: 27015 + - containerPort: 27005 + envFrom: + - secretRef: + name: surf + volumeMounts: + - name: cssds + mountPath: /home/steam/cssds + - name: tf2ds + mountPath: /home/steam/tf2ds + volumes: + - name: cssds + persistentVolumeClaim: + claimName: cssds-data + - name: tf2ds + persistentVolumeClaim: + claimName: tf2ds-data + +--- + +# ----------------------------------------------------------------------- +# SERVICES +# ----------------------------------------------------------------------- + +apiVersion: v1 +kind: Service +metadata: + name: megastructure-surf + namespace: surf +spec: + type: NodePort + selector: + app: megastructure-surf + ports: + - name: game-port + protocol: UDP + port: 27015 + targetPort: 27015 + nodePort: 32015 + - name: client-port + protocol: UDP + port: 27005 + targetPort: 27005 + nodePort: 32005 + +--- \ No newline at end of file