10.2. インストール中にプロキシーを設定する
roxctl コマンドラインインターフェイス (CLI) または Helm を使用して Red Hat Advanced Cluster Security for Kubernetes をインストールする場合、インストール中にプロキシー設定を指定できます。
roxctl central generate コマンドを使用してインストーラーを実行すると、インストーラーはご使用の環境のシークレットとデプロイメント設定ファイルを生成します。生成された設定シークレット (YAML) ファイルを編集して、プロキシーを設定できます。現在、roxctl CLI を使用してプロキシーを設定することはできません。設定は Kubernetes シークレットに保存され、Central と Scanner の両方で共有されます。
手順
デプロイメントバンドルディレクトリーから設定ファイル
central/proxy-config-secret.yamlを開きます。注記Helm を使用している場合、設定ファイルは
central/templates/proxy-config-secret.yamlにあります。設定ファイルで変更するフィールドを編集します。
apiVersion: v1 kind: Secret metadata: namespace: stackrox name: proxy-config type: Opaque stringData: config.yaml: |- # # NOTE: Both central and scanner should be restarted if this secret is changed. # # While it is possible that some components will pick up the new proxy configuration # # without a restart, it cannot be guaranteed that this will apply to every possible # # integration etc. # url: http://proxy.name:port # username: username # password: password # # If the following value is set to true, the proxy wil NOT be excluded for the default hosts: # # - *.stackrox, *.stackrox.svc # # - localhost, localhost.localdomain, 127.0.0.0/8, ::1 # # - *.local # omitDefaultExcludes: false # excludes: # hostnames (may include * components) for which you do not # # want to use a proxy, like in-cluster repositories. # - some.domain # # The following configuration sections allow specifying a different proxy to be used for HTTP(S) connections. # # If they are omitted, the above configuration is used for HTTP(S) connections as well as TCP connections. # # If only the `http` section is given, it will be used for HTTPS connections as well. # # Note: in most cases, a single, global proxy configuration is sufficient. # http: # url: http://http-proxy.name:port # username: username # password: password # https: # url: http://https-proxy.name:port # username: username # password: password各項目の説明:
ユーザー名およびパスワード-
(オプション)ユーザー名とパスワードを指定します。これらのフィールドは、最初と
httpおよびhttpsセクションではオプションです。 urlプロキシーの URL を指定します。以下の URL スキームをサポートします。
-
HTTP プロキシーの場合は
http://。 -
TLS が有効な HTTP プロキシーの場合は
https://。 -
SOCKS5 プロキシーの場合は
socks5://。
-
HTTP プロキシーの場合は
excludes-
DNS 名の一覧を指定します。この場合、CIDR 表記のワイルドカード、IP アドレス、または IP ブロックなし(
10.0.0.0/8 など)を指定します。このリストの値は、プロトコルに関係なく、すべての出力接続に適用されます。 |-stringDataセクションに挿入された設定データの開始を指定します。注記-
最初にファイルを開くと、すべての値がコメントアウトされます (行の先頭にある
#記号を使用)。二重ハッシュ記号で始まる行# #には、設定キーの説明が含まれています。 -
フィールドを編集するときは、
config.yaml: |-行に対して 2 つのスペースのインデントレベルを維持していることを確認してください。
-
最初にファイルを開くと、すべての値がコメントアウトされます (行の先頭にある
- 設定ファイルを編集した後、通常のインストールを続行できます。更新された設定は、提供されたアドレスとポート番号で実行されているプロキシーを使用するように Red Hat Advanced Cluster Security for Kubernetes に指示します。