pravega / zookeeper-operator

Kubernetes Operator for Zookeeper
Apache License 2.0
368 stars 207 forks source link

Not picking up imagePullSecrets #531

Open athomerson opened 1 year ago

athomerson commented 1 year ago

Description

imagePullSecrets were placed in all of the locations indicated in the documentation but they are not being picked up in the deployment.

Importance

Blocker

SolrCloud Manifest

apiVersion: solr.apache.org/v1beta1
kind: SolrCloud
metadata:
  name: solr
spec:
  customSolrKubeOptions:
    podOptions:
      nodeSelector:
        agentpool: linuxuser
      imagePullSecrets:
      - name: sitecore-docker-registry
      resources:
        limits:
          memory: 3Gi
        requests:
          cpu: 700m
          memory: 3Gi
  dataStorage:
    persistent:
      pvcTemplate:
        spec:
          resources:
            requests:
              storage: 2Gi
      reclaimPolicy: Delete
  replicas: 3
  solrImage:
    repository: acrspc.azurecr.io/solr/solr
    tag: '8.8.2'
    pullPolicy: Always
    imagePullSecret: sitecore-docker-registry
  solrJavaMem: -Xms500M -Xmx500M
  updateStrategy:
    method: StatefulSet
  zookeeperRef:
    provided:
      chroot: /explore
      image:
        pullPolicy: Always
        repository: acrspc.azurecr.io/solr/zookeeper
        tag: '0.2.14'
        imagePullSecret: sitecore-docker-registry
      persistence:
        reclaimPolicy: Delete
        spec:
          accessModes:
          - ReadWriteOnce
          resources:
            requests:
              storage: 2Gi
      replicas: 3
      zookeeperPodPolicy:
        imagePullSecrets:
        - name: sitecore-docker-registry
        nodeSelector:
          agentpool: linuxuser
        securityContext:
          runAsUser: 1001
          fsGroup: 1001
        resources:
          limits:
            memory: 500Mi
          requests:
            cpu: 250m
            memory: 500Mi

Pod Status

