apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    banzaicloud.com/last-applied: UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAb3JpZ2luYWzsO2tz4zaSfwWL+MrJlqiHHxlbKdWV19Y4qtiST5Ivlxu5VBDZIrEGAQYAJSte//erBkhKsmXPTLK3mw+umXLZQKPf6AfZfKQpWBYxy2j7kQo2A2HwN5ZltE21UvdBCFkS6HhJa7hav89noCVYMHWuGqFKMyVBWtqmCKhmf4fQGqs0mDou1BFHnavdpzUwC1EwW20RUxloZpXeeYZLY5kMoSC4EyZlksVfiVeytMT5qrQZ0zZQ8zVpB70AbbiStE1bJ/WD+knQLHamEYNUySmPtk+U63aVIUlPDX9WUI7nNd5Fq946rp8WG8hJKUqAbJuMOX1UkhaA01DkxoKmbaoyQL2F9+WWN9TUWaqk+1SjhRa2DO9/YdTvlsQ2MaqlBD2EOWiQIRja/oQexP+7EmDTExqLFq3RmVDh/QDPXYAA68CszqFGQyWtVkIg337lnkvU4DlkycCxPXJcV9wWIudOz7OT0+jDYXMWNE/DVnD04bQZzD6cngRR67jVCg9npyfRCX26e6pRk0GIvq4hEzxkhrZbNWpAQIg+0n6kKbNhcvWZO/GaoV/Y86utgSxazSzEK8emEoLL+DaLmAXP3sOtZAvGBZsJoO3WU40WLjXcgsV1SDNRnnu/8X/sxv+xe/3vur4bHs/mcy65dW4lVQRnG39r+DXnGqKLXHMZj8IEohx9qRdLVS13HyDM/aX1GEbFtRmDTv39d5en+5BpMBgE/OI9rDalCYq7HmSCSbzQlb3atCdpjS6YyF08oSDRySN694T/nmo0U9GZtHyT9UxjCPoK3j89OjQFCuS9uhOjP1UcsCpTQsWrn5z+tl00UcY6uz/V6BJ4nFjaPm56JaF+GZegi5isY6fMIJgbHnWOTg4/hLP5SXA0P20GR4fNZjA7nH8ffDj4Pjydnc5PTmdHtEaD4B5WqLlOA2zYQKYaxUrgOC3/crARzFkubCBUHFgVGBuB1h0M5FvboPVb26mSQaGnz2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t2G5RvzlVAvdhei/tYqHD67bxfSJdq1U4Ys9lwX1LApSjlFzJ1MF2g/lL3uej89zhnVaCVF60oSSv3TIhDYnlFTl2MR+Q1jkjJuyB8N/A7J1iBQd4ZFNiMDyTM2fOV5RVTj/c+o+Im70xz26SRl3g3lYc4O0Lqci0ReyHnEymaz/7+TlbaF9D7VM3D3QOfxAIuXlW0LxPGOudAhr9l35i1l7CUTA8ws145LpFUmYjIQ/5DawKJgx5F95n9o33qucrX1C4iG3K/9Eiv8GyMQabRAsQM+UL1FfNaA1AiuJ1nE6kZHCa0L/JZMfQsVBqEQxErr9tLIYKnKDon54qU1bl5y6h5p+FMg9ksxy3Gg2MWyuAZvNa+5Hvb/siae1q3Is/k+evv//8+udG/uR3J6/NuZa+JQfSEQFG76AYli3XTD2nNHdPGzq4a1Evj3oGCZq+S9yUUcqqAZ+XfHgDPN7n63/yd3rvTp01aG7Axpcg115yJl7Mkp3mdrZXy94CGehS8v9HdrCkwnTcKNVCMb01x8p+MhjlQDfUXrPgPkcQkvbtK/8dD0a3k/ySRXBs28qcukeCLqPVrZG/rsPHIPlJv6NfuWudEmzOTD8itdlWv0dQov+/Egr7/+EZS2CXrMMN7iFdPPDhGKesEZTFQFtH5we1GjmzYOqqeM+RUbeIv7kRu8fv9AN/fzjehJylzmen3LoE2UK13kseaxcCE834CFT2gIGgOKDlAuuXQJbDfS5+w5n45OR12/dZwlVXzE0/KV4/bJ8Barykrx1fSDN7Mr1L487BVk3UFtW/6KO6c2PaTbh7p78h1rM5i6+Pv1fAAAA//9QSwcIfe0b7twOAABTOQAAUEsBAhQAFAAIAAgAAAAAAH3tG+7cDgAAUzkAAAgAAAAAAAAAAAAAAAAAAAAAAG9yaWdpbmFsUEsFBgAAAAABAAEANgAAABIPAAAAAA==
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2026-07-24T17:45:10Z"
  generation: 1
  labels:
    app: rook-ceph-rgw
    app.kubernetes.io/component: cephobjectstores.ceph.rook.io
    app.kubernetes.io/created-by: rook-ceph-operator
    app.kubernetes.io/instance: ceph
    app.kubernetes.io/managed-by: rook-ceph-operator
    app.kubernetes.io/name: ceph-rgw
    app.kubernetes.io/part-of: ceph
    ceph-version: 18.2.8-0
    ceph_daemon_id: ceph
    ceph_daemon_type: rgw
    rgw: ceph
    rook-version: v1.15.9
    rook.io/operator-namespace: rook-ceph
    rook_cluster: openstack
    rook_object_store: ceph
  name: rook-ceph-rgw-ceph-a
  namespace: openstack
  ownerReferences:
  - apiVersion: ceph.rook.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: CephObjectStore
    name: ceph
    uid: b89d730b-09c1-4790-b798-d1511c3b98d8
  resourceVersion: "9561"
  uid: b649a8cf-87de-4d4e-b9be-a5c4eaafe83b
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: rook-ceph-rgw
      ceph_daemon_id: ceph
      rgw: ceph
      rook_cluster: openstack
      rook_object_store: ceph
  strategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: rook-ceph-rgw
        app.kubernetes.io/component: cephobjectstores.ceph.rook.io
        app.kubernetes.io/created-by: rook-ceph-operator
        app.kubernetes.io/instance: ceph
        app.kubernetes.io/managed-by: rook-ceph-operator
        app.kubernetes.io/name: ceph-rgw
        app.kubernetes.io/part-of: ceph
        ceph_daemon_id: ceph
        ceph_daemon_type: rgw
        rgw: ceph
        rook.io/operator-namespace: rook-ceph
        rook_cluster: openstack
        rook_object_store: ceph
      name: rook-ceph-rgw-ceph-a
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: openstack-control-plane
                operator: In
                values:
                - enabled
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: rook-ceph-rgw
                  ceph_daemon_id: ceph
                  rgw: ceph
                  rook_cluster: openstack
                  rook_object_store: ceph
              topologyKey: kubernetes.io/hostname
            weight: 50
      containers:
      - args:
        - --fsid=4837cbf8-4f90-4300-b3f6-726c9b9f89b4
        - --keyring=/etc/ceph/keyring-store/keyring
        - --default-log-to-stderr=true
        - --default-err-to-stderr=true
        - --default-mon-cluster-log-to-stderr=true
        - '--default-log-stderr-prefix=debug '
        - --default-log-to-file=false
        - --default-mon-cluster-log-to-file=false
        - --mon-host=$(ROOK_CEPH_MON_HOST)
        - --mon-initial-members=$(ROOK_CEPH_MON_INITIAL_MEMBERS)
        - --id=rgw.ceph.a
        - --setuser=ceph
        - --setgroup=ceph
        - --foreground
        - --rgw-frontends=beast port=8080
        - --host=$(POD_NAME)
        - --rgw-mime-types-file=/etc/ceph/rgw/mime.types
        - --rgw-realm=ceph
        - --rgw-zonegroup=ceph
        - --rgw-zone=ceph
        command:
        - radosgw
        env:
        - name: CONTAINER_IMAGE
          value: harbor.atmosphere.dev/quay.io/ceph/ceph:v18.2.7
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: spec.nodeName
        - name: POD_MEMORY_LIMIT
          valueFrom:
            resourceFieldRef:
              divisor: "0"
              resource: limits.memory
        - name: POD_MEMORY_REQUEST
          valueFrom:
            resourceFieldRef:
              divisor: "0"
              resource: requests.memory
        - name: POD_CPU_LIMIT
          valueFrom:
            resourceFieldRef:
              divisor: "1"
              resource: limits.cpu
        - name: POD_CPU_REQUEST
          valueFrom:
            resourceFieldRef:
              divisor: "0"
              resource: requests.cpu
        - name: CEPH_USE_RANDOM_NONCE
          value: "true"
        - name: ROOK_MSGR2
          value: msgr2_false_encryption_false_compression_false
        - name: ROOK_CEPH_MON_HOST
          valueFrom:
            secretKeyRef:
              key: mon_host
              name: rook-ceph-config
        - name: ROOK_CEPH_MON_INITIAL_MEMBERS
          valueFrom:
            secretKeyRef:
              key: mon_initial_members
              name: rook-ceph-config
        image: harbor.atmosphere.dev/quay.io/ceph/ceph:v18.2.7
        imagePullPolicy: IfNotPresent
        name: rgw
        readinessProbe:
          exec:
            command:
            - bash
            - -c
            - |
              #!/usr/bin/env bash

              PROBE_TYPE="readiness"
              PROBE_PORT="8080"
              PROBE_PROTOCOL="HTTP"

              # standard bash codes start at 126 and progress upward. pick error codes from 125 downward for
              # script as to allow curl to output new error codes and still return a distinctive number.
              USAGE_ERR_CODE=125
              PROBE_ERR_CODE=124
              # curl error codes: 1-123

              STARTUP_TYPE='startup'
              READINESS_TYPE='readiness'

              RGW_URL="$PROBE_PROTOCOL://0.0.0.0:$PROBE_PORT"

              function check() {
                local URL="$1"
                # --insecure - don't validate ssl if using secure port only
                # --silent - don't output progress info
                # --output /dev/stderr - output HTML header to stdout (good for debugging)
                # --write-out '%{response_code}' - print the HTTP response code to stdout
                curl --insecure --silent --output /dev/stderr --write-out '%{response_code}' "$URL"
              }

              http_response="$(check "$RGW_URL")"
              retcode=$?

              if [[ $retcode -ne 0 ]]; then
                # if this is the startup probe, always returning failure. if startup probe passes, all subsequent
                # probes can rely on the assumption that the health check was once succeeding without errors.
                # if this is the readiness probe, we know that curl was previously working correctly in the
                # startup probe, so curl error most likely means some new error with the RGW.
                echo "RGW health check failed with error code: $retcode. the RGW likely cannot be reached by clients" >/dev/stderr
                exit $retcode
              fi

              RGW_RATE_LIMITING_RESPONSE=503
              RGW_MISCONFIGURATION_RESPONSE=500

              if [[ $http_response -ge 200 ]] && [[ $http_response -lt 400 ]]; then
                # 200-399 are successful responses. same behavior as Kubernetes' HTTP probe
                exit 0

              elif [[ $http_response -eq $RGW_RATE_LIMITING_RESPONSE ]]; then
                # S3's '503: slow down' code is not an error but an indication that RGW is throttling client
                # traffic. failing the readiness check here would only cause an increase in client connections on
                # other RGWs and likely cause those to fail also in a cascade. i.e., a special healthy response.
                echo "INFO: RGW is rate limiting" 2>/dev/stderr
                exit 0

              elif [[ $http_response -eq $RGW_MISCONFIGURATION_RESPONSE ]]; then
                # can't specifically determine if the RGW is running or not. most likely a misconfiguration.
                case "$PROBE_TYPE" in
                "$STARTUP_TYPE")
                  # fail until we can accurately get a valid healthy response when runtime starts.
                  echo 'FAIL: HTTP code 500 suggests an RGW misconfiguration.' >/dev/stderr
                  exit $PROBE_ERR_CODE
                  ;;
                "$READINESS_TYPE")
                  # config likely modified at runtime which could result in all RGWs failing this check.
                  # occasional client failures are still better than total failure, so ignore this
                  echo 'WARN: HTTP code 500 suggests an RGW misconfiguration' >/dev/stderr
                  exit 0
                  ;;
                *)
                  # prior arg validation means this path should never be activated, but keep to be safe
                  echo "ERROR: probe type is unknown: $PROBE_TYPE" >/dev/stderr
                  exit $USAGE_ERR_CODE
                  ;;
                esac

              else
                # anything else is a failing response. same behavior as Kubernetes' HTTP probe
                echo "FAIL: received an HTTP error code: $http_response"
                exit $PROBE_ERR_CODE

              fi
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 3
          timeoutSeconds: 5
        resources: {}
        securityContext:
          privileged: false
        startupProbe:
          exec:
            command:
            - bash
            - -c
            - |
              #!/usr/bin/env bash

              PROBE_TYPE="startup"
              PROBE_PORT="8080"
              PROBE_PROTOCOL="HTTP"

              # standard bash codes start at 126 and progress upward. pick error codes from 125 downward for
              # script as to allow curl to output new error codes and still return a distinctive number.
              USAGE_ERR_CODE=125
              PROBE_ERR_CODE=124
              # curl error codes: 1-123

              STARTUP_TYPE='startup'
              READINESS_TYPE='readiness'

              RGW_URL="$PROBE_PROTOCOL://0.0.0.0:$PROBE_PORT"

              function check() {
                local URL="$1"
                # --insecure - don't validate ssl if using secure port only
                # --silent - don't output progress info
                # --output /dev/stderr - output HTML header to stdout (good for debugging)
                # --write-out '%{response_code}' - print the HTTP response code to stdout
                curl --insecure --silent --output /dev/stderr --write-out '%{response_code}' "$URL"
              }

              http_response="$(check "$RGW_URL")"
              retcode=$?

              if [[ $retcode -ne 0 ]]; then
                # if this is the startup probe, always returning failure. if startup probe passes, all subsequent
                # probes can rely on the assumption that the health check was once succeeding without errors.
                # if this is the readiness probe, we know that curl was previously working correctly in the
                # startup probe, so curl error most likely means some new error with the RGW.
                echo "RGW health check failed with error code: $retcode. the RGW likely cannot be reached by clients" >/dev/stderr
                exit $retcode
              fi

              RGW_RATE_LIMITING_RESPONSE=503
              RGW_MISCONFIGURATION_RESPONSE=500

              if [[ $http_response -ge 200 ]] && [[ $http_response -lt 400 ]]; then
                # 200-399 are successful responses. same behavior as Kubernetes' HTTP probe
                exit 0

              elif [[ $http_response -eq $RGW_RATE_LIMITING_RESPONSE ]]; then
                # S3's '503: slow down' code is not an error but an indication that RGW is throttling client
                # traffic. failing the readiness check here would only cause an increase in client connections on
                # other RGWs and likely cause those to fail also in a cascade. i.e., a special healthy response.
                echo "INFO: RGW is rate limiting" 2>/dev/stderr
                exit 0

              elif [[ $http_response -eq $RGW_MISCONFIGURATION_RESPONSE ]]; then
                # can't specifically determine if the RGW is running or not. most likely a misconfiguration.
                case "$PROBE_TYPE" in
                "$STARTUP_TYPE")
                  # fail until we can accurately get a valid healthy response when runtime starts.
                  echo 'FAIL: HTTP code 500 suggests an RGW misconfiguration.' >/dev/stderr
                  exit $PROBE_ERR_CODE
                  ;;
                "$READINESS_TYPE")
                  # config likely modified at runtime which could result in all RGWs failing this check.
                  # occasional client failures are still better than total failure, so ignore this
                  echo 'WARN: HTTP code 500 suggests an RGW misconfiguration' >/dev/stderr
                  exit 0
                  ;;
                *)
                  # prior arg validation means this path should never be activated, but keep to be safe
                  echo "ERROR: probe type is unknown: $PROBE_TYPE" >/dev/stderr
                  exit $USAGE_ERR_CODE
                  ;;
                esac

              else
                # anything else is a failing response. same behavior as Kubernetes' HTTP probe
                echo "FAIL: received an HTTP error code: $http_response"
                exit $PROBE_ERR_CODE

              fi
          failureThreshold: 33
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 5
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/ceph
          name: rook-config-override
          readOnly: true
        - mountPath: /run/ceph
          name: ceph-daemons-sock-dir
        - mountPath: /etc/ceph/keyring-store/
          name: rook-ceph-rgw-ceph-a-keyring
          readOnly: true
        - mountPath: /var/log/ceph
          name: rook-ceph-log
        - mountPath: /var/lib/ceph/crash
          name: rook-ceph-crash
        - mountPath: /var/lib/ceph/rgw/ceph-ceph
          name: ceph-daemon-data
        - mountPath: /etc/ceph/rgw
          name: rook-ceph-rgw-ceph-mime-types
          readOnly: true
        workingDir: /var/log/ceph
      - command:
        - /bin/bash
        - -x
        - -e
        - -m
        - -c
        - "\nCEPH_CLIENT_ID=ceph-client.rgw.ceph.a\nPERIODICITY=daily\nLOG_ROTATE_CEPH_FILE=/etc/logrotate.d/ceph\nLOG_MAX_SIZE=500M\nROTATE=7\n\n#
          edit the logrotate file to only rotate a specific daemon log\n# otherwise
          we will logrotate log files without reloading certain daemons\n# this might
          happen when multiple daemons run on the same machine\nsed -i \"s|*.log|$CEPH_CLIENT_ID.log|\"
          \"$LOG_ROTATE_CEPH_FILE\"\n\n# replace default daily with given user input\nsed
          --in-place \"s/daily/$PERIODICITY/g\" \"$LOG_ROTATE_CEPH_FILE\"\n\n# replace
          rotate count, default 7 for all ceph daemons other than rbd-mirror\nsed
          --in-place \"s/rotate 7/rotate $ROTATE/g\" \"$LOG_ROTATE_CEPH_FILE\"\n\nif
          [ \"$LOG_MAX_SIZE\" != \"0\" ]; then\n\t# adding maxsize $LOG_MAX_SIZE at
          the 4th line of the logrotate config file with 4 spaces to maintain indentation\n\tsed
          --in-place \"4i \\ \\ \\ \\ maxsize $LOG_MAX_SIZE\" \"$LOG_ROTATE_CEPH_FILE\"\nfi\n\nwhile
          true; do\n\t# we don't force the logrorate but we let the logrotate binary
          handle the rotation based on user's input for periodicity and size\n\tlogrotate
          --verbose \"$LOG_ROTATE_CEPH_FILE\"\n\tsleep 15m\ndone\n"
        image: harbor.atmosphere.dev/quay.io/ceph/ceph:v18.2.7
        imagePullPolicy: IfNotPresent
        name: log-collector
        resources:
          limits:
            memory: 1Gi
          requests:
            cpu: 100m
            memory: 100Mi
        securityContext:
          privileged: false
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        tty: true
        volumeMounts:
        - mountPath: /etc/ceph
          name: rook-config-override
          readOnly: true
        - mountPath: /run/ceph
          name: ceph-daemons-sock-dir
        - mountPath: /var/log/ceph
          name: rook-ceph-log
        - mountPath: /var/lib/ceph/crash
          name: rook-ceph-crash
      dnsPolicy: ClusterFirst
      initContainers:
      - args:
        - --verbose
        - --recursive
        - ceph:ceph
        - /var/log/ceph
        - /var/lib/ceph/crash
        - /run/ceph
        - /var/lib/ceph/rgw/ceph-ceph
        command:
        - chown
        image: harbor.atmosphere.dev/quay.io/ceph/ceph:v18.2.7
        imagePullPolicy: IfNotPresent
        name: chown-container-data-dir
        resources: {}
        securityContext:
          privileged: false
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /etc/ceph
          name: rook-config-override
          readOnly: true
        - mountPath: /run/ceph
          name: ceph-daemons-sock-dir
        - mountPath: /etc/ceph/keyring-store/
          name: rook-ceph-rgw-ceph-a-keyring
          readOnly: true
        - mountPath: /var/log/ceph
          name: rook-ceph-log
        - mountPath: /var/lib/ceph/crash
          name: rook-ceph-crash
        - mountPath: /var/lib/ceph/rgw/ceph-ceph
          name: ceph-daemon-data
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: rook-ceph-rgw
      serviceAccountName: rook-ceph-rgw
      shareProcessNamespace: true
      terminationGracePeriodSeconds: 30
      tolerations:
      - effect: NoExecute
        key: node.kubernetes.io/unreachable
        operator: Exists
        tolerationSeconds: 5
      volumes:
      - name: rook-config-override
        projected:
          defaultMode: 420
          sources:
          - configMap:
              items:
              - key: config
                mode: 292
                path: ceph.conf
              name: rook-config-override
      - name: rook-ceph-rgw-ceph-a-keyring
        secret:
          defaultMode: 420
          secretName: rook-ceph-rgw-ceph-a-keyring
      - hostPath:
          path: /var/lib/rook/exporter
          type: DirectoryOrCreate
        name: ceph-daemons-sock-dir
      - hostPath:
          path: /var/lib/rook/openstack/log
          type: ""
        name: rook-ceph-log
      - hostPath:
          path: /var/lib/rook/openstack/crash
          type: ""
        name: rook-ceph-crash
      - emptyDir: {}
        name: ceph-daemon-data
      - configMap:
          defaultMode: 420
          name: rook-ceph-rgw-ceph-mime-types
        name: rook-ceph-rgw-ceph-mime-types
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2026-07-24T17:45:10Z"
    lastUpdateTime: "2026-07-24T17:45:10Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2026-07-24T17:45:10Z"
    lastUpdateTime: "2026-07-24T17:45:50Z"
    message: ReplicaSet "rook-ceph-rgw-ceph-a-699b8bdb59" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
