ibm-cloud-docs / openshift

openshift prod
5 stars 41 forks source link

Security Admission plug-in configuration docs don't seem accurate #161

Closed NisheekaNynan1 closed 8 months ago

NisheekaNynan1 commented 9 months ago

I'm following this doc(https://cloud.ibm.com/docs/openshift?topic=openshift-pod-security-admission#psa-plugin-config-custom) to create/ update the pod security configuration for an openshift cluster but commands don't seem to be working as the doc suggests they should.

ibmcloud ks cluster master pod-security set --cluster mq-eude-dev3-hub0 --config-file spc.yaml
Incorrect Usage: flag provided but not defined: -config-file

NAME:
        set - Set and enable the PodSecurity admission configuration for a cluster's Kubernetes API server.

USAGE:
        ibmcloud ks cluster master pod-security set --cluster CLUSTER [-q]

PARAMETERS:
    --cluster value, -c value  Specify the cluster name or ID.
    -q                         Do not show the message of the day or update reminders.

FAILED
flag provided but not defined: -config-file

Perhaps an option to be able to see current pod security configurations would be a good addition too. Because at the moment when I try to check, I get this

ibmcloud ks cluster master pod-security get --cluster <cluster>
Getting Kubernetes API server PodSecurity config for <cluster>...
FAILED
Pod Security admission configuration is not supported for OpenShift clusters. (E9c89)

Incident ID: 81ba8ec1-84f7-4e0e-84a9-caf7071ae821
mtreible-ibm commented 8 months ago

Hi @NisheekaNynan1

I tested these steps and found that the section for custom pod security admission was not supposed to be included in the OpenShift docs. OpenShift clusters only support the default pod security admission configuration, and so the ibmcloud ks cluster master pod-security set and ibmcloud ks cluster master pod security get commands are not supported for OpenShift. They are available for Kubernetes clusters, which do support custom pod security configurations.

I've removed the section from the OpenShift docs. Thank you for bringing this to our attention!