搜索

8.6. roxctl declarative-config

download PDF

管理声明性配置。

使用方法

$ roxctl declarative-config [command] [flags]

表 8.41. 可用命令
命令描述

create

创建声明性配置。

lint

lint 现有的声明性配置 YAML 文件。

8.6.1. roxctl declarative-config 命令选项从父命令继承

roxctl declarative-config 命令支持从父 roxctl 命令继承的以下选项:

选项描述

--ca string

为安全连接指定自定义 CA 证书文件路径。或者,您可以使用 ROX_CA_CERT_FILE 环境变量指定文件路径。

--direct-grpc

设置 --direct-grpc 以改进连接性能。或者,通过将 ROX_DIRECT_GRPC_CLIENT 环境变量设置为 true,您可以启用直接 gRPC。默认值为 false

-e, --endpoint string

将服务的端点设置为 contact。或者,您可以使用 ROX_ENDPOINT 环境变量设置端点。默认值为 localhost:8443

--force-http1

强制将 HTTP/1 用于所有连接。或者,通过将 ROX_CLIENT_FORCE_HTTP1 环境变量设置为 true,您可以强制使用 HTTP/1。默认值为 false

--insecure

启用不安全的连接选项。或者,通过将 ROX_INSECURE_CLIENT 环境变量设置为 true,您可以启用不安全的连接选项。默认值为 false

--insecure-skip-tls-verify

跳过 TLS 证书验证。或者,通过将 ROX_INSECURE_CLIENT_SKIP_TLS_VERIFY 环境变量设置为 true,您可以跳过 TLS 证书验证。默认值为 false

--no-color

禁用颜色输出。或者,通过将 ROX_NO_COLOR 环境变量设置为 true,您可以禁用颜色输出。默认值为 false

-p, --password string

指定基本身份验证的密码。或者,您可以使用 ROX_ADMIN_PASSWORD 环境变量设置密码。

--plaintext

使用未加密的连接。或者,通过将 ROX_PLAINTEXT 环境变量设置为 true,您可以启用未加密的连接。默认值为 false

-s, --server-name string

设置用于 SNI 的 TLS 服务器名称。或者,您可以使用 ROX_SERVER_NAME 环境变量设置服务器名称。

--token-file string

使用指定文件中提供的 API 令牌进行身份验证。另外,您可以使用 ROX_API_TOKEN 环境变量设置令牌。

注意

这些选项适用于 roxctl declarative-config 命令的所有子命令。

8.6.2. roxctl declarative-config lint

lint 现有的声明性配置 YAML 文件。

使用方法

$ roxctl declarative-config lint [flags]

表 8.42. 选项
选项描述

--config-map string

--config-map 字符串 中读取声明性配置。如果没有指定,则使用 --file 标志从指定的 YAML 文件中读取配置。

-f,--file string

包含 YAML 格式的声明性配置的文件。

--namespace string

从配置映射的 --namespace 字符串 读取声明性配置。如果没有指定,则使用当前 Kubernetes 配置上下文中指定的命名空间。

--secret string

从指定的 --secret 字符串 中读取声明性配置。如果没有指定,则使用 --file 标志从指定的 YAML 文件中读取配置。

8.6.3. roxctl declarative-config create

创建声明性配置。

使用方法

$ roxctl declarative-config create [flags]

表 8.43. 选项
选项描述

--config-map string

在配置映射中编写声明性配置 YAML。如果没有指定,并且未指定 --secret 标志,则生成的 YAML 将以标准输出格式打印。

--namespace string

如果要将声明性配置 YAML 写入配置映射或 secret,则需要此项。如果没有指定,则使用当前 Kubernetes 配置中的 default 命名空间。

--secret string

在 Secret 中编写声明性配置 YAML。您必须使用 secret 进行敏感数据。如果没有指定,并且没有指定 --config-map 标志,则生成的 YAML 将以标准输出格式打印。

8.6.3.1. roxctl declarative-config create role

为角色创建声明性配置。

使用方法

$ roxctl declarative-config create role [flags]

表 8.44. 选项
选项描述

--access-scope string

通过提供名称,您可以指定引用的访问范围。

--description string

设置角色的描述。

--name string

指定角色的名称。

--permission-set string

通过提供名称,您可以指定引用的权限集。

8.6.3.2. roxctl declarative-config create notifier

为通知程序创建声明性配置。

使用方法

$ roxctl declarative-config create notifier [flags]

表 8.45. 选项
选项描述

--name string

指定通知程序的名称。

8.6.3.3. roxctl declarative-config create access-scope

为访问范围创建声明性配置。

使用方法

$ roxctl declarative-config create access-scope [flags]

表 8.46. 选项
选项描述

--cluster-label-selector 要求

指定根据集群标签创建标签选择器的条件。键值对代表要求,您可以多次使用此标志来创建要求组合。默认值为 [ [ ] ]。如需了解更多详细信息,请运行 roxctl declarative-config create access-scope --help 命令。

--description string

设置访问范围的描述。

--included included-object

指定访问范围中包含的集群及其命名空间列表。默认值为 [null]

--name string

指定访问范围的名称。

--namespace-label-selector requirement

指定基于命名空间标签创建标签选择器的条件。与 cluster-label-selector 类似,您可以多次使用此标志来满足要求的组合。如需了解更多详细信息,请运行 roxctl declarative-config create access-scope --help 命令。

8.6.3.4. roxctl declarative-config create auth-provider

为身份验证提供程序创建声明性配置。

使用方法

$ roxctl declarative-config create auth-provider [flags]

表 8.47. 选项
选项描述

--extra-ui-endpoints strings

指定使用身份验证提供程序的其他用户界面(UI)端点。预期格式为 < endpoint>:<port>

