Hitachi

Hitachi Microservices Platform - Paxos Commit Transaction Orchestrator ユーザーズガイド


3.8.2 MediatorのHelmチャートのカスタマイズ

MediatorのHelmチャートをカスタマイズするために、helm show valuesコマンドを実行して、MediatorのHelmチャートパッケージファイル(mediator-V.R.S.tgz)からデフォルト設定のvalues.yamlを抽出してください。コマンド例を次に示します。

helm show values ./mediator-V.R.S.tgz > ./mediator-values.yaml

注 V.R.Sは使用するHMP-PCTOのバージョンに合わせて読み替えてください。

「9.3.1 Mediator」に記載されているHelmチャートのvalues.yamlの各パラメタについて、必須パラメタの定義、および任意パラメタを必要に応じてデフォルト値から変更してください。

Helmチャートのカスタマイズ例を次に示します。

namespace: my-namespace
replicas: 5     …1
image: myregistry.example.com/myproject/mediator:V.R.S※
imagePullSecrets:
- name: regcred
imagePullPolicy: IfNotPresent
labels:
  hmppctoAppGroup: x-system
dependencyCheck:     …2
  enabled: false
healthCheck:
  enabled: true
livenessProbe:
  initialDelaySeconds: 180
  periodSeconds: 30
  failureThreshold: 3
  timeoutSeconds: 10
  healthCheck:
    retryCount: 0
    retryIntervalSeconds: 0
    connectTimeoutSeconds: 10
    readTimeoutSeconds: 10
readinessProbe:
  initialDelaySeconds: 40
  timeoutSeconds: 80
postStart:
  healthCheck:
    retryCount: 30
    retryIntervalSeconds: 10
    connectTimeoutSeconds: 10
    readTimeoutSeconds: 10
preStop:
  waitTransactions:
    retryCount: 10
    retryIntervalSeconds: 10
    connectTimeoutSeconds: 10
    readTimeoutSeconds: 10
terminationGracePeriodSeconds: 150
affinity:
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
    - labelSelector:
        matchExpressions:
        - key: app.kubernetes.io/name
          operator: In
          values:
          - mediator
      topologyKey: kubernetes.io/hostname
securityContext: {}
resources:
  limits:
    cpu: 2
    memory: 1Gi
  requests:
    cpu: 1
    memory: 512Mi
participant:
  sender:
    threadPoolSize: 30
    queueSize: 5120000
consensusLog:
  size: 256
  io:
    threadPoolSize: 12
    queueSize: 100
    watchInSeconds: 240
    blockSize: 4096
  storageClassName: mediator-consensus-log
http:
  port: 20554
grpc:
  port: 20551
  server:
    threadPoolSize: 30
    queueSize: 258000
  useTls: false
  skipAuth: false
  tls:
    secretName: ""
    clientAuth:
      enabled: false
  keepalive:
    intervalInSeconds: 0
    timeoutInSeconds: 60
  deduplication: true
mediator:
  judge:
    threadPoolSize: 30
    queueSize: 256000
    proposalLogLimitNum: 512
    transactionTerminatedLimitNum: 512
    transactionTerminatedConfirmNotifyIntervalInMillis: 60000
    prepareDelayTimeBaseInMillis: 100
    prepareRetryTimeBaseInMillis: 100
    prepareRetryMaxTimeInSeconds: 30
tracing:
  instanceId: Mediator
  url: http://jaeger:4318/v1/traces
  useTrace: true
  debug: false
  queueSize: 20000
  delayTimeInMillis: 1000
  batchSize: 2000
  grpc:
    debug: false
metrics:
  collection:
    intervalInMillis: 1000
timezone: Asia/Tokyo
java:
  options: -XX:+UseG1GC
logging:
  level:
    hmppctoSTDOUT: INFO
ucars:
  enabled: true
  snapshots:
    claimName: snapshot-volume
use-scaling: true
runningDates:
  enabled: true
  retentionMonths: 3
注※

V.R.Sは使用するHMP-PCTOのバージョンに合わせて読み替えてください。

この例は、次のとおりパラメタの値を指定しています。

記述例の番号は、説明の番号と対応しています。

<説明>

  1. オートスケールを使用しない場合だけ、replicasを設定します。

  2. Elastic Stack、JaegerおよびPrometheusを使用してトラブルシュート情報を収集する場合、「dependencyCheck:」の行から「enabled: false」の行で、dependencyCheck.enabledパラメタにtrueを設定し、dependencyCheck.targetsパラメタに対象のトラブルシュート情報を収集する際に必要なアプリケーションを指定してください。

    この項目は、クラウド環境(Amazon Web Services環境でJaegerを使用する場合、およびMicrosoft Azure環境でJaegerとElasticsearchを使用する場合)にも適用されます。

    Google Cloud Platform環境でトラブルシュート情報を収集する場合は、Elastic Stack、JaegerおよびPrometheusのPodのデプロイを待機する必要がありません。その場合はdependencyCheck.enabledパラメタにfalseを設定してください。

重要

Helmチャートのカスタマイズ時の注意事項

Helmチャートは、行頭のインデント(文字の開始位置)が厳密に評価されます。注意して編集してください。