apiVersion: v1
kind: Pod
metadata:
  name: solr-solrcloud-zookeeper-0
  generateName: solr-solrcloud-zookeeper-
  namespace: dev
  uid: 6b323d0c-02ef-4dd9-95ad-dcdf0cd57304
  resourceVersion: '29447001'
  creationTimestamp: '2023-02-15T19:55:35Z'
  labels:
    app: solr-solrcloud-zookeeper
    controller-revision-hash: solr-solrcloud-zookeeper-768b4658d5
    kind: ZookeeperMember
    release: solr-solrcloud-zookeeper
    solr-cloud: solr
    statefulset.kubernetes.io/pod-name: solr-solrcloud-zookeeper-0
    technology: zookeeper
  ownerReferences:
    - apiVersion: apps/v1
      kind: StatefulSet
      name: solr-solrcloud-zookeeper
      uid: 0c88a0bd-c7e2-4234-80da-522d9b1625b8
      controller: true
      blockOwnerDeletion: true
  managedFields:
    - manager: kube-controller-manager
      operation: Update
      apiVersion: v1
      time: '2023-02-15T19:55:35Z'
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:generateName: {}
          f:labels:
            .: {}
            f:app: {}
            f:controller-revision-hash: {}
            f:kind: {}
            f:release: {}
            f:solr-cloud: {}
            f:statefulset.kubernetes.io/pod-name: {}
            f:technology: {}
          f:ownerReferences:
            .: {}
            k:{"uid":"0c88a0bd-c7e2-4234-80da-522d9b1625b8"}: {}
        f:spec:
          f:affinity:
            .: {}
            f:podAntiAffinity:
              .: {}
              f:preferredDuringSchedulingIgnoredDuringExecution: {}
          f:containers:
            k:{"name":"zookeeper"}:
              .: {}
              f:command: {}
              f:env:
                .: {}
                k:{"name":"ENVOY_SIDECAR_STATUS"}:
                  .: {}
                  f:name: {}
                  f:valueFrom:
                    .: {}
                    f:fieldRef: {}
              f:image: {}
              f:imagePullPolicy: {}
              f:lifecycle:
                .: {}
                f:preStop:
                  .: {}
                  f:exec:
                    .: {}
                    f:command: {}
              f:livenessProbe:
                .: {}
                f:exec:
                  .: {}
                  f:command: {}
                f:failureThreshold: {}
                f:initialDelaySeconds: {}
                f:periodSeconds: {}
                f:successThreshold: {}
                f:timeoutSeconds: {}
              f:name: {}
              f:ports:
                .: {}
                k:{"containerPort":2181,"protocol":"TCP"}:
                  .: {}
                  f:containerPort: {}
                  f:name: {}
                  f:protocol: {}
                k:{"containerPort":2888,"protocol":"TCP"}:
                  .: {}
                  f:containerPort: {}
                  f:name: {}
                  f:protocol: {}
                k:{"containerPort":3888,"protocol":"TCP"}:
                  .: {}
                  f:containerPort: {}
                  f:name: {}
                  f:protocol: {}
                k:{"containerPort":7000,"protocol":"TCP"}:
                  .: {}
                  f:containerPort: {}
                  f:name: {}
                  f:protocol: {}
                k:{"containerPort":8080,"protocol":"TCP"}:
                  .: {}
                  f:containerPort: {}
                  f:name: {}
                  f:protocol: {}
              f:readinessProbe:
                .: {}
                f:exec:
                  .: {}
                  f:command: {}
                f:failureThreshold: {}
                f:initialDelaySeconds: {}
                f:periodSeconds: {}
                f:successThreshold: {}
                f:timeoutSeconds: {}
              f:resources:
                .: {}
                f:limits:
                  .: {}
                  f:memory: {}
                f:requests:
                  .: {}
                  f:cpu: {}
                  f:memory: {}
              f:terminationMessagePath: {}
              f:terminationMessagePolicy: {}
              f:volumeMounts:
                .: {}
                k:{"mountPath":"/conf"}:
                  .: {}
                  f:mountPath: {}
                  f:name: {}
                k:{"mountPath":"/data"}:
                  .: {}
                  f:mountPath: {}
                  f:name: {}
          f:dnsPolicy: {}
          f:enableServiceLinks: {}
          f:hostname: {}
          f:nodeSelector: {}
          f:restartPolicy: {}
          f:schedulerName: {}
          f:securityContext:
            .: {}
            f:fsGroup: {}
            f:runAsUser: {}
          f:serviceAccount: {}
          f:serviceAccountName: {}
          f:subdomain: {}
          f:terminationGracePeriodSeconds: {}
          f:volumes:
            .: {}
            k:{"name":"conf"}:
              .: {}
              f:configMap:
                .: {}
                f:defaultMode: {}
                f:name: {}
              f:name: {}
            k:{"name":"data"}:
              .: {}
              f:name: {}
              f:persistentVolumeClaim:
                .: {}
                f:claimName: {}
    - manager: kubelet
      operation: Update
      apiVersion: v1
      time: '2023-02-15T20:38:01Z'
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          f:conditions:
            k:{"type":"ContainersReady"}:
              .: {}
              f:lastProbeTime: {}
              f:lastTransitionTime: {}
              f:message: {}
              f:reason: {}
              f:status: {}
              f:type: {}
            k:{"type":"Initialized"}:
              .: {}
              f:lastProbeTime: {}
              f:lastTransitionTime: {}
              f:status: {}
              f:type: {}
            k:{"type":"Ready"}:
              .: {}
              f:lastProbeTime: {}
              f:lastTransitionTime: {}
              f:message: {}
              f:reason: {}
              f:status: {}
              f:type: {}
          f:containerStatuses: {}
          f:hostIP: {}
          f:podIP: {}
          f:podIPs:
            .: {}
            k:{"ip":"172.29.178.89"}:
              .: {}
              f:ip: {}
          f:startTime: {}
      subresource: status
  selfLink: /api/v1/namespaces/dev/pods/solr-solrcloud-zookeeper-0
