apiVersion: apps/v1 kind: StatefulSet metadata: name: ghcr namespace: registry spec: selector: matchLabels: app: ghcr serviceName: ghcr replicas: 1 template: metadata: labels: app: ghcr spec: containers: - name: ghcr image: registry:2.8.1 ports: - containerPort: 5000 name: ghcr volumeMounts: - name: ghcr-data mountPath: /var/lib/registry - name: timezone mountPath: /etc/localtime readOnly: true - name: ghcr-cnf mountPath: /etc/docker/registry/config.yml subPath: config.yml volumes: - name: ghcr-cnf configMap: name: ghcr-cnf - name: timezone hostPath: path: /usr/share/zoneinfo/Asia/Shanghai volumeClaimTemplates: - metadata: name: ghcr-data spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 50Gi