无法从Helm图表安装Jenkins

iaqfqrcu  于 2022-11-02  发布在  Jenkins
关注(0)|答案(4)|浏览(200)

我第一次尝试从赫尔姆图表中安装Jenkins。
我跑步

helm repo add jenkins https://charts.jenkins.io
helm repo update
helm upgrade --install myjenkins jenkins/jenkins

但服务从未启动。Pod日志显示以下错误:

Plugin git:4.10.0 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54
        at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:222)
        at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:171)
        at io.jenkins.tools.pluginmanager.cli.Main.main(Main.java:70)
        Suppressed: io.jenkins.tools.pluginmanager.impl.PluginDependencyException: Plugin kubernetes:1.30.11 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54
                at io.jenkins.tools.pluginmanager.impl.PluginManager.resolveRecursiveDependencies(PluginManager.java:1074)
                at io.jenkins.tools.pluginmanager.impl.PluginManager.findPluginsAndDependencies(PluginManager.java:649)
                at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:214)
                ... 2 more
        Suppressed: io.jenkins.tools.pluginmanager.impl.PluginDependencyException: Plugin workflow-aggregator:2.6 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54
                at io.jenkins.tools.pluginmanager.impl.PluginManager.resolveRecursiveDependencies(PluginManager.java:1074)
                at io.jenkins.tools.pluginmanager.impl.PluginManager.findPluginsAndDependencies(PluginManager.java:649)
                at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:214)
                ... 2 more
        Suppressed: io.jenkins.tools.pluginmanager.impl.PluginDependencyException: Plugin git:4.10.0 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54
                at io.jenkins.tools.pluginmanager.impl.PluginManager.resolveRecursiveDependencies(PluginManager.java:1074)
                at io.jenkins.tools.pluginmanager.impl.PluginManager.findPluginsAndDependencies(PluginManager.java:649)
                at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:214)
                ... 2 more
Multiple plugin prerequisites not met:
Plugin kubernetes:1.30.11 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54,
Plugin workflow-aggregator:2.6 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54,
Plugin git:4.10.0 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54

我该如何解决这个问题?

zpf6vheq

zpf6vheq1#

解决方案似乎是强制Helm图表安装更新的插件。以下值.yaml文件允许我完成部署:

controller:
    installPlugins:
    - configuration-as-code:1.55
    - kubernetes:1.31.1 
    - workflow-aggregator:2.6 
    - git:4.10.1
gxwragnw

gxwragnw2#

有三个选项可解决此问题:
1.删除依赖于其他插件的顶级插件(“git”和“configuration-as-code”是最有可能的违规者)。然而,有时候插件可能会有冲突的依赖版本,这样做就不起作用了。

  1. Jenkins的plugins.txt文件支持将:latest作为版本。
    因此,您的配置可能如下所示:
controller:
  installPlugins:
    - configuration-as-code:latest
    - kubernetes:latest
    - workflow-aggregator:latest
    - git:latest

1.将controller.installLatestPlugins设置为false。这将设置为下载插件的最低要求版本。因此,如果你自己没有使用:latest说明符,那么它应该可以工作。但是,你将坚持使用旧版本的插件。

7bsow1i6

7bsow1i63#

这个- configuration-as-code:1.55在values.yml中修复了这个问题。

bt1cpqcv

bt1cpqcv4#

您可以升级到消息中建议的版本(depends on...之后)

Plugin kubernetes:1.30.11 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54,
Plugin workflow-aggregator:2.6 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54,
Plugin git:4.10.0 (via credentials:1055.v1346ba467ba1) depends on configuration-as-code:1.55, but there is an older version defined on the top level - configuration-as-code:1.54

相关问题