--groups-key string

设置要在身份验证供应商中添加的组的密钥。key、value 和 role 的元组应该具有相同的长度。如需了解更多详细信息,请运行 roxctl declarative-config create auth-provider --help 命令。

--groups-role string

设置要在身份验证供应商中添加的组的角色。key、value 和 role 的元组应该具有相同的长度。如需了解更多详细信息,请运行 roxctl declarative-config create auth-provider --help 命令。

--groups-value strings

设置要在身份验证供应商中添加的组值。key、value 和 role 的元组应该具有相同的长度。如需了解更多详细信息,请运行 roxctl declarative-config create auth-provider --help 命令。

--minimum-access-role string

设置身份验证提供程序的最小访问角色。如果您不想使用声明性配置配置最小访问角色,您可以将此字段留空。

--name string

指定身份验证供应商的名称。

--required-attributes stringToString

设置身份验证提供程序必须在身份验证过程中返回的属性列表。默认值为 []

--ui-endpoint string

设置使用身份验证供应商的 UI 端点。这通常是提供 RHACS 的公共端点。预期格式为 < endpoint>:<port>

8.6.3.5. roxctl declarative-config create permission-set

为权限集创建声明性配置。

使用方法

$ roxctl declarative-config create permission-set [flags]

表 8.48. 选项
选项描述

--description string

设置权限集的描述。

--name string

指定权限集的名称。

--resource-with-access stringToString

设置具有相应访问级别的资源列表。默认值为 []。如需了解更多详细信息,请运行 roxctl declarative-config create permission-set --help 命令。

8.6.3.6. roxctl declarative-config create notifier mvapich

为 zFCP 通知程序创建声明性配置。

使用方法

$ roxctl declarative-config create notifier splunk [flags]

表 8.49. 选项
选项描述

--audit-logging

启用审计日志记录。默认值为 false

--source-types stringToString

将 Splunk 源类型指定为用逗号分开的 key=value 对。默认值为 []

--splunk-endpoint string

指定 Splunk HTTP 端点。这是强制选项。

--splunk-skip-tls-verify

使用到 Splunk 的不安全连接。默认值为 false

--splunk-token string

指定 Splunk HTTP 令牌。这是强制选项。

--truncate int

指定 Splunk truncate 限制。默认值为 10000

8.6.3.7. roxctl declarative-config create notifier generic

为通用通知程序创建声明性配置。

使用方法

$ roxctl declarative-config create notifier generic [flags]

表 8.50. 选项
选项描述

--audit-logging

启用审计日志记录。默认值为 false

--extra-fields stringToString

将其他字段指定为用逗号分开的 key=value 对。默认值为 []

--headers stringToString

将标头指定为用逗号分开的 key=value 对。默认值为 []

--webhook-cacert-file string

以 PEM 格式指定端点 CA 证书的文件名。

--webhook-endpoint string

指定 webhook 端点的 URL。

--webhook-password string

指定 webhook 端点基本身份验证的密码。如果没有指定身份验证。需要 --webhook-username

--webhook-skip-tls-verify

跳过 Webhook TLS 验证。默认值为 false

--webhook-username string

指定 webhook 端点基本身份验证的用户名。如果没有指定身份验证,则不会进行身份验证。需要 --webhook-password

8.6.3.8. roxctl declarative-config create auth-provider iap

使用身份感知代理(IAP)标识符为身份验证供应商创建声明配置。

使用方法

$ roxctl declarative-config create auth-provider iap [flags]

表 8.51. 选项
选项描述

--audience 字符串

指定您要验证的目标组。

8.6.3.9. roxctl declarative-config create auth-provider oidc

为 OpenID Connect (OIDC)身份验证供应商创建声明性配置。

使用方法

$ roxctl declarative-config create auth-provider oidc [flags]

表 8.52. 选项
选项描述

--claim-mappings stringToString

指定您要包含在身份验证提供程序规则中的身份提供程序(IdP)令牌中的非标准声明列表。默认值为 []

--client-id string

指定 OIDC 客户端的客户端 ID。

--client-secret string

指定 OIDC 客户端的客户端 secret。

--disable-offline-access

从 OIDC IdP 禁用 offline_access 的请求。如果 OIDC IdP 使用 offline_access 范围限制了会话数量,则需要使用这个选项。默认值为 false

--issuer 字符串

指定 OIDC 客户端的签发者。

--mode string

指定您要使用的回调模式。有效值包括 autopostqueryfragment。默认值为 auto

8.6.3.10. roxctl declarative-config create auth-provider saml

为 SAML 身份验证供应商创建声明性配置。

使用方法

$ roxctl declarative-config create auth-provider saml [flags]

表 8.53. 选项
选项描述

--idp-cert string

以 PEM 格式指定包含 SAML 身份提供程序(IdP)证书的文件。

--idp-issuer string

指定 IdP 的签发者。

--metadata-url string

指定服务提供商的元数据 URL。

--name-id-format string

指定名称 ID 的格式。

--SP-issuer 字符串

指定服务提供商的签发者。

--sso-url string

为单点登录(SSO)指定 IdP 的 URL。

8.6.3.11. roxctl declarative-config create auth-provider userpki

为用户 PKI 身份验证提供程序创建声明配置。

使用方法

$ roxctl declarative-config create auth-provider userpki [flags]

表 8.54. 选项
选项描述

--ca-file string

以 PEM 格式指定包含证书颁发机构的文件。

8.6.3.12. roxctl declarative-config create auth-provider openshift-auth

为 OpenShift Container Platform OAuth 身份验证供应商创建声明性配置。

使用方法

$ roxctl declarative-config create auth-provider openshift-auth [flags]

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.