Skip to content
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(velocity): add whitelist #4452

Merged
merged 1 commit into from
Feb 2, 2025
Merged

Conversation

jazzlyn
Copy link
Collaborator

@jazzlyn jazzlyn commented Feb 2, 2025

No description provided.

Copy link

sonarqubecloud bot commented Feb 2, 2025

@tyriis-automation
Copy link
Contributor

--- 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

@@ -113,12 +113,21 @@

         - path: /server
         type: persistentVolumeClaim
       tmp:
         globalMounts:
         - path: /tmp
         type: emptyDir
+      whitelist:
+        advancedMounts:
+          velocity:
+            app:
+            - path: /server/plugins/simplewhitelist/whitelist.txt
+              readOnly: true
+              subPath: whitelist.txt
+        name: minecraft-public-velocity-proxy-whitelist
+        type: secret
     service:
       velocity:
         annotations:
           io.cilium/lb-ipam-ips: 192.168.1.86
         controller: velocity
         ports:
--- kubernetes/talos-flux/apps/gaming-public/minecraft-java/velocity-proxy Kustomization: flux-system/minecraft-public-velocity-proxy ExternalSecret: gaming-public/minecraft-public-velocity-proxy-whitelist

+++ kubernetes/talos-flux/apps/gaming-public/minecraft-java/velocity-proxy Kustomization: flux-system/minecraft-public-velocity-proxy ExternalSecret: gaming-public/minecraft-public-velocity-proxy-whitelist

@@ -0,0 +1,26 @@

+---
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  labels:
+    app.kubernetes.io/name: minecraft-public-velocity-proxy
+    kustomize.toolkit.fluxcd.io/name: minecraft-public-velocity-proxy
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: minecraft-public-velocity-proxy-whitelist
+  namespace: gaming-public
+spec:
+  dataFrom:
+  - extract:
+      key: infra/techtales/gaming-public/minecraft-java
+  refreshInterval: 1m
+  secretStoreRef:
+    kind: ClusterSecretStore
+    name: vault-backend
+  target:
+    creationPolicy: Owner
+    name: minecraft-public-velocity-proxy-whitelist
+    template:
+      data:
+        whitelist.txt: '{{ .WHITELIST_TXT }}'
+      engineVersion: v2
+

@tyriis-automation
Copy link
Contributor

--- 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

@@ -117,16 +117,23 @@

           readOnly: true
           subPath: forwarding.secret
         - mountPath: /server
           name: data
         - mountPath: /tmp
           name: tmp
+        - mountPath: /server/plugins/simplewhitelist/whitelist.txt
+          name: whitelist
+          readOnly: true
+          subPath: whitelist.txt
       volumes:
       - configMap:
           name: minecraft-public-velocity-proxy-config
         name: config
       - name: data
         persistentVolumeClaim:
           claimName: minecraft-public-velocity-proxy-data
       - emptyDir: {}
         name: tmp
+      - name: whitelist
+        secret:
+          secretName: minecraft-public-velocity-proxy-whitelist

@tyriis-automation
Copy link
Contributor

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 3 0 0.02s
✅ REPOSITORY gitleaks yes no 2.96s
✅ YAML prettier 3 0 0.41s
✅ YAML yamllint 3 0 0.37s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@jazzlyn jazzlyn merged commit ea328e3 into main Feb 2, 2025
16 checks passed
@jazzlyn jazzlyn deleted the feature/velocity-add-whitelist branch February 2, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant