Skip to content

setting pod specs - #65

Merged
cjeanner merged 6 commits into
openstack-k8s-operators:mainfrom
pinikomarov:pod_updates
Jul 7, 2026
Merged

setting pod specs#65
cjeanner merged 6 commits into
openstack-k8s-operators:mainfrom
pinikomarov:pod_updates

Conversation

@pinikomarov

Copy link
Copy Markdown
Collaborator

No description provided.

@pinikomarov
pinikomarov marked this pull request as ready for review July 7, 2026 06:54
@pinikomarov

Copy link
Copy Markdown
Collaborator Author

passed CI

@cjeanner cjeanner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small concern due to ansible-galaxy threshold. It would have limited impact since the playbook is used only to deploy argocd, and it's not used in our pipelines anymore, but still.

Comment thread requirements.yml Outdated
@pinikomarov
pinikomarov force-pushed the pod_updates branch 2 times, most recently from 57bc259 to 3950d2e Compare July 7, 2026 11:56
Add pod-level and container-level securityContext to all 4 batch/v1
Job definitions, plus resource limits (OSPRH-32414 / FIND-002).

Pod spec (template.spec.securityContext):
  runAsNonRoot: true
  seccompProfile.type: RuntimeDefault

Container securityContext:
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true
  capabilities.drop: [ALL]

resources:
  limits:   {cpu: 200m, memory: 256Mi}
  requests: {cpu: 50m,  memory: 64Mi}

Affected files:
- components/utilities/approve-installplan/job.yaml
- components/argocd/hooks/postDelete/controlplane/controlplaneCleaning.yaml
- components/argocd/hooks/postDelete/dataplane/OpenStackDataPlaneService-deletion.yaml
- components/argocd/hooks/postDelete/deploy-operators/observability-csv.yaml

These Jobs mounted the cluster-wide ArgoCD controller ServiceAccount
with no kernel-level mitigations. A container escape would yield the
wildcard-Secret token and full cluster access. Violates OWASP K8s K01,
CIS 5.2.6/5.7.2/5.7.3, DISA STIG V-254801.

Refs: OSPRH-32414
Replace floating git-HEAD source with a pinned commit SHA (v5.0.0)
to prevent supply-chain risk (OSPRH-32420 / FIND-008). Using type: git
with a commit SHA rather than Galaxy API avoids ansible-galaxy rate
limits on high-frequency CI from a fixed IP.

SHA 7b0190f8d592c54faacbe5fccdec7ce7568ec8ab corresponds to tag 5.0.0.

Refs: OSPRH-32420
…iles

Pin all pip installs to exact versions to prevent floating PyPI
dependency installs (OSPRH-32419 / FIND-007):
- pyyaml==6.0.3 in kustomize-build.yml
- yamllint==1.38.0 in yamllint.yml
- ansible-core==2.21.1, kubernetes==36.0.2 in requirements.txt
- ansible==14.1.0, kubernetes==36.0.2 in openshift-gitops.deploy/requirements.txt

Refs: OSPRH-32419
Download kustomize to a temp file and verify its SHA256 checksum before
extracting and installing, mirroring the existing kubeconform pattern in
helm-chart.yml. Unverified pipe-to-tar execution is a supply-chain risk
(OSPRH-32418 / FIND-006).

KUSTOMIZE_SHA256 is the sha256 of kustomize_v5.4.1_linux_amd64.tar.gz
from the upstream checksums.txt file.

Refs: OSPRH-32418
Replace mutable major-version tags (@v4, @v5) with pinned commit SHAs
to prevent supply-chain compromise via tag-move attacks, as seen in the
2025 tj-actions/changed-files incident (OSPRH-32417 / FIND-005).

Pinned versions:
- actions/checkout@11bd719  # v4.2.2
- actions/setup-python@0b93645  # v5.3.0
- Azure/setup-helm@1a275c3  # v4.3.1

Refs: OSPRH-32417
Replace mutable :latest tags with immutable sha256 digests to prevent
image-substitution attacks (OSPRH-32415 / FIND-003). Digests retrieved
from registry.redhat.io on 2026-07-06:
- ose-tools-rhel9@sha256:17d4647d21d7571c11d6f983400da6544376fe8bde8372776e4779ebd8c6fd53
- ose-cli@sha256:ef83967297f619f45075e7fd1428a1eb981622a6c174c46fb53b158ed24bed85

Bump digests via: skopeo inspect --authfile <pull-secret>   docker://registry.redhat.io/openshift4/ose-cli:latest | jq .Digest

Refs: OSPRH-32415

@cjeanner cjeanner left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for keeping the "git" for ansible galaxy

@cjeanner
cjeanner merged commit 1a916b1 into openstack-k8s-operators:main Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants