kubernetes - 尽管提供了 dockerconfigjson,ArgoCD 仍无法提取图像

标签 kubernetes kubernetes-helm argocd

我目前正在尝试将 ArgoCD 添加到我的项目中,并且正在努力从我的 GitLab 容器注册表中提取镜像。

这是我的值(value)观 yaml:

# Default values for oc-backend.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
  repository: registry.gitlab.com/open-concepts/open-concepts-backend
  tag: master
  pullPolicy: Always

imagePullSecrets:
  - name: registry-credentials
nameOverride: "oc-app"
fullnameOverride: "oc-backend-test"

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name: ""

podSecurityContext:
  {}
  # fsGroup: 2000

securityContext:
  {}
  # capabilities:
  #   drop:
  #   - ALL
  # readOnlyRootFilesystem: true
  # runAsNonRoot: true
  # runAsUser: 1000

service:
  type: NodePort
  port: 80

ingress:
  enabled: false
  annotations:
    {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  hosts:
    - host: chart-example.local
      paths: []

  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

resources:
  {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  # limits:
  #   cpu: 100m
  #   memory: 128Mi
  # requests:
  #   cpu: 100m
  #   memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

还有 secret yaml:

apiVersion: v1
kind: Secret
metadata:
  name: registry-credentials
  namespace: argocd
type: kubernetes.io/dockerconfigjson
data:
  .dockerconfigjson: xxxx

我知道 dockerconfigjson 可以工作,因为我事先测试过它。

➜ kubectl get secret registry-credentials --namespace=argocd
NAME                   TYPE                             DATA   AGE
registry-credentials   kubernetes.io/dockerconfigjson   1      56m

但是,我仍然通过 ArgoCD 收到拒绝错误。有人可以检查我的配置是否正确吗?

TIA

最佳答案

解决方案:我在编码之前删除了用户、密码和电子邮件。现在可以工作了!

关于kubernetes - 尽管提供了 dockerconfigjson,ArgoCD 仍无法提取图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74083363/

相关文章:

kubernetes - 访问 ArgoCD 服务器

kubernetes - 无法登录 argocd cli

docker - 运行tarball图片的kubectl

google-compute-engine - 为什么每次更新 Pod 时我的 Kubernetes 服务端点 IP 都会改变?

kubernetes - 如何部署具有相同 Helm 图的多个 pods ?

kubernetes-helm - 如何使用 kubernetes-helm 中提供的值查看修订历史记录

kubernetes - 没有对象的 Helm 部署

azure - 为什么 Fluentd Azure blob 插件在 kubernetes 中不起作用

kubernetes - 如何手动从 Kubernetes 卸载/删除分蘖?

kubernetes-helm - 通过 ArgoCD 的不同 repo 中的模板和值