Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]1.0 change registry for neon failed due to hardcode #8458

Closed
tianyue86 opened this issue Nov 14, 2024 · 0 comments · Fixed by apecloud/kubeblocks-addons#1202
Closed
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@tianyue86
Copy link

Describe the env

Kubernetes: v1.28.3-vke.17
KubeBlocks: 1.0.0-beta.1
kbcli: 1.0.0-alpha.1

To Reproduce
Steps to reproduce the behavior:

  1. Create neon cluster by applying this yaml
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
  name: neonclu02
  labels:   
    app.kubernetes.io/version: "pg14-1.0.0"
    app.kubernetes.io/managed-by: Helm
    helm.sh/chart: neon-cluster-1.0.0-alpha.0
spec:
  clusterDef: neon
  topology: default
  terminationPolicy: Delete
  componentSpecs:
    - name: neon-compute
      replicas: 1
      resources:
        limits:
          cpu: "1"
          memory: "2Gi"
        requests:
          cpu: "500m"
          memory: "500Mi"
      volumeClaimTemplates:
        - name: data
          spec:
            storageClassName:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
    - name: neon-broker
      replicas: 1
      resources:
        limits:
          cpu: "1"
          memory: "2Gi"
        requests:
          cpu: "500m"
          memory: "500Mi"
    - name: neon-safekeeper
      replicas: 3
      resources:
        limits:
          cpu: "1"
          memory: "2Gi"
        requests:
          cpu: "500m"
          memory: "500Mi"
      volumeClaimTemplates:
        - name: data
          spec:
            storageClassName:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
    - name: neon-pageserver
      replicas: 1
      resources:
        limits:
          cpu: "1"
          memory: "2Gi"
        requests:
          cpu: "500m"
          memory: "500Mi"
      volumeClaimTemplates:
        - name: data
          spec:
            storageClassName:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
  1. Check the cluster status is Abnormal
  2. Check the pod status: ErrImagePull
    neonclu02-neon-broker-0 0/1 ErrImagePull 0 70s
  3. describe pod
Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  4m36s                  default-scheduler  Successfully assigned default/neonclu02-neon-broker-0 to 172.16.0.7
  Warning  Failed     3m51s (x2 over 4m20s)  kubelet            Failed to pull image "perconalab/neon:pg14-1.0.0": failed to pull and unpack image "docker.io/perconalab/neon:pg14-1.0.0": failed to resolve reference "docker.io/perconalab/neon:pg14-1.0.0": failed to do request: Head "https://registry-1.docker.io/v2/perconalab/neon/manifests/pg14-1.0.0": dial tcp 202.160.128.205:443: connect: connection timed out
  Warning  Failed     3m11s                  kubelet            Failed to pull image "perconalab/neon:pg14-1.0.0": failed to pull and unpack image "docker.io/perconalab/neon:pg14-1.0.0": failed to resolve reference "docker.io/perconalab/neon:pg14-1.0.0": failed to do request: Head "https://registry-1.docker.io/v2/perconalab/neon/manifests/pg14-1.0.0": dial tcp 199.96.62.17:443: connect: connection timed out
  Normal   Pulling    2m18s (x4 over 4m36s)  kubelet            Pulling image "perconalab/neon:pg14-1.0.0"
  Warning  Failed     2m2s (x4 over 4m20s)   kubelet            Error: ErrImagePull
  Warning  Failed     2m2s                   kubelet            Failed to pull image "perconalab/neon:pg14-1.0.0": failed to pull and unpack image "docker.io/perconalab/neon:pg14-1.0.0": failed to resolve reference "docker.io/perconalab/neon:pg14-1.0.0": failed to do request: Head "https://registry-1.docker.io/v2/perconalab/neon/manifests/pg14-1.0.0": dial tcp 128.121.146.101:443: connect: connection timed out
  Warning  Failed     111s (x6 over 4m20s)   kubelet            Error: ImagePullBackOff
  Normal   BackOff    96s (x7 over 4m20s)    kubelet            Back-off pulling image "perconalab/neon:pg14-1.0.0"
  1. Change registry try to fix the Image pull error
helm -n kb-system upgrade -i kubeblocks kb-jh/kubeblocks --version="1.0.0-beta.1" \
  --set image.registry=apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com \
  --set dataProtection.image.registry=apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com \
  --set addonChartsImage.registry=apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com \

kbcli addon enable neon  \
--set image.registry=apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com \
--set image.repository=perconalab/neon

===> nothing changed

img_v3_02gk_fecfedb7-edf4-4183-8d3f-5b44bdb3cbbg

tianyue@apeclouds-MacBook-Pro kubeblocks-addons % k get cmpv|grep neon
neon-broker 1.0.0 Available 61m
neon-compute 1.0.0 Available 61m
neon-pageserver 1.0.0 Available 61m
neon-safekeeper 1.0.0 Available 61m
tianyue@apeclouds-MacBook-Pro kubeblocks-addons % kubectl get cmpv neon-broker -ojson | jq '.spec.releases[].images'
{
"neon-storagebroker": "perconalab/neon:pg14-1.0.0"
}
tianyue@apeclouds-MacBook-Pro kubeblocks-addons % kubectl get cmpv neon-compute -ojson | jq '.spec.releases[].images'
{
"neon-compute": "perconalab/neon:pg14-1.0.0"
}
tianyue@apeclouds-MacBook-Pro kubeblocks-addons % kubectl get cmpv neon-pageserver -ojson | jq '.spec.releases[].images'
{
"neon-pageserver": "perconalab/neon:pg14-1.0.0"
}
tianyue@apeclouds-MacBook-Pro kubeblocks-addons % kubectl get cmpv neon-safekeeper -ojson | jq '.spec.releases[].images'
{
"neon-safekeeper": "perconalab/neon:pg14-1.0.0"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants