apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: repository
  namespace: kafka-demo
  labels:
    app: repository
spec:
  # 期望 pod 数量
  replicas: 3
  serviceName: "repository"
  selector:
    matchLabels:
      app: repository
  template:
    metadata:
      name: repository
      labels:
        app: repository
    spec:
      imagePullSecrets:
        - name: harbor-jormin
      containers:
        - name: repository
          image: harbor.wcxst.com/kafka-demo/repository:latest
          # 就绪探针
          readinessProbe:
            # 执行周期，单位：秒
            periodSeconds: 1
            # 初始化延迟，单位：秒
            initialDelaySeconds: 1
            exec:
              command:
                - ls