xref: /aosp_15_r20/external/perfetto/infra/bigtrace/clickhouse/clickhouse-deployment.yaml (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Copyright (C) 2024 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: apps/v1
16kind: Deployment
17metadata:
18  name: clickhouse
19spec:
20  replicas: 1
21  selector:
22    matchLabels:
23      app: clickhouse
24  template:
25    metadata:
26      labels:
27        app: clickhouse
28    spec:
29      volumes:
30        - name: clickhouse-configmap
31          configMap:
32            name: clickhouse-configmap
33        - name: clickhouse-storage
34          persistentVolumeClaim:
35            claimName: clickhouse
36      containers:
37      - name: clickhouse
38        image: # [ZONE]-docker.pkg.dev/[PROJECT_NAME]/[REPO_NAME]/clickhouse
39        env:
40        - name: BIGTRACE_ORCHESTRATOR_ADDRESS
41          value: # Address of Orchestrator service
42        ports:
43        - containerPort: 8123
44        - containerPort: 9000
45        resources:
46          limits:
47            cpu: 600m
48            memory: 4Gi
49          requests:
50            cpu: 300m
51            memory: 2Gi
52        volumeMounts:
53            - name: clickhouse-configmap
54              mountPath: /etc/clickhouse-server/config.d/default_config.xml
55              subPath: config.xml
56            - name: clickhouse-storage
57              mountPath: /data