1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenShiftにおけるconfiguration設定(Helm Chart編)

Last updated at Posted at 2025-12-09

はじめに

  • みなさん!メリークリスマス!Advent Calendar10日目は、OpenShiftにおけるconfiguration設定(Helm Chart編)の記事となります。
  • ホストにInstana Agentをインストール後、Instana Agent用の設定ファイル (configuration.yaml など) を編集することで、Instana UI上の表示変更や、アプリケーション開発フレームワーク、データベースの詳細を可視化などといった、様々な設定を適用できます。
  • OpenShiftには、複数のInstana Agentインストール方法がます、今回は、Helm Chartによるによる設定および編集方法を紹介します。
  • Operator Hub編はこちら
  • Operator編はこちら

公式ドキュメントのリンク

設定の前提条件

  • OpenShift 4.18に対して、Operator HubによるInstana Agentインストールおよび編集をします。

  • Instana UIのインフラストラクチャーマップにおいて、「Instana Maturity Zone」というカスタムゾーンを設定します。

  • 下記は、今回変更するconfigurationの抜粋となります。

    com.instana.plugin.generic.hardware:
      enabled: true
      availability-zone: 'Instana Maturity Zone'
    

Helm Chartによる設定例

Helm ChartでのInstana Agentにおけるconfiguration設定例

  • configuraion_yamlの内容を記載するために、values.yamlを作成します。

    touch values.yaml
    vi values.yaml
    
    agent:
      configuration_yaml: |
        com.instana.plugin.generic.hardware:
          enabled: true
          availability-zone: 'Instana Maturity Zone'
    
  • helm installを用いて、Instana Angetをインストールします。この際、先ほど作成したvalues.yamlを指定することで、設定を反映させることができます。なお、helm installまでに、OpenShiftでのプロジェクト作成およびポリシーの設定をする必要があります。

    oc login -u system:admin
    oc new-project instana-agent
    oc adm policy add-scc-to-user privileged -z instana-agent -n instana-agent
    
    helm install instana-agent \
      --repo https://agents.instana.io/helm \
      --namespace instana-agent \
      --set openshift=true \
      --set agent.key=<agent key> \
      --set agent.downloadKey=<download key> \
      --set agent.endpointHost=<endpointHost Name> \
      --set agent.endpointPort=443 \
      --set cluster.name='my-cluster' \
      instana-agent -f ./values.yaml
    
  • helm install後、OpenShiftのダッシュボード(開発者画面)で、instana-agentがインストールされていることを確認できます。

configuring-host-agents_HelmChart_1.png

  • Instanaのインフラストラクチャーマップで、Zone名が反映されていることを確認できます。

configuring-host-agents_HelmChart_2.png

Helm ChartでのInstana Agentにおけるconfiguration設定変更例

  • configurationの内容を変更したい場合は、 values.yamlを編集・保存し、helm upgradeを実行することで反映されます。

  • values.yamlを編集し、availability-zoneInstana Maturity Zone Helm Chart変更します。

    agent:
      configuration_yaml: |
        com.instana.plugin.generic.hardware:
        enabled: true
        availability-zone: 'Instana Maturity Zone Helm Chart'
    
  • 変更反映します。helm installではなく、helm upgrade であることに注意してください。

    helm upgrade instana-agent \
        --repo https://agents.instana.io/helm \
        --namespace instana-agent \
        --set openshift=true \
        --set agent.key=<agent key> \
        --set agent.downloadKey=<download key> \
        --set agent.endpointHost=<endpointHost Name> \
        --set agent.endpointPort=443 \
        --set cluster.name='my-cluster' \
        instana-agent -f ./values.yaml
    
  • Instanaのインフラストラクチャーマップで、Zone名が変更されていることを確認できます。

configuring-host-agents_HelmChart_3.png

おわりに

  • Helm ChartによるInstana Agentインストールや設定変更は、Operatorと同様に、実際に反映されている設定パラメータをコードとして残すことができるので便利ですね!
  • さらに、values.yamlをバージョン管理システムで管理することで、設定の紛失や意図しない設定変更を防ぐことも期待できそうです。
  • 一方で、Instanaのためだけに、クライアントに対して、helmコマンドを打つための設定したり、バージョン、ソフトウェア構成の管理したりする必要があるため、運用によってOperatorと使い分ける方法が良さそうです。
  • Instana Observability Advent Calendar 2025はまだまだ続きますので、ぜひ引き続きご覧ください!良い年末を!
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?