-
Notifications
You must be signed in to change notification settings - Fork 232
Rebase rebase 5.0 5.0.0 0.nightly 2026 07 05 172708 amd64 2026 07 05 arm64 2026 07 06 #6992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1b254d4
7563c51
096a16a
5107228
c2dd8b7
bbf433c
3dd2149
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| OCP_VERSION := 5.0.0-0.nightly-arm64-2026-07-02-035219 | ||
| OCP_VERSION := 5.0.0-0.nightly-arm64-2026-07-06-035219 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| OCP_VERSION := 5.0.0-0.nightly-2026-07-01-125918 | ||
| OCP_VERSION := 5.0.0-0.nightly-2026-07-05-172708 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,7 @@ | ||||||||||||||||||||
| # Deployment with default values | ||||||||||||||||||||
| # | ||||||||||||||||||||
| # Methods hashableDeployment() and deploymentConfigChanged() | ||||||||||||||||||||
| # must be updated when adding new fields to this manifest. | ||||||||||||||||||||
| kind: Deployment | ||||||||||||||||||||
| apiVersion: apps/v1 | ||||||||||||||||||||
| spec: | ||||||||||||||||||||
|
|
@@ -11,15 +14,83 @@ spec: | |||||||||||||||||||
| labels: | ||||||||||||||||||||
| ingresscontroller.operator.openshift.io/deployment-ingresscontroller: default | ||||||||||||||||||||
| spec: | ||||||||||||||||||||
| # manually configure the service account, so we can configure it only in the router container. | ||||||||||||||||||||
| automountServiceAccountToken: false | ||||||||||||||||||||
| serviceAccountName: router | ||||||||||||||||||||
| priorityClassName: system-cluster-critical | ||||||||||||||||||||
| containers: | ||||||||||||||||||||
| - name: router | ||||||||||||||||||||
| shareProcessNamespace: true | ||||||||||||||||||||
| initContainers: | ||||||||||||||||||||
| - name: init-router | ||||||||||||||||||||
| imagePullPolicy: IfNotPresent | ||||||||||||||||||||
| terminationMessagePolicy: FallbackToLogsOnError | ||||||||||||||||||||
| command: ["/bin/bash", "-c", "cp -R -p /var/lib/haproxy/* /mnt/config/"] | ||||||||||||||||||||
| volumeMounts: | ||||||||||||||||||||
| - mountPath: /mnt/config | ||||||||||||||||||||
| name: haproxy-config | ||||||||||||||||||||
| image: '{{ .ReleaseImage.haproxy_router }}' | ||||||||||||||||||||
| - name: haproxy | ||||||||||||||||||||
| imagePullPolicy: IfNotPresent | ||||||||||||||||||||
| restartPolicy: Always | ||||||||||||||||||||
| securityContext: | ||||||||||||||||||||
| # See https://bugzilla.redhat.com/2007246 | ||||||||||||||||||||
| allowPrivilegeEscalation: true | ||||||||||||||||||||
| readOnlyRootFilesystem: false | ||||||||||||||||||||
| readOnlyRootFilesystem: true | ||||||||||||||||||||
|
Comment on lines
34
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Do not enable privilege escalation in the restricted router pod.
Proposed fix- allowPrivilegeEscalation: true
+ allowPrivilegeEscalation: falseAs per coding guidelines, container manifests must flag 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSources: Coding guidelines, Path instructions |
||||||||||||||||||||
| terminationMessagePolicy: FallbackToLogsOnError | ||||||||||||||||||||
| command: ["/var/lib/haproxy/start-haproxy"] | ||||||||||||||||||||
| # admin.sock should follow routerHAProxyAdminSocket const | ||||||||||||||||||||
| args: ["-W", "-db", "-S", "/var/lib/haproxy/run/admin.sock,mode,600", "-f", "/var/lib/haproxy/conf/haproxy.config"] | ||||||||||||||||||||
| livenessProbe: | ||||||||||||||||||||
| exec: | ||||||||||||||||||||
| command: ["/bin/sh", "-c", "echo show version | socat - /var/lib/haproxy/run/haproxy.sock"] | ||||||||||||||||||||
| failureThreshold: 3 | ||||||||||||||||||||
| periodSeconds: 10 | ||||||||||||||||||||
| successThreshold: 1 | ||||||||||||||||||||
| timeoutSeconds: 1 | ||||||||||||||||||||
| terminationGracePeriodSeconds: 10 | ||||||||||||||||||||
| readinessProbe: | ||||||||||||||||||||
| failureThreshold: 3 | ||||||||||||||||||||
| exec: | ||||||||||||||||||||
| command: ["/bin/sh", "-c", "echo show version | socat - /var/lib/haproxy/run/haproxy.sock"] | ||||||||||||||||||||
| periodSeconds: 10 | ||||||||||||||||||||
| successThreshold: 1 | ||||||||||||||||||||
| timeoutSeconds: 1 | ||||||||||||||||||||
| startupProbe: | ||||||||||||||||||||
| failureThreshold: 120 | ||||||||||||||||||||
| exec: | ||||||||||||||||||||
| # admin.sock should follow routerHAProxyAdminSocket const | ||||||||||||||||||||
| command: ["/bin/sh", "-c", "echo show version | socat - /var/lib/haproxy/run/admin.sock"] | ||||||||||||||||||||
| periodSeconds: 1 | ||||||||||||||||||||
| successThreshold: 1 | ||||||||||||||||||||
| timeoutSeconds: 1 | ||||||||||||||||||||
| resources: | ||||||||||||||||||||
| requests: | ||||||||||||||||||||
| cpu: 100m | ||||||||||||||||||||
| memory: 256Mi | ||||||||||||||||||||
| volumeMounts: | ||||||||||||||||||||
| - mountPath: /var/lib/haproxy | ||||||||||||||||||||
| name: haproxy-config | ||||||||||||||||||||
| - mountPath: /etc/pki/tls/private | ||||||||||||||||||||
| name: default-certificate | ||||||||||||||||||||
| readOnly: true | ||||||||||||||||||||
| - mountPath: /var/run/configmaps/service-ca | ||||||||||||||||||||
| name: service-ca-bundle | ||||||||||||||||||||
| readOnly: true | ||||||||||||||||||||
| {{- if .HttpErrorCodePages }} | ||||||||||||||||||||
| - mountPath: /var/lib/haproxy/errorfiles | ||||||||||||||||||||
| name: error-code-pages | ||||||||||||||||||||
| readOnly: true | ||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||
| {{- if and .AccessLoggingEnabled (not .AccessLoggingSyslogAddress) }} | ||||||||||||||||||||
| - mountPath: /var/lib/rsyslog | ||||||||||||||||||||
| name: rsyslog-socket | ||||||||||||||||||||
| readOnly: false | ||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||
| image: '{{ .ReleaseImage.haproxy_router }}' | ||||||||||||||||||||
| containers: | ||||||||||||||||||||
| - name: router | ||||||||||||||||||||
| imagePullPolicy: IfNotPresent | ||||||||||||||||||||
| securityContext: | ||||||||||||||||||||
| readOnlyRootFilesystem: true | ||||||||||||||||||||
| terminationMessagePolicy: FallbackToLogsOnError | ||||||||||||||||||||
| env: | ||||||||||||||||||||
| - name: ROUTER_SERVICE_NAMESPACE | ||||||||||||||||||||
|
|
@@ -28,6 +99,8 @@ spec: | |||||||||||||||||||
| value: /etc/pki/tls/private | ||||||||||||||||||||
| - name: DEFAULT_DESTINATION_CA_PATH | ||||||||||||||||||||
| value: /var/run/configmaps/service-ca/service-ca.crt | ||||||||||||||||||||
| - name: ROUTER_HAPROXY_ADMIN_UNIX_SOCKET | ||||||||||||||||||||
| value: /var/lib/haproxy/run/admin.sock | ||||||||||||||||||||
| - name: STATS_PORT | ||||||||||||||||||||
| value: "1936" | ||||||||||||||||||||
| - name: RELOAD_INTERVAL | ||||||||||||||||||||
|
|
@@ -181,15 +254,20 @@ spec: | |||||||||||||||||||
| timeoutSeconds: 1 | ||||||||||||||||||||
| resources: | ||||||||||||||||||||
| requests: | ||||||||||||||||||||
| cpu: 100m | ||||||||||||||||||||
| memory: 256Mi | ||||||||||||||||||||
| cpu: 25m | ||||||||||||||||||||
| memory: 64Mi | ||||||||||||||||||||
| volumeMounts: | ||||||||||||||||||||
| - mountPath: /var/lib/haproxy | ||||||||||||||||||||
| name: haproxy-config | ||||||||||||||||||||
| - mountPath: /etc/pki/tls/private | ||||||||||||||||||||
| name: default-certificate | ||||||||||||||||||||
| readOnly: true | ||||||||||||||||||||
| - mountPath: /var/run/configmaps/service-ca | ||||||||||||||||||||
| name: service-ca-bundle | ||||||||||||||||||||
| readOnly: true | ||||||||||||||||||||
| - mountPath: /var/run/secrets/kubernetes.io/serviceaccount | ||||||||||||||||||||
| name: kube-api-access | ||||||||||||||||||||
| readOnly: true | ||||||||||||||||||||
| {{- if .ClientCAMapName }} | ||||||||||||||||||||
| - mountPath: '{{ .ClientCAMountPath }}' | ||||||||||||||||||||
| name: '{{ .ClientCAMapName}}' | ||||||||||||||||||||
|
|
@@ -254,6 +332,8 @@ spec: | |||||||||||||||||||
| secret: | ||||||||||||||||||||
| defaultMode: 420 | ||||||||||||||||||||
| secretName: '{{ .ServingCertificateSecret }}' | ||||||||||||||||||||
| - name: haproxy-config | ||||||||||||||||||||
| emptyDir: {} | ||||||||||||||||||||
| - name: service-ca-bundle | ||||||||||||||||||||
| configMap: | ||||||||||||||||||||
| defaultMode: 420 | ||||||||||||||||||||
|
|
@@ -262,6 +342,23 @@ spec: | |||||||||||||||||||
| path: service-ca.crt | ||||||||||||||||||||
| name: service-ca-bundle | ||||||||||||||||||||
| optional: false | ||||||||||||||||||||
| - name: kube-api-access | ||||||||||||||||||||
| projected: | ||||||||||||||||||||
| defaultMode: 0400 | ||||||||||||||||||||
| sources: | ||||||||||||||||||||
| - serviceAccountToken: | ||||||||||||||||||||
| expirationSeconds: 3600 | ||||||||||||||||||||
| path: token | ||||||||||||||||||||
| - configMap: | ||||||||||||||||||||
| name: kube-root-ca.crt | ||||||||||||||||||||
| items: | ||||||||||||||||||||
| - key: ca.crt | ||||||||||||||||||||
| path: ca.crt | ||||||||||||||||||||
| - downwardAPI: | ||||||||||||||||||||
|
Comment on lines
+345
to
+357
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect the relevant manifest section with line numbers.
FILE="assets/components/openshift-router/deployment.yaml"
sed -n '300,410p' "$FILE" | cat -n
# Look for pod/container security context and any user/group settings.
rg -n "securityContext|runAsUser|runAsGroup|fsGroup|supplementalGroups|defaultMode|serviceAccountToken|kube-api-access" "$FILE"
# Find the router container image/user hints elsewhere in the repo.
rg -n "openshift-router|router.*user|runAsNonRoot|runAsUser|fsGroup" assets components pkg docs . -g '!vendor' -g '!deps' -g '!assets/optional/**'Repository: openshift/microshift Length of output: 37313 🏁 Script executed: #!/bin/bash
set -euo pipefail
FILE="assets/components/openshift-router/deployment.yaml"
# Show the pod spec and the router container security context.
sed -n '1,120p' "$FILE" | cat -n
# Show the full volume block around kube-api-access.
sed -n '336,360p' "$FILE" | cat -n
# Show any explicit runAsUser/runAsGroup/fsGroup values in this manifest.
rg -n "runAsUser|runAsGroup|fsGroup|runAsNonRoot|securityContext" "$FILE"Repository: openshift/microshift Length of output: 6938 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect the restricted SCC used by the router service account.
rg -n "name: restricted|fsGroup:|runAsUser:|supplementalGroups:|required-scc|router" assets/controllers/openshift-default-scc-manager assets/components/openshift-router -g '*.yaml'
# Show the router deployment section around the security context and mounts again.
sed -n '1,130p' assets/components/openshift-router/deployment.yaml | cat -n
# Show the restricted SCC snippet if present.
sed -n '1,120p' assets/controllers/openshift-default-scc-manager/0000_20_kube-apiserver-operator_00_scc-restricted.yaml | cat -nRepository: openshift/microshift Length of output: 1963 Use This pod has no 🤖 Prompt for AI Agents |
||||||||||||||||||||
| items: | ||||||||||||||||||||
| - path: namespace | ||||||||||||||||||||
| fieldRef: | ||||||||||||||||||||
| fieldPath: metadata.namespace | ||||||||||||||||||||
| {{- if .ClientCAMapName }} | ||||||||||||||||||||
| - name: '{{ .ClientCAMapName }}' | ||||||||||||||||||||
| configMap: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| { | ||
| "release": { | ||
| "base": "5.0.0-0.nightly-2026-07-01-125918" | ||
| "base": "5.0.0-0.nightly-2026-07-05-172708" | ||
| }, | ||
| "images": { | ||
| "operator-lifecycle-manager": "quay.io/openshift-release-dev/ocp-v5.0-art-dev@sha256:1c3ea72a23f0d6c653061c5bd97aaa6a3f7e588418df67e1212302d07c331509", | ||
| "operator-registry": "quay.io/openshift-release-dev/ocp-v5.0-art-dev@sha256:076958253143ca66382d5065ba8bf257e0d56c84e7fede4d2e114870f99545f0", | ||
| "operator-lifecycle-manager": "quay.io/openshift-release-dev/ocp-v5.0-art-dev@sha256:31e2fe2c034f093af23939832086b85c3835b1d09dd06526152c333cbec80958", | ||
| "operator-registry": "quay.io/openshift-release-dev/ocp-v5.0-art-dev@sha256:07afe5617fdca7401d39b7a74792c496b5b9a6ccec72fe7398cf8bc6ff184b28", | ||
| "kube-rbac-proxy": "quay.io/openshift-release-dev/ocp-v5.0-art-dev@sha256:772437bdb01f7ed4523206fa6977cdd6b07bf86b1c7366b97dfc506a0d7ef614" | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Complete securityContext and resource limits for changed containers.
init-routerhas nosecurityContext/resources, and the changed HAProxy/router blocks only set partial hardening and requests. Add the required non-root/no-escalation/drop-capabilities settings and CPU/memory limits in the rebase source, then regenerate the asset.As per path instructions, Kubernetes manifests require
runAsNonRoot,readOnlyRootFilesystem,allowPrivilegeEscalation: false, dropping ALL capabilities, and resource limits on every container.Also applies to: 65-68, 92-93, 253-256
🤖 Prompt for AI Agents
Source: Path instructions