blob: 8ae6478823c4881d07196a10053391e0152a39e6 [file] [log] [blame]
#
# 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: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
name: pinot-controller-config
namespace: pinot-quickstart
data:
pinot-controller.conf: |-
controller.helix.cluster.name=pinot-quickstart
controller.port=9000
controller.vip.host=pinot-controller
controller.vip.port=9000
controller.data.dir=/var/pinot/controller/data
controller.zk.str=zookeeper:2181/pinot
pinot.set.instance.id.to.hostname=true
- apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pinot-controller
namespace: pinot-quickstart
spec:
selector:
matchLabels:
app: pinot-controller
serviceName: pinot-controller
replicas: 1
updateStrategy:
type: RollingUpdate
podManagementPolicy: Parallel
template:
metadata:
labels:
app: pinot-controller
spec:
terminationGracePeriodSeconds: 30
containers:
- image: apachepinot/pinot:release-0.7.1
imagePullPolicy: Always
name: pinot-controller
args: [
"StartController",
"-configFileName", "/var/pinot/controller/config/pinot-controller.conf"
]
ports:
- containerPort: 9000
protocol: TCP
volumeMounts:
- name: config
mountPath: /var/pinot/controller/config
- name: pinot-controller-storage
mountPath: /var/pinot/controller/data
initContainers:
- name: create-zk-root-path
image: solsson/kafka:2.1.0@sha256:ac3f06d87d45c7be727863f31e79fbfdcb9c610b51ba9cf03c75a95d602f15e1
command: ["bin/zookeeper-shell.sh", "ZooKeeper", "-server", "zookeeper:2181", "create", "/pinot", "\"\""]
restartPolicy: Always
volumes:
- name: config
configMap:
name: pinot-controller-config
nodeSelector:
cloud.google.com/gke-nodepool: default-pool
volumeClaimTemplates:
- metadata:
name: pinot-controller-storage
spec:
accessModes:
- ReadWriteOnce
storageClassName: "pinot-controller"
resources:
requests:
storage: 10G
- apiVersion: v1
kind: Service
metadata:
name: pinot-controller
namespace: pinot-quickstart
spec:
ports:
# [podname].pinot-controller.pinot-quickstart.svc.cluster.local
- port: 9000
clusterIP: None
selector:
app: pinot-controller