Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 738406c4e5 | |||
| 6cef31d142 | |||
| f043443efd | |||
| f6274857d0 | |||
| 423f5aa497 | |||
| 081d7807c3 | |||
| 23f814ae29 | |||
| cb9de632d9 | |||
| dfa7749c18 | |||
| 342e1f60b3 | |||
| 0b69b04b1c | |||
| 8ca3ed4643 | |||
| f90777ec63 | |||
| b354cb1594 | |||
| 7f17905b68 | |||
| 7b95f16361 | |||
| e61cf790b1 | |||
| e08e8313ff | |||
| ab95b4f101 | |||
| e20bedbff5 | |||
| aa8d04a1cc | |||
| 710e2ec308 | |||
| 25f230fd18 | |||
| d962dfda22 | |||
| 63e9d0512c | |||
| 0442352b3e | |||
| 44b3369501 | |||
| fd62f236fa | |||
| d0d4370c50 | |||
| 1dd1cacbb4 | |||
| 1a3403a48e | |||
| 9b906edfc9 | |||
| d6a05d2e1e | |||
| 0bb5aabf98 | |||
| 767a7f28a1 | |||
| 0373f61ef7 | |||
| b546313e79 | |||
| afdc648347 | |||
| 93793671e3 |
@@ -11,7 +11,7 @@ spec:
|
||||
sources:
|
||||
- repoURL: ghcr.io/akuity/kargo-charts
|
||||
chart: kargo
|
||||
targetRevision: 1.10.6
|
||||
targetRevision: 1.10.7
|
||||
helm:
|
||||
valueFiles:
|
||||
- $values/kargo/eu-central-1/values.yaml
|
||||
|
||||
@@ -12,7 +12,4 @@ spec:
|
||||
- repoURL: git@git.janis-eccarius.de:NowChess/Gitops.git
|
||||
path: ./spark-analytics/eu-central-1-prod
|
||||
targetRevision: main
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncPolicy: {}
|
||||
|
||||
@@ -12,7 +12,4 @@ spec:
|
||||
- repoURL: git@git.janis-eccarius.de:NowChess/Gitops.git
|
||||
path: ./spark-cluster/eu-central-1-prod
|
||||
targetRevision: main
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncPolicy: {}
|
||||
|
||||
@@ -68,6 +68,12 @@ spec:
|
||||
sources:
|
||||
direct: true
|
||||
requiredSoakTime: 5m0s
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: tournament
|
||||
sources:
|
||||
direct: true
|
||||
requiredSoakTime: 5m0s
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: ws
|
||||
@@ -168,6 +174,13 @@ spec:
|
||||
direct: false
|
||||
stages:
|
||||
- staging
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: tournament
|
||||
sources:
|
||||
direct: false
|
||||
stages:
|
||||
- staging
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: ws
|
||||
@@ -267,6 +280,13 @@ spec:
|
||||
direct: false
|
||||
stages:
|
||||
- staging
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: tournament
|
||||
sources:
|
||||
direct: false
|
||||
stages:
|
||||
- staging
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: ws
|
||||
|
||||
@@ -135,6 +135,21 @@ spec:
|
||||
---
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: tournament
|
||||
namespace: nowchess-kargo
|
||||
spec:
|
||||
freightCreationPolicy: Automatic
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 20
|
||||
imageSelectionStrategy: SemVer
|
||||
repoURL: ghcr.io/now-chess/now-chess-systems/tournament
|
||||
strictSemvers: true
|
||||
---
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: ws
|
||||
namespace: nowchess-kargo
|
||||
|
||||
@@ -441,6 +441,15 @@ spec:
|
||||
key: INTERNAL_SECRET
|
||||
- name: ACCOUNT_SERVICE_URL
|
||||
value: http://nowchess-account:8083
|
||||
- name: TOURNAMENT_SERVER_URL
|
||||
value: "http://141.37.123.132:8086"
|
||||
- name: TOURNAMENT_BOT_DIFFICULTY
|
||||
value: "hard"
|
||||
- name: TOURNAMENT_BOT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: ncs-tournament-secret
|
||||
key: TOURNAMENT_BOT_TOKEN
|
||||
ports:
|
||||
- containerPort: 8088
|
||||
protocol: TCP
|
||||
|
||||
@@ -32,18 +32,18 @@ patches:
|
||||
kind: ConfigMap
|
||||
name: nowchess-frontend-env-config
|
||||
images:
|
||||
- name: ghcr.io/now-chess/now-chess-systems/analysis
|
||||
newTag: 0.1.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/account
|
||||
newTag: 0.24.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/analysis
|
||||
newTag: 0.2.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/bot-platform
|
||||
newTag: 0.12.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/coordinator
|
||||
newTag: 0.32.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/core
|
||||
newTag: 0.50.0
|
||||
newTag: 0.51.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/frontend
|
||||
newTag: 0.2.7
|
||||
newTag: 0.3.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/io
|
||||
newTag: 0.23.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/official-bots
|
||||
@@ -53,7 +53,7 @@ images:
|
||||
- name: ghcr.io/now-chess/now-chess-systems/store
|
||||
newTag: 0.24.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/tournament
|
||||
newTag: 0.1.0
|
||||
newTag: 0.3.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/ws
|
||||
newTag: 0.16.0
|
||||
configurations:
|
||||
|
||||
@@ -94,10 +94,10 @@ patches:
|
||||
spec:
|
||||
replicas: 1
|
||||
images:
|
||||
- name: ghcr.io/now-chess/now-chess-systems/analysis
|
||||
newTag: 0.1.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/account
|
||||
newTag: 0.24.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/analysis
|
||||
newTag: 0.2.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/bot-platform
|
||||
newTag: 0.12.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/coordinator
|
||||
@@ -105,17 +105,17 @@ images:
|
||||
- name: ghcr.io/now-chess/now-chess-systems/core
|
||||
newTag: 0.51.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/frontend
|
||||
newTag: 0.2.8
|
||||
newTag: 0.3.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/io
|
||||
newTag: 0.23.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/official-bots
|
||||
newTag: 0.17.0
|
||||
newTag: 0.18.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/rule
|
||||
newTag: 0.18.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/store
|
||||
newTag: 0.24.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/tournament
|
||||
newTag: 0.1.0
|
||||
newTag: 0.3.0
|
||||
- name: ghcr.io/now-chess/now-chess-systems/ws
|
||||
newTag: 0.16.0
|
||||
configurations:
|
||||
|
||||
@@ -31,27 +31,27 @@ patches:
|
||||
kind: ConfigMap
|
||||
name: nowchess-frontend-env-config
|
||||
images:
|
||||
- name: ghcr.io/now-chess/now-chess-systems/analysis
|
||||
newTag: 0.1.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/account
|
||||
newTag: 0.24.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/analysis
|
||||
newTag: 0.1.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/bot-platform
|
||||
newTag: 0.12.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/coordinator
|
||||
newTag: 0.32.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/core
|
||||
newTag: 0.50.0-x86_v2
|
||||
newTag: 0.51.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/frontend
|
||||
newTag: 0.2.7-x86_v2
|
||||
newTag: 0.3.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/io
|
||||
newTag: 0.23.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/official-bots
|
||||
newTag: 0.17.0-x86_v2
|
||||
newTag: 0.18.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/rule
|
||||
newTag: 0.18.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/store
|
||||
newTag: 0.24.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/tournament
|
||||
newTag: 0.1.0-x86_v2
|
||||
newTag: 0.3.0-x86_v2
|
||||
- name: ghcr.io/now-chess/now-chess-systems/ws
|
||||
newTag: 0.16.0-x86_v2
|
||||
|
||||
@@ -19,3 +19,8 @@ master:
|
||||
|
||||
persistence:
|
||||
enabled: false
|
||||
|
||||
commonConfiguration: |-
|
||||
appendonly yes
|
||||
save ""
|
||||
aof-load-corrupt-tail-max-size 88
|
||||
|
||||
@@ -11,10 +11,12 @@ resources:
|
||||
- nowchess/staging/ncs-jwt-keys.yaml
|
||||
- nowchess/staging/ncs-db-secrets.yaml
|
||||
- nowchess/staging/ncs-internal-secret.yaml
|
||||
- nowchess/staging/ncs-tournament-secret.yaml
|
||||
- nowchess/eu-central-1-prod/ghcr-pull-secret.yaml
|
||||
- nowchess/eu-central-1-prod/ncs-jwt-keys.yaml
|
||||
- nowchess/eu-central-1-prod/ncs-db-secrets.yaml
|
||||
- nowchess/eu-central-1-prod/ncs-internal-secret.yaml
|
||||
- nowchess/eu-central-1-prod/ncs-tournament-secret.yaml
|
||||
- nowchess/kargo/ghcr-image-secret.yaml
|
||||
- nowchess/kargo/github-image-secret.yaml
|
||||
- nowchess/kargo/remotek6-certs.yaml
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# PLACEHOLDER — seal with eu-central-1 cluster key before use:
|
||||
# kubectl -n nowchess create secret generic ncs-tournament-secret \
|
||||
# --from-literal=TOURNAMENT_BOT_TOKEN=<token-from-nowchess-api> \
|
||||
# --dry-run=client -o yaml | kubeseal --controller-namespace kube-system -o yaml > this-file.yaml
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: ncs-tournament-secret
|
||||
namespace: nowchess
|
||||
spec:
|
||||
encryptedData:
|
||||
REPLACE_KEY: REPLACE_WITH_SEALED_VALUE
|
||||
template:
|
||||
metadata:
|
||||
name: ncs-tournament-secret
|
||||
namespace: nowchess
|
||||
@@ -0,0 +1,16 @@
|
||||
# PLACEHOLDER — seal with htwg-1 cluster key before use:
|
||||
# kubectl -n nowchess create secret generic ncs-tournament-secret \
|
||||
# --from-literal=TOURNAMENT_BOT_TOKEN=<token-from-nowchess-api> \
|
||||
# --dry-run=client -o yaml | kubeseal --controller-namespace kube-system -o yaml > this-file.yaml
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: ncs-tournament-secret
|
||||
namespace: nowchess
|
||||
spec:
|
||||
encryptedData:
|
||||
REPLACE_KEY: REPLACE_WITH_SEALED_VALUE
|
||||
template:
|
||||
metadata:
|
||||
name: ncs-tournament-secret
|
||||
namespace: nowchess
|
||||
@@ -0,0 +1,16 @@
|
||||
# PLACEHOLDER — seal with staging cluster key before use:
|
||||
# kubectl -n nowchess create secret generic ncs-tournament-secret \
|
||||
# --from-literal=TOURNAMENT_BOT_TOKEN=<token-from-nowchess-api> \
|
||||
# --dry-run=client -o yaml | kubeseal --controller-namespace kube-system -o yaml > this-file.yaml
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
name: ncs-tournament-secret
|
||||
namespace: nowchess
|
||||
spec:
|
||||
encryptedData:
|
||||
REPLACE_KEY: REPLACE_WITH_SEALED_VALUE
|
||||
template:
|
||||
metadata:
|
||||
name: ncs-tournament-secret
|
||||
namespace: nowchess
|
||||
@@ -19,6 +19,8 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: spark-analytics
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
fsGroup: 185
|
||||
imagePullSecrets:
|
||||
- name: ghcr-pull-secret
|
||||
containers:
|
||||
@@ -34,10 +36,6 @@ spec:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.OpeningBookJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -61,23 +59,18 @@ spec:
|
||||
key: STORE_DB_PASSWORD
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 768Mi
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: spark-output
|
||||
mountPath: /spark-output
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-output
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-analytics-output
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
@@ -100,6 +93,8 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: spark-analytics
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
fsGroup: 185
|
||||
imagePullSecrets:
|
||||
- name: ghcr-pull-secret
|
||||
containers:
|
||||
@@ -115,10 +110,6 @@ spec:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.PlayerStatsJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -141,23 +132,18 @@ spec:
|
||||
key: STORE_DB_PASSWORD
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 768Mi
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: spark-output
|
||||
mountPath: /spark-output
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-output
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-analytics-output
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
@@ -180,6 +166,8 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: spark-analytics
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
fsGroup: 185
|
||||
imagePullSecrets:
|
||||
- name: ghcr-pull-secret
|
||||
containers:
|
||||
@@ -195,10 +183,6 @@ spec:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.PlayerClusteringJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -222,23 +206,18 @@ spec:
|
||||
key: STORE_DB_PASSWORD
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 768Mi
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: spark-output
|
||||
mountPath: /spark-output
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-output
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-analytics-output
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
@@ -261,6 +240,8 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: spark-analytics
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
fsGroup: 185
|
||||
imagePullSecrets:
|
||||
- name: ghcr-pull-secret
|
||||
containers:
|
||||
@@ -276,10 +257,6 @@ spec:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.PlayerGraphJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -302,20 +279,15 @@ spec:
|
||||
key: STORE_DB_PASSWORD
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 768Mi
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: spark-output
|
||||
mountPath: /spark-output
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-output
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-analytics-output
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: spark-live-dashboard-driver
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-analytics
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: spark-live-dashboard
|
||||
ports:
|
||||
- name: driver
|
||||
port: 37007
|
||||
targetPort: 37007
|
||||
- name: blockmanager
|
||||
port: 37777
|
||||
targetPort: 37777
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -7,6 +26,8 @@ metadata:
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spark-live-dashboard
|
||||
@@ -18,6 +39,8 @@ spec:
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
serviceAccountName: spark-analytics
|
||||
securityContext:
|
||||
fsGroup: 185
|
||||
imagePullSecrets:
|
||||
- name: ghcr-pull-secret
|
||||
containers:
|
||||
@@ -34,9 +57,11 @@ spec:
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- spark.driver.host=spark-live-dashboard-driver
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- spark.driver.port=37007
|
||||
- --conf
|
||||
- spark.blockManager.port=37777
|
||||
- --class
|
||||
- de.nowchess.analytics.LiveDashboardJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -59,20 +84,15 @@ spec:
|
||||
key: STORE_DB_PASSWORD
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 768Mi
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: spark-checkpoint
|
||||
mountPath: /spark-checkpoint
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-checkpoint
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-streaming-checkpoint
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
|
||||
@@ -5,7 +5,7 @@ resources:
|
||||
- ../base
|
||||
images:
|
||||
- name: ghcr.io/now-chess/now-chess-systems/analytics
|
||||
newTag: 0.1.0
|
||||
newTag: 0.2.0
|
||||
patches:
|
||||
# Pin the analytics image tag in each CronJob and the Deployment.
|
||||
# The base uses :latest; overlays pin to a released tag.
|
||||
@@ -31,10 +31,6 @@ patches:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.OpeningBookJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -65,10 +61,6 @@ patches:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.PlayerStatsJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -98,10 +90,6 @@ patches:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.PlayerClusteringJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -132,10 +120,6 @@ patches:
|
||||
- spark.executor.memory=1g
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.PlayerGraphJob
|
||||
- local:///app/analytics.jar
|
||||
@@ -163,10 +147,6 @@ patches:
|
||||
- spark.executor.memory=512m
|
||||
- --conf
|
||||
- spark.driver.memory=512m
|
||||
- --conf
|
||||
- spark.eventLog.enabled=true
|
||||
- --conf
|
||||
- spark.eventLog.dir=/spark-events
|
||||
- --class
|
||||
- de.nowchess.analytics.LiveDashboardJob
|
||||
- local:///app/analytics.jar
|
||||
|
||||
@@ -18,10 +18,9 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: history-server
|
||||
# Same image version the Bitnami chart deploys for master/workers.
|
||||
image: docker.io/bitnami/spark:3.5.2
|
||||
image: apache/spark:4.0.3-scala2.13-java17-ubuntu
|
||||
command:
|
||||
- /opt/bitnami/spark/bin/spark-class
|
||||
- /opt/spark/bin/spark-class
|
||||
- org.apache.spark.deploy.history.HistoryServer
|
||||
env:
|
||||
- name: SPARK_HISTORY_OPTS
|
||||
@@ -32,7 +31,7 @@ spec:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
@@ -41,8 +40,7 @@ spec:
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
@@ -6,7 +6,7 @@ metadata:
|
||||
app.kubernetes.io/name: spark-cluster
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: spark.nowchess.janis-eccarius.de
|
||||
http:
|
||||
@@ -15,9 +15,9 @@ spec:
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: spark-master-svc
|
||||
name: spark-master
|
||||
port:
|
||||
number: 80
|
||||
number: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
@@ -26,13 +26,8 @@ metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-cluster
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
annotations:
|
||||
# NOTE: The Bitnami spark chart 9.2.10 does not include a standalone history
|
||||
# server deployment or service. This Ingress is a placeholder. To activate
|
||||
# history server access, deploy a separate spark-history-server Deployment
|
||||
# and Service named spark-history-server-svc on port 18080.
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: spark-history.nowchess.janis-eccarius.de
|
||||
http:
|
||||
|
||||
@@ -3,58 +3,7 @@ kind: Kustomization
|
||||
|
||||
resources:
|
||||
- pvc.yaml
|
||||
- master.yaml
|
||||
- workers.yaml
|
||||
- history-server.yaml
|
||||
- ingress.yaml
|
||||
|
||||
helmCharts:
|
||||
- name: spark
|
||||
repo: https://charts.bitnami.com/bitnami
|
||||
version: "9.2.10"
|
||||
releaseName: spark
|
||||
namespace: nowchess
|
||||
valuesInline:
|
||||
master:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 2Gi
|
||||
extraVolumes:
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
extraVolumeMounts:
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
worker:
|
||||
replicaCount: 2
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 2Gi
|
||||
extraVolumes:
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
extraVolumeMounts:
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
historyServer:
|
||||
enabled: true
|
||||
eventsDir: /spark-events
|
||||
extraVolumes:
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
extraVolumeMounts:
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
ingress:
|
||||
enabled: false
|
||||
service:
|
||||
type: ClusterIP
|
||||
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spark-master
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-master
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: spark-master
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-master
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
# Prevent K8s from injecting SPARK_MASTER_PORT=tcp://... env vars (Docker-link
|
||||
# style). Spark master parses SPARK_MASTER_PORT as an integer and crashes.
|
||||
enableServiceLinks: false
|
||||
containers:
|
||||
- name: spark-master
|
||||
image: apache/spark:4.0.3-scala2.13-java17-ubuntu
|
||||
command:
|
||||
- /opt/spark/bin/spark-class
|
||||
- org.apache.spark.deploy.master.Master
|
||||
ports:
|
||||
- name: cluster
|
||||
containerPort: 7077
|
||||
- name: webui
|
||||
containerPort: 8080
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 2Gi
|
||||
volumeMounts:
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-events
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: spark-master
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-master
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: spark-master
|
||||
ports:
|
||||
- name: cluster
|
||||
port: 7077
|
||||
targetPort: cluster
|
||||
- name: webui
|
||||
port: 8080
|
||||
targetPort: webui
|
||||
type: ClusterIP
|
||||
@@ -1,18 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: spark-events
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-cluster
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
# ReadWriteOnce for k3d/local-path compatibility.
|
||||
# NOTE: k3d uses the local-path provisioner which only supports RWO.
|
||||
# For production with multiple concurrent writers (workers + history server),
|
||||
# replace with a RWX-capable storage class such as NFS or Longhorn and
|
||||
# change accessModes to [ReadWriteMany].
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
# No cluster-level PVCs needed.
|
||||
# Analytics output and streaming checkpoint PVCs live in spark-analytics/base/pvc.yaml.
|
||||
# spark-events PVC removed: local-path provisioner is RWO-only; sharing a single PVC
|
||||
# across master, workers, and history-server on different nodes causes Multi-Attach errors.
|
||||
# Event logs now use emptyDir (pod-local, ephemeral) on each pod.
|
||||
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spark-worker
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-worker
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: spark-worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-worker
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
containers:
|
||||
- name: spark-worker
|
||||
image: apache/spark:4.0.3-scala2.13-java17-ubuntu
|
||||
command:
|
||||
- /opt/spark/bin/spark-class
|
||||
- org.apache.spark.deploy.worker.Worker
|
||||
- spark://spark-master:7077
|
||||
env:
|
||||
- name: SPARK_WORKER_CORES
|
||||
value: "1"
|
||||
- name: SPARK_WORKER_MEMORY
|
||||
value: "512m"
|
||||
ports:
|
||||
- name: webui
|
||||
containerPort: 8081
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 2Gi
|
||||
volumeMounts:
|
||||
- name: spark-events
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-events
|
||||
emptyDir: {}
|
||||
Reference in New Issue
Block a user