Skip to content

Remove kolla entrypoint pattern, harden SecurityContext - #623

Open
stuggi wants to merge 1 commit into
openstack-k8s-operators:mainfrom
stuggi:remove-kolla
Open

Remove kolla entrypoint pattern, harden SecurityContext#623
stuggi wants to merge 1 commit into
openstack-k8s-operators:mainfrom
stuggi:remove-kolla

Conversation

@stuggi

@stuggi stuggi commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Remove kolla_start / kolla config.json / KOLLA_CONFIG_STRATEGY from all manila workloads (API, scheduler, share, dbsync job, cronjob). Each service binary is now launched directly:

  • manila-api: /usr/sbin/httpd -DFOREGROUND
  • manila-scheduler: /usr/bin/manila-scheduler --config-dir ...
  • manila-share: /usr/bin/manila-share --config-dir ...

Config files (httpd.conf, 10-manila_wsgi.conf) are mounted directly via SubPath from the config-data secret instead of being copied by kolla at startup. The deleted kolla config.json templates and the ssl.conf common template reference are no longer needed.

Harden the security posture:

  • Replace inline SecurityContext with pod.RestrictivePodSecurityContext and pod.RestrictiveSecurityContext from lib-common (using serviceuser.ManilaUID / serviceuser.ApacheGID).
  • Add AutomountServiceAccountToken: ptr.To(false) to all workload PodSpecs (API statefulset, scheduler statefulset, share statefulset, dbsync job, db-purge cronjob).
  • Change secret DefaultMode from 0644/0640 to 0440 across all volume definitions using a package-level configMode variable.
  • Switch SCC requirement from anyuid to hostmount-anyuid + nonroot-v2.

Adopt lib-common volume helpers:

  • Replace inline emptyDir volumes/mounts for run-httpd, var-log-httpd, and logs with volume.WritableDirVolume / volume.WritableDirVolumeMount from lib-common/modules/common/volume.
  • Remove GetConfigSecretVolumes (replaced by volume.ConfigSecretVolumes in lib-common).
  • Fix run-httpd mount path from /etc/httpd/run to the canonical /run/httpd (matching lib-common's volume.RunHttpdMountPath constant).

Update httpd.conf to run as manila:manila (not apache:apache) since containers no longer start as root.

Remove ManilaUserID / ManilaGroupID constants (replaced by serviceuser.ManilaUID from lib-common).

Update MTLS volume mounts to use explicit cert/key mount paths instead of nil (matching the infra-operator API change).

Update kuttl and functional tests to match the new volume counts, mount paths, commands, and security context.

Jira: OSPRH-33504
Jira: OSPRH-33503

Depends-On: openstack-k8s-operators/lib-common#728

@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved label Aug 6, 2026
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/c44954c1b0a148549b08c72d3e472e56

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 58m 19s
manila-operator-kuttl FAILURE in 54m 02s
✔️ manila-operator-tempest SUCCESS in 1h 37m 38s

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/9d2db3f066104e4b81c9a6c82fd6ed23

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 12m 47s
manila-operator-kuttl FAILURE in 52m 22s
manila-operator-tempest RETRY_LIMIT in 5m 31s

Remove kolla_start / kolla config.json / KOLLA_CONFIG_STRATEGY from all
manila workloads (API, scheduler, share, dbsync job, cronjob). Each
service binary is now launched directly:
  - manila-api:       /usr/sbin/httpd -DFOREGROUND
  - manila-scheduler: /usr/bin/manila-scheduler --config-dir ...
  - manila-share:     /usr/bin/manila-share --config-dir ...

Config files (httpd.conf, 10-manila_wsgi.conf) are mounted directly via
SubPath from the config-data secret instead of being copied by kolla at
startup. The deleted kolla config.json templates and the ssl.conf common
template reference are no longer needed.

Harden the security posture:
  - Replace inline SecurityContext with pod.RestrictivePodSecurityContext
    and pod.RestrictiveSecurityContext from lib-common (using
    serviceuser.ManilaUID / serviceuser.ApacheGID).
  - Add AutomountServiceAccountToken: ptr.To(false) to all workload
    PodSpecs (API statefulset, scheduler statefulset, share statefulset,
    dbsync job, db-purge cronjob).
  - Change secret DefaultMode from 0644/0640 to 0440 across all volume
    definitions using a package-level configMode variable.
  - Switch SCC requirement from anyuid to hostmount-anyuid + nonroot-v2.

Adopt lib-common volume helpers:
  - Replace inline emptyDir volumes/mounts for run-httpd, var-log-httpd,
    and logs with volume.WritableDirVolume / volume.WritableDirVolumeMount
    from lib-common/modules/common/volume.
  - Remove GetConfigSecretVolumes (replaced by volume.ConfigSecretVolumes
    in lib-common).
  - Fix run-httpd mount path from /etc/httpd/run to the canonical
    /run/httpd (matching lib-common's volume.RunHttpdMountPath constant).

Update httpd.conf to run as manila:manila (not apache:apache) since
containers no longer start as root.

Remove ManilaUserID / ManilaGroupID constants (replaced by
serviceuser.ManilaUID from lib-common).

Update MTLS volume mounts to use explicit cert/key mount paths instead
of nil (matching the infra-operator API change).

Update kuttl and functional tests to match the new volume counts,
mount paths, commands, and security context.

Jira: OSPRH-33504    
Jira: OSPRH-33503    

Depends-On: openstack-k8s-operators/lib-common#728

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/d8c3c2fd11504367ae7bd8a5d822bd31

openstack-k8s-operators-content-provider FAILURE in 12m 35s
⚠️ manila-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ manila-operator-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@stuggi

stuggi commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/test functional

@stuggi

stuggi commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@stuggi: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/functional 87326dc link true /test functional

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant