rainbond icon indicating copy to clipboard operation
rainbond copied to clipboard

使用harbor作为镜像仓库 部署第三方应用没有问题 不是自己的java项目构建时出现这个问题

Open zht1026020644 opened this issue 2 years ago • 19 comments

image 使用harbor作为镜像仓库 部署第三方应用没有问题 不是自己的java项目构建时出现这个问题 而且harbor认证是配置好了的?这个怎么解决呀?

zht1026020644 avatar Sep 20 '23 06:09 zht1026020644

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Using harbor as a mirror warehouse, there is no problem in deploying third-party applications. This problem occurs when building a java project other than your own.

Issues-translate-bot avatar Sep 20 '23 06:09 Issues-translate-bot

是需要配置maven和setting?

zht1026020644 avatar Sep 20 '23 06:09 zht1026020644

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Do I need to configure maven and setting?

Issues-translate-bot avatar Sep 20 '23 06:09 Issues-translate-bot

IP 是你的 Harbor 仓库地址吗?可以通过以下命令,先查出 rbd-system 命名空间下的 configmap

kubectl get cm -nrbd-system

然后找到名称为 goodrain-me 或 你自己 harbor 地址的 configmap。编辑它。主要编辑以下内容

apiVersion: v1
data:
  buildkittoml: |-
    debug = true
    [registry."goodrain.me"]
      http = false
      insecure = true
    [registry."192.168.46.21"]
      http = false
      insecure = true
kind: ConfigMap

如果你的仓库有证书,就如我上面配置就行。如果仓库没有证书,就设置 http = true 一个参数就行

yangkaa avatar Sep 20 '23 06:09 yangkaa

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If not, create a cm named ip address yourself?

Issues-translate-bot avatar Sep 20 '23 07:09 Issues-translate-bot

[registry."goodrain.me"]
      http = false
      insecure = true

image 好像还是不行

zht1026020644 avatar Sep 20 '23 07:09 zht1026020644

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


[registry."goodrain.me"]
http = false
insecure = true

image Still doesn't seem to work

Issues-translate-bot avatar Sep 20 '23 07:09 Issues-translate-bot

我直接在本地docker直接pull和push是没问题的

zht1026020644 avatar Sep 20 '23 07:09 zht1026020644

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It’s no problem for me to pull and push directly in local docker.

Issues-translate-bot avatar Sep 20 '23 07:09 Issues-translate-bot

image 而且我直接部署第三方应用是没有问题的

zht1026020644 avatar Sep 20 '23 07:09 zht1026020644

需要在cm中加入账号密码?

zht1026020644 avatar Sep 20 '23 07:09 zht1026020644

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Need to add the account password in cm?

Issues-translate-bot avatar Sep 20 '23 07:09 Issues-translate-bot

IP 是你的 Harbor 仓库地址吗?可以通过以下命令,先查出 rbd-system 命名空间下的 configmap

kubectl get cm -nrbd-system

然后找到名称为 goodrain-me 或 你自己 harbor 地址的 configmap。编辑它。主要编辑以下内容

apiVersion: v1
data:
  buildkittoml: |-
    debug = true
    [registry."goodrain.me"]
      http = false
      insecure = true
    [registry."192.168.46.21"]
      http = false
      insecure = true
kind: ConfigMap

如果你的仓库有证书,就如我上面配置就行。如果仓库没有证书,就设置 http = true 一个参数就行

是不是因为不同命名空间下无法使用这个configmap 因为我的创建的应用在test项目里,也就自动创建了一个test的命名空间 而这个configmap在rbd-system命名空间下。

zht1026020644 avatar Sep 21 '23 08:09 zht1026020644

配置了以后,构建日志失败原因是什么呢?那个 cm 就是在 rbd-system 下就行

yangkaa avatar Sep 21 '23 09:09 yangkaa

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After configuring, what is the reason why the build log fails? That cm just needs to be under rbd-system.

Issues-translate-bot avatar Sep 21 '23 09:09 Issues-translate-bot

配置了以后,构建日志失败原因是什么呢?那个 cm 就是在 rbd-system 下就行 原因还是权限,还是和第一张图结果一样

zht1026020644 avatar Sep 22 '23 01:09 zht1026020644

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After configuration, what is the reason why the build log fails? That cm just needs to be under rbd-system. The reason is still permissions, and the result is still the same as the first picture.

Issues-translate-bot avatar Sep 22 '23 01:09 Issues-translate-bot

apiVersion: v1
data:
  buildkittoml: |-
    debug = true
    [registry."goodrain.me"]
      http = false
      insecure = true
    [registry."192.168.46.21"]
      http = true
kind: ConfigMap

尝试参考以上内容,只使用 http 协议,查看是否可以构建成功,或者不要使用自签发证书

yangkaa avatar Jan 04 '24 10:01 yangkaa

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


apiVersion: v1
data:
  buildkittoml: |-
    debug=true
    [registry."goodrain.me"]
      http = false
      insecure=true
    [registry."192.168.46.21"]
      http=true
kind: ConfigMap

Try referring to the above content and only use the http protocol to see if the build can be successful, or do not use a self-signed certificate

Issues-translate-bot avatar Jan 04 '24 10:01 Issues-translate-bot

该issue长时间未更新,我先关闭,如果有问题再重新打开

ZhangSetSail avatar Jun 17 '24 01:06 ZhangSetSail

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This issue has not been updated for a long time. I will close it first and reopen it if there are any problems.

Issues-translate-bot avatar Jun 17 '24 01:06 Issues-translate-bot