PodSecurityPolicy requirements

This chart requires a PodSecurityPolicy to be bound to the target namespace prior to installation. You can choose either a predefined PodSecurityPolicy or have your cluster administrator create a custom PodSecurityPolicy for you.

The predefined PodSecurityPolicy name ibm-restricted-psp has been verified for this chart. If your target namespace is bound to this PodSecurityPolicy, you can proceed to install the chart. The predefined PodSecurityPolicy definitions can be viewed here: https://github.com/IBM/cloud-pak/blob/master/spec/security/psp/README.md

This chart also defines a custom PodSecurityPolicy which can be used to finely control the permissions/capabilities needed to deploy this chart. You can enable this custom PodSecurityPolicy using the ICP user interface or the supplied instructions/scripts in the pak_extension pre-install directory. For detailed steps on creating the PodSecurityPolicy see https://www.ibm.com/support/knowledgecenter/SSSHTQ_int/omnibus/helms/all_helms/wip/reference/hlm_common_psp.html

From the user interface, you can copy and paste the following snippets to enable the custom Pod Security Policy
    • Custom PodSecurityPolicy definition:
      apiVersion: policy/v1beta1
      kind: PodSecurityPolicy
      metadata:
        annotations:
          kubernetes.io/description: "This policy is the most restrictive, 
            requiring pods to run with a non-root UID, and preventing pods from accessing the host." 
          seccomp.security.alpha.kubernetes.io/allowedProfileNames: docker/default
          seccomp.security.alpha.kubernetes.io/defaultProfileName: docker/default
          cloudpak.ibm.com/version: "1.1.0"
        name: ibm-netcool-probe-psp
      spec:
        allowPrivilegeEscalation: false
        forbiddenSysctls:
        - '*'
        fsGroup:
          ranges:
          - max: 65535
            min: 1
          rule: MustRunAs
        requiredDropCapabilities:
        - ALL
        runAsUser:
          rule: MustRunAsNonRoot
        runAsGroup:
          rule: MustRunAs
          ranges:
          - min: 1
            max: 65535
        seLinux:
          rule: RunAsAny
        supplementalGroups:
          ranges:
          - max: 65535
            min: 1
          rule: MustRunAs
        volumes:
        - configMap
        - emptyDir
        - projected
        - secret
        - downwardAPI
        - persistentVolumeClaim
    • Custom ClusterRole for the custom PodSecurityPolicy:
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRole
      metadata:
        name: ibm-netcool-probe-clusterrole
      rules:
      - apiGroups:
        - policy
        resourceNames:
        - ibm-netcool-probe-psp
        resources:
        - podsecuritypolicies
        verbs:
        - use
    • RoleBinding for all service accounts in the current namespace. Replace {{ NAMESPACE }} in the template with the actual namespace:
      apiVersion: rbac.authorization.k8s.io/v1
      kind: RoleBinding
      metadata:
        name: ibm-netcool-probe-rolebinding
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: ClusterRole
        name: ibm-netcool-probe-clusterrole
      subjects:
      - apiGroup: rbac.authorization.k8s.io
        kind: Group
        name: system:serviceaccounts:{{ NAMESPACE }}
  • From the command line, you can run the setup scripts included under pak_extensions.

    As a cluster administrator, the pre-install scripts and instructions are in the following location:

    pre-install/clusterAdministration/createSecurityClusterPrereqs.sh

    As team admin/operator the namespace scoped scripts and instructions are in the following location:

    pre-install/namespaceAdministration/createSecurityNamespacePrereqs.sh