curityProfileForUpdateFlag(parser, hidden=False): """Adds --security-profile to specify security profile for cluster update. Args: parser: A given parser. hidden: Whether or not to hide the help text. """ parser.add_argument( '--security-profile', hidden=hidden, help="""\ Name and version of the security profile to be applied to the cluster. If not specified, the current setting of security profile will be preserved. Examples: $ {command} example-cluster --security-profile=default-1.0-gke.1 """) def AddSecurityProfileForUpgradeFlags(parser, hidden=False): """Adds flags related to Security Profile to the parser for cluster upgrade. Args: parser: A given parser. hidden: Whether or not to hide the help text. """ group = parser.add_group(help='Flags for Security Profile:') group.add_argument( '--security-profile', hidden=hidden, help="""\ Name and version of the security profile to be applied to the cluster. If not specified, the current security profile settings are preserved. If the current security profile is not supported in the new cluster version, this option must be explicitly specified with a supported security profile, otherwise the operation will fail. Examples: $ {command} example-cluster --security-profile=default-1.0-gke.1 """) group.add_argument( '--security-profile-runtime-rules', default=None, action='store_true', hidden=hidden, help="""\ Apply runtime rules in the specified security profile to the cluster. When enabled, a security profile controller and webhook are deployed on the cluster to enforce the runtime rules. If --no-security-profile-runtime-rules is specified to disable this feature, only bootstrapping rules are applied, and no security profile controller or webhook are installed. """) def AddNodeGroupFlag(parser)