| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| apiVersion: apps/v1 |
| kind: StatefulSet |
| metadata: |
| name: kudu-master |
| namespace: apache-kudu |
| labels: |
| app: kudu-master |
| spec: |
| serviceName: kudu-masters |
| podManagementPolicy: "Parallel" |
| replicas: 3 |
| selector: |
| matchLabels: |
| app: kudu-master |
| template: |
| metadata: |
| labels: |
| app: kudu-master |
| spec: |
| containers: |
| - name: kudu-master |
| image: apache/kudu |
| imagePullPolicy: IfNotPresent |
| env: |
| - name: GET_HOSTS_FROM |
| value: dns |
| - name: POD_IP |
| valueFrom: |
| fieldRef: |
| fieldPath: status.podIP |
| - name: POD_NAME |
| valueFrom: |
| fieldRef: |
| fieldPath: metadata.name |
| - name: KUDU_MASTERS |
| value: "kudu-master-0.kudu-masters.apache-kudu.svc.cluster.local,kudu-master-1.kudu-masters.apache-kudu.svc.cluster.local,kudu-master-2.kudu-masters.apache-kudu.svc.cluster.local" |
| args: ["master"] |
| ports: |
| - containerPort: 8050 |
| name: master-ui |
| - containerPort: 8051 |
| name: master-rpc |
| volumeMounts: |
| - name: datadir |
| mountPath: /mnt/data0 |
| affinity: |
| podAntiAffinity: |
| preferredDuringSchedulingIgnoredDuringExecution: |
| - weight: 100 |
| podAffinityTerm: |
| labelSelector: |
| matchExpressions: |
| - key: app |
| operator: In |
| values: |
| - kudu-master |
| topologyKey: kubernetes.io/hostname |
| updateStrategy: |
| type: RollingUpdate |
| volumeClaimTemplates: |
| - metadata: |
| name: datadir |
| spec: |
| accessModes: [ "ReadWriteOnce" ] |
| resources: |
| requests: |
| storage: 10Gi |
| storageClassName: standard |
| --- |
| apiVersion: apps/v1 |
| kind: StatefulSet |
| metadata: |
| name: kudu-tserver |
| namespace: apache-kudu |
| labels: |
| app: kudu-tserver |
| spec: |
| serviceName: kudu-tservers |
| podManagementPolicy: "Parallel" |
| replicas: 3 |
| selector: |
| matchLabels: |
| app: kudu-tserver |
| template: |
| metadata: |
| labels: |
| app: kudu-tserver |
| spec: |
| containers: |
| - name: kudu-tserver |
| image: apache/kudu |
| imagePullPolicy: IfNotPresent |
| env: |
| - name: GET_HOSTS_FROM |
| value: dns |
| - name: POD_IP |
| valueFrom: |
| fieldRef: |
| fieldPath: status.podIP |
| - name: POD_NAME |
| valueFrom: |
| fieldRef: |
| fieldPath: metadata.name |
| - name: KUDU_MASTERS |
| value: "kudu-master-0.kudu-masters.apache-kudu.svc.cluster.local,kudu-master-1.kudu-masters.apache-kudu.svc.cluster.local,kudu-master-2.kudu-masters.apache-kudu.svc.cluster.local" |
| args: ["tserver"] |
| ports: |
| - containerPort: 7050 |
| name: tserver-ui |
| - containerPort: 7051 |
| name: tserver-rpc |
| volumeMounts: |
| - name: datadir |
| mountPath: /mnt/data0 |
| affinity: |
| podAntiAffinity: |
| preferredDuringSchedulingIgnoredDuringExecution: |
| - weight: 100 |
| podAffinityTerm: |
| labelSelector: |
| matchExpressions: |
| - key: app |
| operator: In |
| values: |
| - kudu-tserver |
| topologyKey: kubernetes.io/hostname |
| updateStrategy: |
| type: RollingUpdate |
| rollingUpdate: |
| # partition option will be useful for staging update scenario, |
| partition: 0 |
| volumeClaimTemplates: |
| - metadata: |
| name: datadir |
| spec: |
| accessModes: [ "ReadWriteOnce" ] |
| resources: |
| requests: |
| storage: 10Gi |
| storageClassName: standard |