bug(repo-server): update-ca-certificates init container does not inherit spec.repo.resources
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, kubernetes
調査の方向性
バグは controllers/argocd/openshift/openshift.go の updateSystemCATrustBuilding() にあります。ここでは update-ca-certificates の init container が Resources フィールドなしで作成されています。copyutil の init container が spec.repo.resources をどのように受け取っているかと比較し、アップストリームの reconciler にある getArgoRepoResources(cr) を確認してください。update-ca-certificates コンテナが spec.repo.resources と同じ requests と limits を持てば完了です。これはステップ 3 の jq コマンドで確認できます。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When configuring custom CA trust via spec.repo.systemCATrust on an ArgoCD resource, the operator injects an init container named update-ca-certificates into the argocd-repo-server pod. However, this init container is created with empty compute resources (resources: {}), even when spec.repo.resources (requests and limits) is explicitly defined in the CR.
This causes pod admission failures in namespaces governed by strict ResourceQuota policies requiring explicit CPU/memory requests and limits.
To Reproduce
Steps to reproduce the behavior:
- Create a namespace and a ConfigMap containing a custom CA certificate:
oc create configmap custom-ca --from-literal=ca.crt="-----BEGIN CERTIFICATE-----..."
2. Deploy an ArgoCD instance with spec.repo.resources and spec.repo.systemCATrust
```yaml
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: argocd-sample
spec:
repo:
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
systemCATrust:
configMaps:
- name: custom-ca
- inspect the resulting repo-server deployment's init containers
oc get deployment argocd-sample-repo-server -o json | jq '.spec.template.spec.initContainers[] | {name: .name, resources: .resources}'```
4, See error/output:
```json
{
"name": "copyutil",
"resources": {
"limits": { "cpu": "500m", "memory": "512Mi" },
"requests": { "cpu": "100m", "memory": "128Mi" }
}
}
{
"name": "update-ca-certificates",
"resources": {}
}```
**Expected behavior** The update-ca-certificates init container should inherit spec.repo.resources (requests and limits) identically to how copyutil inherits them and how upstream argocd-operator implements it via getArgoRepoResources(cr).
Screenshots N/A
**Additional context**
**Root cause:** In PR #987 (controllers/argocd/openshift/openshift.go), the downstream reconciler hook updateSystemCATrustBuilding() drops the upstream update-ca-certificates container to replace it with a RHEL-native container, but omits setting Resources on the new corev1.Container definition:
```go
initContainer := corev1.Container{
Name: "update-ca-certificates",
Image: prodImage,
SecurityContext: argoutil.DefaultSecurityContext(),
VolumeMounts: ...,
Command: ...,
Args: ...,
// Missing: Resources field
}
Impact:
In environments with a ResourceQuota requiring resource limits/requests, the API server rejects pod creation with: failed quota: ...: must specify limits.cpu,limits.memory,requests.cpu,requests.memory for: update-ca-certificates.
Environment: Reproduced on OpenShift GitOps Operator v1.22.1 (introduced in v1.20.0 with PR #987).
- 主要言語
- Go
- スター
- 188
- フォーク
- 362
- 平均マージ
- 5日 4時間
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
redhat-developer/gitops-operator のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
redhat-developer/gitops-operator#1287 ·
メンテナーはふだん 2 日以内に返信
-
Secret-looking text in log output, ci logs redacted対応中かも @olivergondza が 7 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
redhat-developer/gitops-operator#1311 ·
メンテナーはふだん 2 日以内に返信
-
Harden OpenShift manual-install SCC troubleshooting guidance対応中かも @olivergondza が 27 日前に担当しました。 オープン
redhat-developer/gitops-operator#1295 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
redhat-developer/gitops-operator#634 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
NodePlacement or Toleration/NodeSelector not working対応中かも @Pratik-Redhat-Tech が 37 日前に担当しました。 オープンtriage:required
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
redhat-developer/gitops-operator#572 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
redhat-developer/gitops-operator の issue をすべて見る
似ている issue
-
small item
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
canonical/pebble#1127 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 89/100
open-policy-agent/opa#9366 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
defect
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nats-io/nats-server#8752 ·
メンテナーはふだん 1 日以内に返信
-
enhancement needs-acceptance wg/router-models-inference-runtime
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
vllm-project/semantic-router#5015 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fileserver: precompressed sidecar's Content-Encoding and Content-Length end up on error responses対応中かも @NitinKumar004 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
caddyserver/caddy#8204 ·
メンテナーはふだん 1 日以内に返信