第1章 MicroShift 設定ファイルの使用
YAML ファイルは、優先設定、設定、およびパラメーターを使用して MicroShift インスタンスをカスタマイズします。
kustomize
マニフェスト以外のツールを使用し、MicroShift API を介して設定を変更したり、アプリケーションをデプロイしたりする場合は、greenboot ヘルスチェックが完了するまで待つ必要があります。これにより、greenboot が rpm-ostree
システムを以前の状態にロールバックしても、変更が失われなくなります。
1.1. MicroShift YAML 設定ファイル
MicroShift は、起動時にシステム全体の /etc/microshift/
ディレクトリーで config.yaml
という名前の設定ファイルがあるか確認します。ディレクトリー内に設定ファイルが存在しない場合は、組み込みのデフォルト値を使用してサービスを起動します。
MicroShift 設定ファイルは、ホストと組み合わせて使用する必要があります。アプリケーション設定およびサービス設定と組み合わせて使用する必要が出てくる場合もあります。MicroShift クラスターをカスタマイズする際は、各項目が連動して設定されていることを確認します。
1.1.1. デフォルトの設定
config.yaml
ファイルを作成しない場合、または設定スニペット YAML ファイルを使用しない場合は、デフォルト値が使用されます。次の例は、デフォルトの設定を示しています。
デフォルト値を確認するには、次のコマンドを実行します。
microshift show-config
$ microshift show-config
Copy to Clipboard Copied! YAML 形式でのデフォルト値の出力例
apiServer: advertiseAddress: 10.44.0.0/32 auditLog: maxFileAge: 0 maxFileSize: 200 maxFiles: 10 profile: Default namedCertificates: - certPath: "" keyPath: "" names: - "" subjectAltNames: [] tls: cipherSuites: - "" minVersion: VersionTLS12 debugging: logLevel: "Normal" dns: baseDomain: microshift.example.com etcd: memoryLimitMB: 0 ingress: certificateSecret: router-certs-default clientTLS: allowedSubjectPatterns: clientCA: name: "" clientCertificatePolicy: "" defaultHTTPVersion: 1 forwardedHeaderPolicy: "" httpCompression: mimeTypes: - "" httpEmptyRequestsPolicy: Respond listenAddress: - "" logEmptyRequests: Log ports: http: 80 https: 443 routeAdmissionPolicy: namespaceOwnership: InterNamespaceAllowed wildcardPolicy: WildcardPolicyAllowed status: Managed tlsSecurityProfile: type: Custom custom: ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 minTLSVersion: VersionTLS12 tuningOptions: clientFinTimeout: "1s" clientTimeout: "30s" headerBufferBytes: 0 headerBufferMaxRewriteBytes: 0 healthCheckInterval: "5s" maxConnections: 0 serverFinTimeout: "1s" serverTimeout: "30s" threadCount: 0 tlsInspectDelay: "5s" tunnelTimeout: "1h" kubelet: manifests: kustomizePaths: - /usr/lib/microshift/manifests - /usr/lib/microshift/manifests.d/* - /etc/microshift/manifests - /etc/microshift/manifests.d/* network: clusterNetwork: - 10.42.0.0/16 cniPlugin: "" multus: status: Disabled serviceNetwork: - 10.43.0.0/16 serviceNodePortRange: 30000-32767 node: hostnameOverride: "" nodeIP: "" nodeIPv6: "" storage: driver: "" optionalCsiComponents: - "" telemetry: endpoint: https://infogw.api.openshift.com proxy: "" status: Enabled
apiServer: advertiseAddress: 10.44.0.0/32
1 auditLog: maxFileAge: 0 maxFileSize: 200 maxFiles: 10 profile: Default namedCertificates: - certPath: "" keyPath: "" names: - "" subjectAltNames: [] tls: cipherSuites: - "" minVersion: VersionTLS12 debugging: logLevel: "Normal" dns: baseDomain: microshift.example.com etcd: memoryLimitMB: 0 ingress: certificateSecret: router-certs-default clientTLS: allowedSubjectPatterns: clientCA: name: "" clientCertificatePolicy: "" defaultHTTPVersion: 1 forwardedHeaderPolicy: "" httpCompression: mimeTypes: - "" httpEmptyRequestsPolicy: Respond listenAddress: - "" logEmptyRequests: Log ports: http: 80 https: 443 routeAdmissionPolicy: namespaceOwnership: InterNamespaceAllowed wildcardPolicy: WildcardPolicyAllowed status: Managed tlsSecurityProfile: type: Custom custom: ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 minTLSVersion: VersionTLS12 tuningOptions: clientFinTimeout: "1s" clientTimeout: "30s" headerBufferBytes: 0 headerBufferMaxRewriteBytes: 0 healthCheckInterval: "5s" maxConnections: 0 serverFinTimeout: "1s" serverTimeout: "30s" threadCount: 0 tlsInspectDelay: "5s" tunnelTimeout: "1h" kubelet: manifests: kustomizePaths: - /usr/lib/microshift/manifests - /usr/lib/microshift/manifests.d/* - /etc/microshift/manifests - /etc/microshift/manifests.d/* network: clusterNetwork: - 10.42.0.0/16 cniPlugin: "" multus: status: Disabled
2 serviceNetwork: - 10.43.0.0/16 serviceNodePortRange: 30000-32767 node: hostnameOverride: "" nodeIP: ""
3 nodeIPv6: "" storage: driver: ""
4 optionalCsiComponents:
5 - "" telemetry: endpoint: https://infogw.api.openshift.com proxy: "" status: Enabled
Copy to Clipboard Copied!