1.26.4.2.2. コマンドラインからのサービスメッシュの分散トレースセキュリティーの設定
Jaeger リソースを変更して、oc ユーティリティーを使用してコマンドラインから Service Mesh で使用する分散トレースプラットフォームセキュリティーを設定できます。
前提条件
-
cluster-adminロールを持つユーザーとしてクラスターにアクセスできる。(Red Hat OpenShift Dedicated を使用する場合)dedicated-adminロールがあるアカウント。 - Red Hat OpenShift Service Mesh Operator がインストールされている必要がある。
-
クラスターにデプロイされた
ServiceMeshControlPlane。 - OpenShift Container Platform バージョンに一致する OpenShift CLI (oc) にアクセスできる。
手順
cluster-adminロールを持つユーザーとして OpenShift Container Platform CLI にログインします。(Red Hat OpenShift Dedicated を使用する場合)dedicated-adminロールがあるアカウント。$ oc login https://<HOSTNAME>:6443次のコマンドを入力して、コントロールプレーンをインストールしたプロジェクト (
istio-systemなど) に変更します。$ oc project istio-system次のコマンドを実行して Jaeger カスタムリソースファイルを編集します。ここで、
jaeger.yamlは Jaeger カスタムリソースの名前に置き換えます。$ oc edit -n tracing-system -f jaeger.yaml次の例に示すように、
Jaegerカスタムリソースファイルを編集して、htpasswd設定を追加します。-
spec.ingress.openshift.htpasswdFile -
spec.volumes spec.volumeMountshtpasswd設定を示す Jaeger リソースの例apiVersion: jaegertracing.io/v1 kind: Jaeger spec: ingress: enabled: true openshift: htpasswdFile: /etc/proxy/htpasswd/auth sar: '{"namespace": "istio-system", "resource": "pods", "verb": "get"}' options: {} resources: {} security: oauth-proxy volumes: - name: secret-htpasswd secret: secretName: htpasswd - configMap: defaultMode: 420 items: - key: ca-bundle.crt path: tls-ca-bundle.pem name: trusted-ca-bundle optional: true name: trusted-ca-bundle volumeMounts: - mountPath: /etc/proxy/htpasswd name: secret-htpasswd - mountPath: /etc/pki/ca-trust/extracted/pem/ name: trusted-ca-bundle readOnly: true
-
以下のコマンドを実行して変更を適用します。ここで、<jaeger.yaml> は Jaeger カスタムリソースの名前に置き換えます。
$ oc apply -n tracing-system -f <jaeger.yaml>Pod のデプロイメントの進行状況を監視するには、次のコマンドを実行します。
$ oc get pods -n tracing-system -w