status:
  phase: Pending
  conditions:
    - type: Initialized
      status: 'True'
      lastProbeTime: null
      lastTransitionTime: '2023-02-15T19:55:38Z'
    - type: Ready
      status: 'False'
      lastProbeTime: null
      lastTransitionTime: '2023-02-15T19:55:38Z'
      reason: ContainersNotReady
      message: 'containers with unready status: [zookeeper]'
    - type: ContainersReady
      status: 'False'
      lastProbeTime: null
      lastTransitionTime: '2023-02-15T19:55:38Z'
      reason: ContainersNotReady
      message: 'containers with unready status: [zookeeper]'
    - type: PodScheduled
      status: 'True'
      lastProbeTime: null
      lastTransitionTime: '2023-02-15T19:55:38Z'
  hostIP: 172.29.178.63
  podIP: 172.29.178.89
  podIPs:
    - ip: 172.29.178.89
  startTime: '2023-02-15T19:55:38Z'
  containerStatuses:
    - name: zookeeper
      state:
        waiting:
          reason: ImagePullBackOff
          message: Back-off pulling image "acrspc.azurecr.io/solr/zookeeper:0.2.14"
      lastState: {}
      ready: false
      restartCount: 0
      image: acrspc.azurecr.io/solr/zookeeper:0.2.14
      imageID: ''
      started: false
  qosClass: Burstable
spec:
  volumes:
    - name: data
      persistentVolumeClaim:
        claimName: data-solr-solrcloud-zookeeper-0
    - name: conf
      configMap:
        name: solr-solrcloud-zookeeper-configmap
        defaultMode: 420
    - name: kube-api-access-hbtbn
      projected:
        sources:
          - serviceAccountToken:
              expirationSeconds: 3607
              path: token
          - configMap:
              name: kube-root-ca.crt
              items:
                - key: ca.crt
                  path: ca.crt
          - downwardAPI:
              items:
                - path: namespace
                  fieldRef:
                    apiVersion: v1
                    fieldPath: metadata.namespace
        defaultMode: 420
  containers:
    - name: zookeeper
      image: acrspc.azurecr.io/solr/zookeeper:0.2.14
      command:
        - /usr/local/bin/zookeeperStart.sh
      ports:
        - name: client
          containerPort: 2181
          protocol: TCP
        - name: quorum
          containerPort: 2888
          protocol: TCP
        - name: leader-election
          containerPort: 3888
          protocol: TCP
        - name: metrics
          containerPort: 7000
          protocol: TCP
        - name: admin-server
          containerPort: 8080
          protocol: TCP
      env:
        - name: ENVOY_SIDECAR_STATUS
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.annotations['sidecar.istio.io/status']
      resources:
        limits:
          memory: 500Mi
        requests:
          cpu: 250m
          memory: 500Mi
      volumeMounts:
        - name: data
          mountPath: /data
        - name: conf
          mountPath: /conf
        - name: kube-api-access-hbtbn
          readOnly: true
          mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      livenessProbe:
        exec:
          command:
            - zookeeperLive.sh
        initialDelaySeconds: 10
        timeoutSeconds: 10
        periodSeconds: 10
        successThreshold: 1
        failureThreshold: 3
      readinessProbe:
        exec:
          command:
            - zookeeperReady.sh
        initialDelaySeconds: 10
        timeoutSeconds: 10
        periodSeconds: 10
        successThreshold: 1
        failureThreshold: 3
      lifecycle:
        preStop:
          exec:
            command:
              - zookeeperTeardown.sh
      terminationMessagePath: /dev/termination-log
      terminationMessagePolicy: File
      imagePullPolicy: Always
  restartPolicy: Always
  terminationGracePeriodSeconds: 30
  dnsPolicy: ClusterFirst
  nodeSelector:
    agentpool: linuxuser
  serviceAccountName: default
  serviceAccount: default
  nodeName: aks-linuxuser-27219632-vmss000003
  securityContext:
    runAsUser: 1001
    fsGroup: 1001
  hostname: solr-solrcloud-zookeeper-0
  subdomain: solr-solrcloud-zookeeper-headless
  affinity:
    podAntiAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
        - weight: 20
          podAffinityTerm:
            labelSelector:
              matchExpressions:
                - key: app
                  operator: In
                  values:
                    - solr-solrcloud-zookeeper
            topologyKey: kubernetes.io/hostname
  schedulerName: default-scheduler
  tolerations:
    - key: node.kubernetes.io/not-ready
      operator: Exists
      effect: NoExecute
      tolerationSeconds: 300
    - key: node.kubernetes.io/unreachable
      operator: Exists
      effect: NoExecute
      tolerationSeconds: 300
    - key: node.kubernetes.io/memory-pressure
      operator: Exists
      effect: NoSchedule
  priority: 0
  enableServiceLinks: true
  preemptionPolicy: PreemptLowerPriority