-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(playit): implementation #4445
Merged
Merged
Conversation
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
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports MegaLinter is graciously provided by OX Security |
Quality Gate passedIssues Measures |
--- HelmRelease: gaming-public/minecraft-public-velocity-proxy Deployment: gaming-public/minecraft-public-velocity-proxy
+++ HelmRelease: gaming-public/minecraft-public-velocity-proxy Deployment: gaming-public/minecraft-public-velocity-proxy
@@ -23,12 +23,13 @@
template:
metadata:
labels:
app.kubernetes.io/component: velocity
app.kubernetes.io/instance: minecraft-public-velocity-proxy
app.kubernetes.io/name: minecraft-public-velocity-proxy
+ ingress.home.arpa/playit: allow
spec:
enableServiceLinks: false
serviceAccountName: default
automountServiceAccountToken: true
securityContext:
fsGroup: 1000
--- HelmRelease: networking/playit Deployment: networking/playit
+++ HelmRelease: networking/playit Deployment: networking/playit
@@ -0,0 +1,73 @@
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: playit
+ labels:
+ app.kubernetes.io/component: plait
+ app.kubernetes.io/instance: playit
+ app.kubernetes.io/managed-by: Helm
+ app.kubernetes.io/name: playit
+ annotations:
+ reloader.stakater.com/auto: 'true'
+spec:
+ revisionHistoryLimit: 3
+ replicas: 1
+ strategy:
+ type: Recreate
+ selector:
+ matchLabels:
+ app.kubernetes.io/component: plait
+ app.kubernetes.io/name: playit
+ app.kubernetes.io/instance: playit
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/component: plait
+ app.kubernetes.io/instance: playit
+ app.kubernetes.io/name: playit
+ spec:
+ enableServiceLinks: false
+ serviceAccountName: default
+ automountServiceAccountToken: false
+ securityContext:
+ fsGroup: 65534
+ fsGroupChangePolicy: OnRootMismatch
+ runAsGroup: 65534
+ runAsNonRoot: true
+ runAsUser: 65534
+ seccompProfile:
+ type: RuntimeDefault
+ hostIPC: false
+ hostNetwork: false
+ hostPID: false
+ dnsPolicy: ClusterFirst
+ containers:
+ - env:
+ - name: TZ
+ value: Europe/Vienna
+ image: ghcr.io/playit-cloud/playit-agent:0.15.26@sha256:3d08eb4a627a6d167f3cce497d8e2ec8f9e7d2df4e96f0599ca41e4b957c852c
+ name: playit
+ ports:
+ - containerPort: 8080
+ name: http
+ protocol: TCP
+ resources:
+ requests:
+ cpu: 10m
+ memory: 150Mi
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ readOnlyRootFilesystem: true
+ volumeMounts:
+ - mountPath: /config/playit.toml
+ name: playit-toml
+ subPath: playit.toml
+ volumes:
+ - name: playit-toml
+ secret:
+ secretName: playit
+ |
--- kubernetes/talos-flux/apps Kustomization: flux-system/apps-sync Kustomization: flux-system/playit
+++ kubernetes/talos-flux/apps Kustomization: flux-system/apps-sync Kustomization: flux-system/playit
@@ -0,0 +1,36 @@
+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+ labels:
+ kustomize.toolkit.fluxcd.io/name: apps-sync
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ substitution.flux.home.arpa/enabled: 'true'
+ name: playit
+ namespace: flux-system
+spec:
+ commonMetadata:
+ labels:
+ app.kubernetes.io/name: playit
+ decryption:
+ provider: sops
+ secretRef:
+ name: sops-age
+ dependsOn:
+ - name: apps-external-secrets-stores
+ interval: 30m
+ path: ./kubernetes/talos-flux/apps/networking/playit/app
+ postBuild:
+ substituteFrom:
+ - kind: ConfigMap
+ name: cluster-settings
+ - kind: Secret
+ name: cluster-secrets
+ prune: true
+ sourceRef:
+ kind: GitRepository
+ name: home-ops
+ targetNamespace: networking
+ timeout: 5m
+ wait: true
+
--- kubernetes/talos-flux/apps/gaming-public/minecraft-java/velocity-proxy Kustomization: flux-system/minecraft-public-velocity-proxy HelmRelease: gaming-public/minecraft-public-velocity-proxy
+++ kubernetes/talos-flux/apps/gaming-public/minecraft-java/velocity-proxy Kustomization: flux-system/minecraft-public-velocity-proxy HelmRelease: gaming-public/minecraft-public-velocity-proxy
@@ -83,12 +83,14 @@
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
pod:
+ labels:
+ ingress.home.arpa/playit: allow
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
--- kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit ExternalSecret: networking/playit
+++ kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit ExternalSecret: networking/playit
@@ -0,0 +1,34 @@
+---
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+ labels:
+ app.kubernetes.io/name: playit
+ kustomize.toolkit.fluxcd.io/name: playit
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: playit
+ namespace: networking
+spec:
+ dataFrom:
+ - extract:
+ key: infra/techtales/network/playit
+ refreshInterval: 1m
+ secretStoreRef:
+ kind: ClusterSecretStore
+ name: vault-backend
+ target:
+ creationPolicy: Owner
+ name: playit
+ template:
+ data:
+ playit.toml: |
+ api_url = "https://api.playit.cloud/agent"
+ ping_target_addresses = []
+ control_address = "control.playit.gg"
+ refresh_from_api = true
+ api_refresh_rate = 5000
+ ping_interval = 5000
+ secret_key = "{{ .PLAYIT_SECRET_KEY }}"
+ mappings = []
+ engineVersion: v2
+
--- kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit CiliumNetworkPolicy: networking/playit
+++ kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit CiliumNetworkPolicy: networking/playit
@@ -0,0 +1,24 @@
+---
+apiVersion: cilium.io/v2
+kind: CiliumNetworkPolicy
+metadata:
+ labels:
+ app.kubernetes.io/name: playit
+ kustomize.toolkit.fluxcd.io/name: playit
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: playit
+ namespace: networking
+spec:
+ egress:
+ - toEntities:
+ - world
+ - toEndpoints:
+ - matchExpressions:
+ - key: io.kubernetes.pod.namespace
+ operator: Exists
+ matchLabels:
+ ingress.home.arpa/playit: allow
+ endpointSelector:
+ matchLabels:
+ app.kubernetes.io/name: playit
+
--- kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit CiliumClusterwideNetworkPolicy: networking/playit-to-app
+++ kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit CiliumClusterwideNetworkPolicy: networking/playit-to-app
@@ -0,0 +1,19 @@
+---
+apiVersion: cilium.io/v2
+kind: CiliumClusterwideNetworkPolicy
+metadata:
+ labels:
+ app.kubernetes.io/name: playit
+ kustomize.toolkit.fluxcd.io/name: playit
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: playit-to-app
+ namespace: networking
+spec:
+ endpointSelector:
+ matchLabels:
+ ingress.home.arpa/playit: allow
+ ingress:
+ - fromEndpoints:
+ - matchLabels:
+ app.kubernetes.io/name: playit
+
--- kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit HelmRelease: networking/playit
+++ kubernetes/talos-flux/apps/networking/playit/app Kustomization: flux-system/playit HelmRelease: networking/playit
@@ -0,0 +1,84 @@
+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+ labels:
+ app.kubernetes.io/name: playit
+ kustomize.toolkit.fluxcd.io/name: playit
+ kustomize.toolkit.fluxcd.io/namespace: flux-system
+ name: playit
+ namespace: networking
+spec:
+ chart:
+ spec:
+ chart: app-template
+ interval: 15m
+ sourceRef:
+ kind: HelmRepository
+ name: bjw-s-charts
+ namespace: flux-system
+ version: 3.6.1
+ install:
+ createNamespace: false
+ remediation:
+ retries: 3
+ interval: 30m
+ upgrade:
+ cleanupOnFail: true
+ remediation:
+ retries: 3
+ strategy: rollback
+ values:
+ controllers:
+ plait:
+ annotations:
+ reloader.stakater.com/auto: 'true'
+ containers:
+ app:
+ env:
+ TZ: Europe/Vienna
+ image:
+ repository: ghcr.io/playit-cloud/playit-agent
+ tag: 0.15.26@sha256:3d08eb4a627a6d167f3cce497d8e2ec8f9e7d2df4e96f0599ca41e4b957c852c
+ nameOverride: playit
+ ports:
+ - containerPort: 8080
+ name: http
+ protocol: TCP
+ probes:
+ liveness:
+ enabled: false
+ readiness:
+ enabled: false
+ startup:
+ enabled: false
+ resources:
+ requests:
+ cpu: 10m
+ memory: 150Mi
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ readOnlyRootFilesystem: true
+ replicas: 1
+ defaultPodOptions:
+ automountServiceAccountToken: false
+ securityContext:
+ fsGroup: 65534
+ fsGroupChangePolicy: OnRootMismatch
+ runAsGroup: 65534
+ runAsNonRoot: true
+ runAsUser: 65534
+ seccompProfile:
+ type: RuntimeDefault
+ persistence:
+ playit-toml:
+ globalMounts:
+ - path: /config/playit.toml
+ readOnly: false
+ subPath: playit.toml
+ name: playit
+ type: secret
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.