---
source: packages/shulker-operator/src/reconcilers/proxy_fleet/fleet.rs
expression: fleet
---
apiVersion: agones.dev/v1
kind: Fleet
metadata:
  labels:
    app.kubernetes.io/component: proxy
    app.kubernetes.io/instance: proxy-my-proxy
    app.kubernetes.io/managed-by: shulker-operator
    app.kubernetes.io/name: proxy
    app.kubernetes.io/part-of: cluster-my-cluster
    minecraftcluster.shulkermc.io/name: my-cluster
    proxyfleet.shulkermc.io/name: my-proxy
  name: my-proxy
  namespace: default
spec:
  replicas: 0
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  scheduling: Packed
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/default-container: proxy
        test-annotation/shulkermc.io: my-value
      labels:
        app.kubernetes.io/component: proxy
        app.kubernetes.io/instance: proxy-my-proxy
        app.kubernetes.io/managed-by: shulker-operator
        app.kubernetes.io/name: proxy
        app.kubernetes.io/part-of: cluster-my-cluster
        minecraftcluster.shulkermc.io/name: my-cluster
        proxyfleet.shulkermc.io/name: my-proxy
        test-label/shulkermc.io: my-value
    spec:
      ports: []
      health:
        disabled: false
        periodSeconds: 10
        failureThreshold: 5
        initialDelaySeconds: 30
      template:
        metadata:
          annotations:
            kubectl.kubernetes.io/default-container: proxy
            test-annotation/shulkermc.io: my-value
          labels:
            app.kubernetes.io/component: proxy
            app.kubernetes.io/instance: proxy-my-proxy
            app.kubernetes.io/managed-by: shulker-operator
            app.kubernetes.io/name: proxy
            app.kubernetes.io/part-of: cluster-my-cluster
            minecraftcluster.shulkermc.io/name: my-cluster
            proxyfleet.shulkermc.io/name: my-proxy
            test-label/shulkermc.io: my-value
        spec:
          containers:
            - env:
                - name: SHULKER_CLUSTER_NAME
                  value: my-cluster
                - name: SHULKER_PROXY_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.namespace
                - name: SHULKER_PROXY_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: SHULKER_PROXY_FLEET_NAME
                  value: my-proxy
                - name: SHULKER_PROXY_TTL_SECONDS
                  value: "3600"
                - name: SHULKER_PROXY_PLAYER_DELTA_BEFORE_EXCLUSION
                  value: "15"
                - name: SHULKER_PROXY_REDIS_HOST
                  value: my-cluster-redis-managed
                - name: SHULKER_PROXY_REDIS_PORT
                  value: "6379"
                - name: TYPE
                  value: VELOCITY
                - name: VELOCITY_BUILD_ID
                  value: latest
                - name: HEALTH_USE_PROXY
                  value: "true"
                - name: SHULKER_PROXY_PREFERRED_RECONNECT_ADDRESS
                  value: 127.0.0.1
                - name: EXTRA_ENV
                  value: my_value
              image: "itzg/mc-proxy:2024.6.0-java21"
              imagePullPolicy: IfNotPresent
              name: proxy
              ports:
                - containerPort: 25577
                  name: minecraft
              readinessProbe:
                exec:
                  command:
                    - bash
                    - /server/probe-readiness.sh
                initialDelaySeconds: 10
                periodSeconds: 10
              securityContext:
                allowPrivilegeEscalation: false
                capabilities:
                  drop:
                    - ALL
                readOnlyRootFilesystem: true
                runAsNonRoot: true
                runAsUser: 1000
              volumeMounts:
                - mountPath: /mnt/shulker/forwarding-secret
                  name: shulker-forwarding-secret
                  readOnly: true
                - mountPath: /server
                  name: proxy-data
                - mountPath: /mnt/drain-lock
                  name: proxy-drain-lock
                  readOnly: true
                - mountPath: /tmp
                  name: proxy-tmp
                - mountPath: /mnt/shulker/external-servers
                  name: shulker-external-servers
                  readOnly: true
          initContainers:
            - command:
                - sh
                - /mnt/shulker/config/init-fs.sh
              env:
                - name: SHULKER_CONFIG_DIR
                  value: /mnt/shulker/config
                - name: SHULKER_PROXY_DATA_DIR
                  value: /server
                - name: SHULKER_VERSION_CHANNEL
                  value: Velocity
                - name: SHULKER_PROXY_PLUGIN_URLS
                  value: "https://maven.jeremylvln.fr/repository/shulker-snapshots/io/shulkermc/shulker-proxy-agent/0.0.0-test-cfg/shulker-proxy-agent-0.0.0-test-cfg-velocity.jar;https://example.com/my_plugin.jar"
                - name: SHULKER_PROXY_PATCH_URLS
                  value: "https://example.com/my_patch.tar.gz"
              image: "alpine:latest"
              name: init-fs
              securityContext:
                allowPrivilegeEscalation: false
                capabilities:
                  drop:
                    - ALL
                readOnlyRootFilesystem: true
                runAsNonRoot: true
                runAsUser: 1000
              volumeMounts:
                - mountPath: /mnt/shulker/config
                  name: shulker-config
                  readOnly: true
                - mountPath: /server
                  name: proxy-data
          nodeSelector:
            beta.kubernetes.io/os: linux
          restartPolicy: Never
          serviceAccountName: shulker-my-cluster-proxy
          volumes:
            - configMap:
                name: my-proxy-config
              name: shulker-config
            - name: shulker-forwarding-secret
              secret:
                secretName: my-cluster-forwarding-secret
            - emptyDir: {}
              name: proxy-data
            - emptyDir: {}
              name: proxy-drain-lock
            - emptyDir: {}
              name: proxy-tmp
            - configMap:
                name: my-cluster-external-servers
              name: shulker-external-servers
      eviction:
        safe: OnUpgrade
