在OpenShift中安装伪像掌舵图表的错误

发布于 2025-02-12 07:00:47 字数 1694 浏览 0 评论 0 原文

我正在尝试将载体OSS安装在OpenShift群集中。我正在使用此掌舵图表 https://charts.jfrog.io/artifactory-actactory-actactory-actactory-actactory-actactory-a OSS-107.39.4.tgz (警告我对OpenShift等人非常陌生。我在陡峭的学习曲线上)

当我

遇到此错误时,

pods "artifactory-artifactory-nginx-5c66b8c948-" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, provider restricted: .spec.securityContext.fsGroup: Invalid value: []int64{107}: 107 is not an allowed group, spec.initContainers[0].securityContext.runAsUser: Invalid value: 104: must be in the ranges: [1000970000, 1000979999], spec.containers[0].securityContext.runAsUser: Invalid

我认为这是OpenShift权限错误。但是,鉴于我正在以集群的身份运行,我发现有点惊讶。

谁能提供建议如何解决此问题并在OpenShift中运行Artifactory-oss?

提前致谢 !

-

尝试通过一些选项设置UID和GILD。 我尝试从此

头盔升级开始 - 安装文物 - 设置文物= uid = 1001010042,文物。gid= 1001010042,nginx.uid = 1001010042,nginx.gid = 1001010042,artifactory.mast erkey = $ {master_key},artifactory.joinkey = $ {join_key},artifactory.postgresql.postgresqlpassword = $ postgres_pass_password - Namespace Artifactory Jfrog/Artifactory-oss

选项应该设置UID和GID。但是我仍然知道.. Helm Chart似乎忽略了覆盖值Pods的努力

pods pods“ Artifactory-artifactory-artifactory-nginx-5c6666b8c948-”是禁止的。无法验证任何安全上下文约束:[提供者“ Anyuid”:禁止:不可用用户使用或ServiceAccount,提供者限制:.spec.SecurityContext.fsGroup:无效值:[] Int64 {107}:107不是一个允许的组,Spec.InitContainers [0] .securityContext.Runasuser:Invalid Value:104:必须在Ranges中:[1000930000,1000939999], Spec.Containers [0] .securityContext.Runasuser:无效

I am trying to install artifactory oss in a openshift cluster. I am using this helm chart https://charts.jfrog.io/artifactory-oss-107.39.4.tgz (Warning I am very new to openshift etc.. I am on a steep learning curve )

I am running the helm chart as the openshift cluster-admin account

However I am getting this error

pods "artifactory-artifactory-nginx-5c66b8c948-" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, provider restricted: .spec.securityContext.fsGroup: Invalid value: []int64{107}: 107 is not an allowed group, spec.initContainers[0].securityContext.runAsUser: Invalid value: 104: must be in the ranges: [1000970000, 1000979999], spec.containers[0].securityContext.runAsUser: Invalid

I think it is a openshift permissions error .. in that it requires a more permissive security constraint. However given I am running as cluster-admin I find that a little suprising.

Can anyone offer a suggestion how to resolve this issue and get artifactory-oss running in openshift?

Thanks in advance !

--

Tried passing some options to set the uid and gild..
I tried starting with this

helm upgrade --install artifactory --set artifactory.uid=1001010042,artifactory.gid=1001010042,nginx.uid=1001010042,nginx.gid=1001010042,artifactory.masterKey=${MASTER_KEY},artifactory.joinKey=${JOIN_KEY},artifactory.postgresql.postgresqlPassword=$POSTGRES_PASSWORD --namespace artifactory jfrog/artifactory-oss

The options should have set the uids and gids.. but I still got.. Seems the helm chart ignores efforts to overwrite the values

pods "artifactory-artifactory-nginx-5c66b8c948-" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, provider restricted: .spec.securityContext.fsGroup: Invalid value: []int64{107}: 107 is not an allowed group, spec.initContainers[0].securityContext.runAsUser: Invalid value: 104: must be in the ranges: [1000930000, 1000939999], spec.containers[0].securityContext.runAsUser: Invalid

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无可置疑 2025-02-19 07:00:47

关于安装词法以某些前提为先例。

:这取决于:它取决于用于安装头盔图的确切命令。

helm upgrade --install artifactory --set artifactory.masterKey=${MASTER_KEY} \
                                   --set artifactory.joinKey=${JOIN_KEY} \
                                   --namespace artifactory jfrog/artifactory

AS 在此处说明,“ runasuser ”和“ fsgroup “在 value.yaml 中可以对错误消息产生影响。

与其他安装不同,掌舵图表配置是 values.yaml ,然后将其应用于 system.yaml

按照以下步骤应用配置更改。

  • 更改 values.yaml
  • 运行命令。
    Helm升级 - 安装文物-n文物-f values.yaml

See

Regarding the JFrog Artifactory OSS Helm Chart, its documentation Installing Artifactory points out to some prerequisites.

  • When installing Artifactory, you must run the installation as a root user or provide sudo access to a non-root user.
  • For Helm
    • Create a unique Master Key (Artifactory requires a unique master key) pass it to the template during installation.
    • Create a secret containing the key. The key in the secret must be named master-key
      kubectl create secret generic my-masterkey-secret -n artifactory --from-literal=master-key=${MASTER_KEY}
    • make sure to pass the same master key on all future calls to Helm install and Helm upgrade.
      This means always passing --set artifactory.masterKey=${MASTER_KEY} (for the custom master key) or --set artifactory.masterKeySecretName=my-masterkey-secret (for the manual secret) and verifying that the contents of the secret remain unchanged.
    • create a unique join key: By default the chart has one set in the values.yaml (artifactory.joinKey).
      However, this key is for demonstration purposes only and should not be used in a production environment

The point is: it depends on the exact command used to install the Helm Chart.

helm upgrade --install artifactory --set artifactory.masterKey=${MASTER_KEY} \
                                   --set artifactory.joinKey=${JOIN_KEY} \
                                   --namespace artifactory jfrog/artifactory

As illustrated here, the value for "runAsUser" and "fsGroup" in values.yaml can have an influence on the error message..

Unlike other installations, Helm Chart configurations are made to the values.yaml and are then applied to the system.yaml.

Follow these steps to apply the configuration changes.

  • Make the changes to values.yaml.
  • Run the command.
    helm upgrade --install artifactory -n artifactory -f values.yaml

See Managing security context constraints for more.

迷爱 2025-02-19 07:00:47

看起来您的错误不是由安装本身引起的,而是由于OpenShift安全性“功能”,该功能在每个安装时都会更改允许的UID/GID范围。提供更多信息可用在这里;就我个人而言,我发现通常可以通过战略性地避免使用特定的UID来为服务使用特定的UID,但这也许不是您的选择。

It looks like your error is not arising from the install itself, but from an OpenShift security "feature" that changes the permitted UID/GID range with each installation. More info is available here; personally I have found that it's usually possible to avoid the use of specific UIDs for services entirely by chmod-ing strategically, but perhaps that's not an option for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文