9.2. インストール中にプロキシーを設定する
roxctl コマンドラインインターフェイス (CLI) または Helm を使用して Red Hat Advanced Cluster Security for Kubernetes をインストールする場合、インストール中にプロキシー設定を指定できます。
roxctl central generate コマンドを使用してインストーラーを実行すると、インストーラーはご使用の環境のシークレットとデプロイメント設定ファイルを生成します。生成された設定シークレット (YAML) ファイルを編集して、プロキシーを設定できます。現在、roxctl CLI を使用してプロキシーを設定することはできません。設定は Kubernetes シークレットに保存され、セントラルとスキャナーの両方で共有されます。
手順
デプロイメントバンドルディレクトリーから設定ファイル
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: |-1 # # 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:port2 # username: username3 # password: password4 # # 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 not5 # # 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:port6 # username: username7 # password: password8 # https: # url: http://https-proxy.name:port9 # username: username10 # password: password11 - 3 4 7 8 10 11
usernameとpasswordの追加は、最初とhttpとhttpsセクションの両方で任意に行うことができます。- 2 6 9
urlオプションは、次の URL スキームをサポートします。-
HTTP プロキシーの場合は
http://。 -
TLS が有効化された HTTP プロキシーの場合は
https://。 -
SOCKS5 プロキシーの場合は
socks5://。
-
HTTP プロキシーの場合は
- 5
excludesリストには、DNS 名 (*ワイルドカードの有無にかかわらず)、IP アドレス、または CIDR 表記の IP ブロック (たとえば、10.0.0.0/8) を含めることができます。このリストの値は、プロトコルに関係なく、すべての出力接続に適用されます。- 1
stringDataセクションの|-行は、設定データの開始を示します。注記-
最初にファイルを開くと、すべての値がコメントアウトされます (行の先頭にある
#記号を使用)。二重ハッシュ記号で始まる行# #には、設定キーの説明が含まれています。 -
フィールドを編集するときは、
config.yaml: |-行に対して 2 つのスペースのインデントレベルを維持していることを確認してください。
-
最初にファイルを開くと、すべての値がコメントアウトされます (行の先頭にある
- 設定ファイルを編集した後、通常のインストールを続行できます。更新された設定は、提供されたアドレスとポート番号で実行されているプロキシーを使用するように Red Hat Advanced Cluster Security for Kubernetes に指示します。