apiVersion: apps/v1 kind: Deployment metadata: name: auth-server labels: app.kubernetes.io/name: auth-server app.kubernetes.io/instance: auth-server app.kubernetes.io/version: "0.1.0" app.kubernetes.io/component: api app.kubernetes.io/part-of: auth-platform app.kubernetes.io/managed-by: kustomize spec: replicas: 1 revisionHistoryLimit: 5 progressDeadlineSeconds: 600 strategy: type: RollingUpdate rollingUpdate: maxSurge: 25% maxUnavailable: 0 selector: matchLabels: app.kubernetes.io/name: auth-server app.kubernetes.io/instance: auth-server template: metadata: labels: app.kubernetes.io/name: auth-server app.kubernetes.io/instance: auth-server app.kubernetes.io/version: "0.1.0" app.kubernetes.io/component: api app.kubernetes.io/part-of: auth-platform app.kubernetes.io/managed-by: kustomize spec: serviceAccountName: auth-server-sa automountServiceAccountToken: false terminationGracePeriodSeconds: 45 topologySpreadConstraints: - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: app.kubernetes.io/name: auth-server app.kubernetes.io/instance: auth-server securityContext: runAsNonRoot: true runAsUser: 10001 runAsGroup: 10001 fsGroup: 10001 fsGroupChangePolicy: OnRootMismatch seccompProfile: type: RuntimeDefault containers: - name: auth-server image: registry.example.com/auth-platform/auth-server:0.1.0 imagePullPolicy: IfNotPresent ports: - name: http containerPort: 8080 protocol: TCP - name: metrics containerPort: 8081 protocol: TCP envFrom: - configMapRef: name: auth-server-config - secretRef: name: auth-server-db env: - name: JAVA_TOOL_OPTIONS value: "-XX:MaxRAMPercentage=75 -XX:+ExitOnOutOfMemoryError" - name: SPRING_CONFIG_IMPORT value: "optional:configtree:/etc/secrets/" resources: requests: cpu: 250m memory: 512Mi limits: memory: 768Mi startupProbe: httpGet: path: /actuator/health/liveness port: metrics periodSeconds: 5 failureThreshold: 24 timeoutSeconds: 3 readinessProbe: httpGet: path: /actuator/health/readiness port: metrics periodSeconds: 5 failureThreshold: 3 timeoutSeconds: 2 livenessProbe: httpGet: path: /actuator/health/liveness port: metrics periodSeconds: 15 failureThreshold: 3 timeoutSeconds: 3 securityContext: runAsNonRoot: true runAsUser: 10001 runAsGroup: 10001 allowPrivilegeEscalation: false privileged: false readOnlyRootFilesystem: true capabilities: drop: - ALL seccompProfile: type: RuntimeDefault volumeMounts: - name: db-creds mountPath: /etc/secrets readOnly: true - name: tmp mountPath: /tmp volumes: - name: db-creds secret: secretName: auth-server-db defaultMode: 0400 - name: tmp emptyDir: medium: Memory sizeLimit: 128Mi