-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(shulker-addon-matchmaking): create director and mmf (#210)
* feat(shulker-addon-matchmaking): create director and mmf * test(shulker-addon-matchmaking): cover batch mmf
- Loading branch information
1 parent
d3231d4
commit 72cd61f
Showing
61 changed files
with
2,638 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
kube/resources/components/shulker-addon-matchmaking/director_deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: shulker-addon-matchmaking-director | ||
labels: | ||
app.kubernetes.io/name: deployment | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-director | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
app.kubernetes.io/part-of: shulker | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: shulker-addon-matchmaking-director | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-director | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: shulker-addon-matchmaking-director | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-director | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
spec: | ||
containers: | ||
- name: shulker-addon-matchmaking-director | ||
image: ghcr.io/jeremylvln/shulker-addon-matchmaking | ||
imagePullPolicy: Always | ||
args: | ||
- --metrics-bind-address=0.0.0.0:8080 | ||
env: | ||
- name: OPEN_MATCH_BACKEND_HOST | ||
value: open-match-backend.open-match | ||
- name: OPEN_MATCH_BACKEND_GRPC_PORT | ||
value: '50505' | ||
- name: SHULKER_API_HOST | ||
value: 'shulker-operator.shulker-system' | ||
- name: SHULKER_API_GRPC_PORT | ||
value: '8080' | ||
ports: | ||
- containerPort: 8080 | ||
protocol: TCP | ||
name: metrics | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: metrics | ||
periodSeconds: 15 | ||
startupProbe: | ||
httpGet: | ||
path: /healthz | ||
port: metrics | ||
failureThreshold: 5 | ||
periodSeconds: 15 | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
requests: | ||
cpu: 10m | ||
memory: 64Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
readOnlyRootFilesystem: true | ||
capabilities: | ||
drop: | ||
- 'ALL' | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
securityContext: | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
serviceAccountName: shulker-addon-matchmaking | ||
terminationGracePeriodSeconds: 30 | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- amd64 | ||
- arm64 |
19 changes: 19 additions & 0 deletions
19
kube/resources/components/shulker-addon-matchmaking/director_metrics_service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: shulker-addon-matchmaking-director-metrics | ||
labels: | ||
app.kubernetes.io/name: service | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-director-metrics | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
app.kubernetes.io/part-of: shulker | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: shulker-addon-matchmaking-director | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-director | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
ports: | ||
- name: metrics | ||
port: 8080 | ||
protocol: TCP | ||
targetPort: metrics |
10 changes: 10 additions & 0 deletions
10
kube/resources/components/shulker-addon-matchmaking/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- director_deployment.yaml | ||
- director_metrics_service.yaml | ||
- mmf_deployment.yaml | ||
- mmf_metrics_service.yaml | ||
- mmf_service.yaml | ||
- rbac/ |
87 changes: 87 additions & 0 deletions
87
kube/resources/components/shulker-addon-matchmaking/mmf_deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: shulker-addon-matchmaking-mmf | ||
labels: | ||
app.kubernetes.io/name: deployment | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
app.kubernetes.io/part-of: shulker | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
spec: | ||
containers: | ||
- name: shulker-addon-matchmaking-mmf | ||
image: ghcr.io/jeremylvln/shulker-addon-matchmaking | ||
command: ['/shulker-addon-matchmaking-mmf'] | ||
imagePullPolicy: Always | ||
args: | ||
- --metrics-bind-address=0.0.0.0:8080 | ||
env: | ||
- name: OPEN_MATCH_QUERY_HOST | ||
value: open-match-query.open-match | ||
- name: OPEN_MATCH_QUERY_GRPC_PORT | ||
value: '50503' | ||
ports: | ||
- containerPort: 8080 | ||
protocol: TCP | ||
name: metrics | ||
- containerPort: 9090 | ||
protocol: TCP | ||
name: mmf-batch | ||
- containerPort: 9091 | ||
protocol: TCP | ||
name: mmf-elo | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: metrics | ||
periodSeconds: 15 | ||
startupProbe: | ||
httpGet: | ||
path: /healthz | ||
port: metrics | ||
failureThreshold: 5 | ||
periodSeconds: 15 | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
requests: | ||
cpu: 10m | ||
memory: 64Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
readOnlyRootFilesystem: true | ||
capabilities: | ||
drop: | ||
- 'ALL' | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
securityContext: | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
serviceAccountName: shulker-addon-matchmaking | ||
terminationGracePeriodSeconds: 30 | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- amd64 | ||
- arm64 |
19 changes: 19 additions & 0 deletions
19
kube/resources/components/shulker-addon-matchmaking/mmf_metrics_service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: shulker-addon-matchmaking-mmf-metrics | ||
labels: | ||
app.kubernetes.io/name: service | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-mmf-metrics | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
app.kubernetes.io/part-of: shulker | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
ports: | ||
- name: metrics | ||
port: 8080 | ||
protocol: TCP | ||
targetPort: metrics |
23 changes: 23 additions & 0 deletions
23
kube/resources/components/shulker-addon-matchmaking/mmf_service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: shulker-addon-matchmaking-mmf | ||
labels: | ||
app.kubernetes.io/name: service | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
app.kubernetes.io/part-of: shulker | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-mmf | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
ports: | ||
- name: mmf-batch | ||
port: 9090 | ||
protocol: TCP | ||
targetPort: mmf-batch | ||
- name: mmf-elo | ||
port: 9091 | ||
protocol: TCP | ||
targetPort: mmf-elo |
5 changes: 5 additions & 0 deletions
5
kube/resources/components/shulker-addon-matchmaking/prometheus/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- monitor.yaml |
19 changes: 19 additions & 0 deletions
19
kube/resources/components/shulker-addon-matchmaking/prometheus/monitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: shulker-addon-matchmaking | ||
labels: | ||
app.kubernetes.io/name: servicemonitor | ||
app.kubernetes.io/instance: shulker-addon-matchmaking | ||
app.kubernetes.io/component: shulker-addon-matchmaking-prometheus | ||
app.kubernetes.io/part-of: shulker | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: service | ||
app.kubernetes.io/instance: shulker-addon-matchmaking-metrics | ||
app.kubernetes.io/component: shulker-addon-matchmaking | ||
endpoints: | ||
- targetPort: metrics | ||
path: /metrics | ||
interval: 60s |
Oops, something went wrong.