Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELM]: Added additional probes options and startup probe. #13165

Merged
merged 5 commits into from
May 23, 2024

Conversation

abhioncbr
Copy link
Contributor

@abhioncbr abhioncbr commented May 16, 2024

As per the issue,

Added following more probes options

  • successThreshold
  • failureThreshold
  • timeoutSeconds

And also added startup probe

Also, here is the output for the helm lint command

$ helm lint
==> Linting .
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, 0 chart(s) failed

And here is the output of the helm template command

helm template
---
# Source: pinot/charts/zookeeper/templates/networkpolicy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: release-name
      app.kubernetes.io/name: zookeeper
  policyTypes:
    - Ingress
    - Egress
  egress:
    - {}
  ingress:
    # Allow inbound connections to ZooKeeper
    - ports:
        - port: 2181
    # Allow internal communications between nodes
    - ports:
        - port: 2888
        - port: 3888
      from:
        - podSelector:
            matchLabels:
              app.kubernetes.io/instance: release-name
              app.kubernetes.io/name: zookeeper
---
# Source: pinot/charts/zookeeper/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
    role: zookeeper
automountServiceAccountToken: false
---
# Source: pinot/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: release-name-pinot
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
---
# Source: pinot/charts/zookeeper/templates/scripts-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: release-name-zookeeper-scripts
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
data:
  init-certs.sh: |-
    #!/bin/bash
  setup.sh: |-
    #!/bin/bash

    # Execute entrypoint as usual after obtaining ZOO_SERVER_ID
    # check ZOO_SERVER_ID in persistent volume via myid
    # if not present, set based on POD hostname
    if [[ -f "/bitnami/zookeeper/data/myid" ]]; then
        export ZOO_SERVER_ID="$(cat /bitnami/zookeeper/data/myid)"
    else
        HOSTNAME="$(hostname -s)"
        if [[ $HOSTNAME =~ (.*)-([0-9]+)$ ]]; then
            ORD=${BASH_REMATCH[2]}
            export ZOO_SERVER_ID="$((ORD + 1 ))"
        else
            echo "Failed to get index from hostname $HOSTNAME"
            exit 1
        fi
    fi
    exec /entrypoint.sh /run.sh
---
# Source: pinot/templates/broker/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-broker-config
data:
  pinot-broker.conf: |-
    pinot.broker.client.queryPort=8099
    pinot.broker.routing.table.builder.class=random
    pinot.set.instance.id.to.hostname=true
    pinot.query.server.port=7321
    pinot.query.runner.port=7732
---
# Source: pinot/templates/controller/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-controller-config
data:
  pinot-controller.conf: |-
    controller.helix.cluster.name=pinot-quickstart
    controller.port=9000
    controller.data.dir=/var/pinot/controller/data
    controller.zk.str=release-name-zookeeper:2181
    pinot.set.instance.id.to.hostname=true
    controller.task.scheduler.enabled=true
---
# Source: pinot/templates/minion-stateless/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-minion-stateless-config
data:
  pinot-minion-stateless.conf: |-
    pinot.minion.port=9514
    dataDir=/var/pinot/minion/data
    pinot.set.instance.id.to.hostname=true
---
# Source: pinot/templates/server/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-server-config
data:
  pinot-server.conf: |-
    pinot.server.netty.port=8098
    pinot.server.adminapi.port=8097
    pinot.server.instance.dataDir=/var/pinot/server/data/index
    pinot.server.instance.segmentTarDir=/var/pinot/server/data/segment
    pinot.set.instance.id.to.hostname=true
    pinot.server.instance.realtime.alloc.offheap=true
    pinot.query.server.port=7321
    pinot.query.runner.port=7732
---
# Source: pinot/charts/zookeeper/templates/svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-zookeeper-headless
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
spec:
  type: ClusterIP
  clusterIP: None
  publishNotReadyAddresses: true
  ports:
    - name: tcp-client
      port: 2181
      targetPort: client
    - name: tcp-follower
      port: 2888
      targetPort: follower
    - name: tcp-election
      port: 3888
      targetPort: election
  selector:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/component: zookeeper
---
# Source: pinot/charts/zookeeper/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
spec:
  type: ClusterIP
  sessionAffinity: None
  ports:
    - name: tcp-client
      port: 2181
      targetPort: client
      nodePort: null
  selector:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/component: zookeeper
---
# Source: pinot/templates/broker/service-external.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-pinot-broker-external
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  type: LoadBalancer
  ports:
    - name: external-broker
      port: 8099
  selector:
    app: pinot
    release: release-name
    component: broker
---
# Source: pinot/templates/broker/service-headless.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-broker-headless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  clusterIP: None
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: broker
      port: 8099
  selector:
    app: pinot
    release: release-name
    component: broker
---
# Source: pinot/templates/broker/service.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-broker
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  type: ClusterIP
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: broker
      port: 8099
  selector:
    app: pinot
    release: release-name
    component: broker
---
# Source: pinot/templates/controller/service-external.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-pinot-controller-external
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  type: LoadBalancer
  ports:
    - name: external-controller
      port: 9000
  selector:
    app: pinot
    release: release-name
    component: controller
---
# Source: pinot/templates/controller/service-headless.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-controller-headless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  clusterIP: None
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: controller
      port: 9000
  selector:
    app: pinot
    release: release-name
    component: controller
---
# Source: pinot/templates/controller/service.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-controller
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  type: ClusterIP
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: controller
      port: 9000
  selector:
    app: pinot
    release: release-name
    component: controller
---
# Source: pinot/templates/server/service-headless.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-server-headless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: server
spec:
  clusterIP: None
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: netty
      port: 8098
      protocol: TCP
    - name: admin
      port: 80
      targetPort: 8097
      protocol: TCP
  selector:
    app: pinot
    release: release-name
    component: server
---
# Source: pinot/templates/server/service.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-server
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: server
spec:
  type: ClusterIP
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: netty
      port: 8098
      protocol: TCP
    - name: admin
      port: 80
      targetPort: 8097
      protocol: TCP
  selector:
    app: pinot
    release: release-name
    component: server
---
# Source: pinot/templates/minion-stateless/deployment.yaml
#
# 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: Deployment
metadata:
  name: release-name-pinot-minion-stateless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: minion-stateless
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: minion-stateless
  replicas: 1
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: minion-stateless
      annotations:
        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: minion-stateless
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [
          "StartMinion",
          "-clusterName", "pinot-quickstart",
          "-zkAddress", "release-name-zookeeper:2181",
          "-configFileName", "/var/pinot/minion/config/pinot-minion-stateless.conf"
        ]
        env:
          - name: JAVA_OPTS
            value: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-minion.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-minion-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 9514
            protocol: TCP
            name: minion
        livenessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          httpGet:
            path: /health
            port: 9514
        readinessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          httpGet:
            path: /health
            port: 9514
        volumeMounts:
          - name: config
            mountPath: /var/pinot/minion/config
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
        - name: config
          configMap:
            name: release-name-pinot-minion-stateless-config
        - name: data
          emptyDir: {}
---
# Source: pinot/charts/zookeeper/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
    role: zookeeper
spec:
  replicas: 1
  revisionHistoryLimit: 10
  podManagementPolicy: Parallel
  selector:
    matchLabels:
      app.kubernetes.io/instance: release-name
      app.kubernetes.io/name: zookeeper
      app.kubernetes.io/component: zookeeper
  serviceName: release-name-zookeeper-headless
  updateStrategy:
    rollingUpdate: {}
    type: RollingUpdate
  template:
    metadata:
      annotations:
      labels:
        app.kubernetes.io/instance: release-name
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: zookeeper
        app.kubernetes.io/version: 3.9.2
        helm.sh/chart: zookeeper-13.2.0
        app.kubernetes.io/component: zookeeper
    spec:
      enableServiceLinks: true
      serviceAccountName: release-name-zookeeper
      
      automountServiceAccountToken: false
      affinity:
        podAffinity:
          
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/instance: release-name
                    app.kubernetes.io/name: zookeeper
                    app.kubernetes.io/component: zookeeper
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:
          
      securityContext:
        fsGroup: 1001
        fsGroupChangePolicy: Always
        supplementalGroups: []
        sysctls: []
      initContainers:
      containers:
        - name: zookeeper
          image: docker.io/bitnami/zookeeper:3.9.2-debian-12-r2
          imagePullPolicy: "IfNotPresent"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          command:
            - /scripts/setup.sh
          resources:
            requests:
              memory: 1.25Gi
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: ZOO_DATA_LOG_DIR
              value: ""
            - name: ZOO_PORT_NUMBER
              value: "2181"
            - name: ZOO_TICK_TIME
              value: "2000"
            - name: ZOO_INIT_LIMIT
              value: "10"
            - name: ZOO_SYNC_LIMIT
              value: "5"
            - name: ZOO_PRE_ALLOC_SIZE
              value: "65536"
            - name: ZOO_SNAPCOUNT
              value: "100000"
            - name: ZOO_MAX_CLIENT_CNXNS
              value: "60"
            - name: ZOO_4LW_COMMANDS_WHITELIST
              value: "srvr, mntr, ruok"
            - name: ZOO_LISTEN_ALLIPS_ENABLED
              value: "no"
            - name: ZOO_AUTOPURGE_INTERVAL
              value: "1"
            - name: ZOO_AUTOPURGE_RETAIN_COUNT
              value: "5"
            - name: ZOO_MAX_SESSION_TIMEOUT
              value: "40000"
            - name: ZOO_SERVERS
              value: release-name-zookeeper-0.release-name-zookeeper-headless.consumer.svc.cluster.local:2888:3888::1 
            - name: ZOO_ENABLE_AUTH
              value: "no"
            - name: ZOO_ENABLE_QUORUM_AUTH
              value: "no"
            - name: ZOO_HEAP_SIZE
              value: "1024"
            - name: ZOO_LOG_LEVEL
              value: "ERROR"
            - name: ALLOW_ANONYMOUS_LOGIN
              value: "yes"
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
            - name: ZOO_ADMIN_SERVER_PORT_NUMBER
              value: "8080"
          ports:
            - name: client
              containerPort: 2181
            - name: http-admin
              containerPort: 8080
          livenessProbe:
            failureThreshold: 6
            initialDelaySeconds: 30
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command:
                - /bin/bash
                - -ec
                - ZOO_HC_TIMEOUT=2 /opt/bitnami/scripts/zookeeper/healthcheck.sh
          readinessProbe:
            failureThreshold: 6
            initialDelaySeconds: 5
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command:
                - /bin/bash
                - -ec
                - ZOO_HC_TIMEOUT=2 /opt/bitnami/scripts/zookeeper/healthcheck.sh
          volumeMounts:
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: empty-dir
              mountPath: /opt/bitnami/zookeeper/conf
              subPath: app-conf-dir
            - name: empty-dir
              mountPath: /opt/bitnami/zookeeper/logs
              subPath: app-logs-dir
            - name: scripts
              mountPath: /scripts/setup.sh
              subPath: setup.sh
            - name: data
              mountPath: /bitnami/zookeeper
      volumes:
        - name: empty-dir
          emptyDir: {}
        - name: scripts
          configMap:
            name: release-name-zookeeper-scripts
            defaultMode: 493
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"
---
# Source: pinot/templates/broker/statefulset.yaml
#
# 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: release-name-pinot-broker
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: broker
  serviceName: release-name-pinot-broker-headless
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: broker
      annotations:

        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: broker
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [
          "StartBroker",
          "-clusterName", "pinot-quickstart",
          "-zkAddress", "release-name-zookeeper:2181",
          "-configFileName", "/var/pinot/broker/config/pinot-broker.conf"
        ]
        env:
          - name: JAVA_OPTS
            value: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-broker.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-broker-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 8099
            protocol: TCP
            name: broker                  
        volumeMounts:
          - name: config
            mountPath: /var/pinot/broker/config
        livenessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 1
          successThreshold: 1
          timeoutSeconds: 1
          httpGet:
            path: /health
            port: 8099
        readinessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 1
          successThreshold: 1
          timeoutSeconds: 1
          httpGet:
            path: /health
            port: 8099
        startupProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 1
          successThreshold: 1
          timeoutSeconds: 1
          httpGet:
            path: /health
            port: 8099
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
        - name: config
          configMap:
            name: release-name-pinot-broker-config
---
# Source: pinot/templates/controller/statefulset.yaml
#
# 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: release-name-pinot-controller
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: controller
  serviceName: release-name-pinot-controller-headless
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: controller
      annotations:

        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: controller
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [ "StartController", "-configFileName", "/var/pinot/controller/config/pinot-controller.conf" ]
        env:
          - name: JAVA_OPTS
            value: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-controller.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-controller-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 9000
            protocol: TCP
            name: controller
        volumeMounts:
          - name: config
            mountPath: /var/pinot/controller/config
          - name: data
            mountPath: "/var/pinot/controller/data"
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
      - name: config
        configMap:
          name: release-name-pinot-controller-config
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "1G"
---
# Source: pinot/templates/server/statefulset.yaml
#
# 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: release-name-pinot-server
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: server
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: server
  serviceName: release-name-pinot-server-headless
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: server
      annotations:

        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: server
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [
          "StartServer",
          "-clusterName", "pinot-quickstart",
          "-zkAddress", "release-name-zookeeper:2181",
          "-configFileName", "/var/pinot/server/config/pinot-server.conf"
        ]
        env:
          - name: JAVA_OPTS
            value: "-Xms512M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-server.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-server-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 8098
            protocol: TCP
            name: netty
          - containerPort: 8097
            protocol: TCP
            name: admin
        volumeMounts:
          - name: config
            mountPath: /var/pinot/server/config
          - name: data
            mountPath: "/var/pinot/server/data"
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
        - name: config
          configMap:
            name: release-name-pinot-server-config
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: 4G
---
# Source: pinot/templates/broker/service-external.yaml
#
# 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.
#
---
# Source: pinot/templates/controller/service-external.yaml
#
# 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.
#
---
# Source: pinot/templates/minion-stateless/pvc.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/configmap.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/service-headless.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/service.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/statefulset.yaml
#
# 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.
#

@codecov-commenter
Copy link

codecov-commenter commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.24%. Comparing base (59551e4) to head (8cdd6fd).
Report is 485 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13165      +/-   ##
============================================
+ Coverage     61.75%   62.24%   +0.48%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2531      +95     
  Lines        133233   138567    +5334     
  Branches      20636    21448     +812     
============================================
+ Hits          82274    86246    +3972     
- Misses        44911    45885     +974     
- Partials       6048     6436     +388     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (-0.01%) ⬇️
integration <0.01% <ø> (-0.01%) ⬇️
integration1 <0.01% <ø> (-0.01%) ⬇️
integration2 0.00% <ø> (ø)
java-11 62.18% <ø> (+0.48%) ⬆️
java-21 62.12% <ø> (+0.50%) ⬆️
skip-bytebuffers-false 62.21% <ø> (+0.47%) ⬆️
skip-bytebuffers-true 62.10% <ø> (+34.37%) ⬆️
temurin 62.24% <ø> (+0.48%) ⬆️
unittests 62.23% <ø> (+0.48%) ⬆️
unittests1 46.70% <ø> (-0.19%) ⬇️
unittests2 27.91% <ø> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abhioncbr abhioncbr changed the title Added additional probes options and startup probe. [HELM]: Added additional probes options and startup probe. May 17, 2024
@abhioncbr abhioncbr marked this pull request as ready for review May 17, 2024 00:11
@abhioncbr
Copy link
Contributor Author

Please review @xiangfu0 / @zhtaoxiang. Thanks

helm/pinot/values.yaml Outdated Show resolved Hide resolved
helm/pinot/templates/broker/statefulset.yaml Show resolved Hide resolved
@xiangfu0 xiangfu0 added the helm label May 17, 2024
@xiangfu0
Copy link
Contributor

Also missing probes for minion stateless.

@piby180
Copy link

piby180 commented May 17, 2024

@abhioncbr Thanks for taking time to work on this PR
@xiangfu0 thanks for the review.

However, the changes are still not enough for us. For us, the server pods takes longer time to restart as compared to controller or minion pods. Hence we do need to customize different probe settings for different components. Especially for server pods, I need longer initialDelaySeconds and higher failureThreshold at least for startup probe.

I would suggest the following:

// Instead of 
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}

// we should use
initialDelaySeconds: {{.Values.controller.probes.livenessProbe.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}

This would be backwards compatible and provides full customization of all settings including different initialDelaySeconds for different components. I know it is a bit tedious but it will provide us more flexibility to optimize probes as per our environment :)

If you want me to work on it in a separate PR, I can support here.

@abhioncbr
Copy link
Contributor Author

@abhioncbr Thanks for taking time to work on this PR @xiangfu0 thanks for the review.

However, the changes are still not enough for us. For us, the server pods takes longer time to restart as compared to controller or minion pods. Hence we do need to customize different probe settings for different components. Especially for server pods, I need longer initialDelaySeconds and higher failureThreshold at least for startup probe.

I would suggest the following:

// Instead of 
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}

// we should use
initialDelaySeconds: {{.Values.controller.probes.livenessProbe.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}

This would be backwards compatible and provides full customization of all settings including different initialDelaySeconds for different components. I know it is a bit tedious but it will provide us more flexibility to optimize probes as per our environment :)

If you want me to work on it in a separate PR, I can support here.

Thanks for your input, @piby180; I have tried to incorporate your suggestions as well here. Please have a look and let me know if some more changes are required. Thanks

@piby180
Copy link

piby180 commented May 17, 2024

@abhioncbr That's all I need. Thanks. LGTM

helm/pinot/templates/minion-stateless/deployment.yaml Outdated Show resolved Hide resolved
helm/pinot/templates/minion-stateless/deployment.yaml Outdated Show resolved Hide resolved
helm/pinot/values.yaml Outdated Show resolved Hide resolved
@abhioncbr
Copy link
Contributor Author

I've updated it according to the comments.

Here the output as per new changes

 helm lint                                                                                              
==> Linting .
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, 0 chart(s) failed

And here is the output of the helm template command

helm template
---
# Source: pinot/charts/zookeeper/templates/networkpolicy.yaml
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: release-name
      app.kubernetes.io/name: zookeeper
  policyTypes:
    - Ingress
    - Egress
  egress:
    - {}
  ingress:
    # Allow inbound connections to ZooKeeper
    - ports:
        - port: 2181
    # Allow internal communications between nodes
    - ports:
        - port: 2888
        - port: 3888
      from:
        - podSelector:
            matchLabels:
              app.kubernetes.io/instance: release-name
              app.kubernetes.io/name: zookeeper
---
# Source: pinot/charts/zookeeper/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
    role: zookeeper
automountServiceAccountToken: false
---
# Source: pinot/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: release-name-pinot
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
---
# Source: pinot/charts/zookeeper/templates/scripts-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: release-name-zookeeper-scripts
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
data:
  init-certs.sh: |-
    #!/bin/bash
  setup.sh: |-
    #!/bin/bash

    # Execute entrypoint as usual after obtaining ZOO_SERVER_ID
    # check ZOO_SERVER_ID in persistent volume via myid
    # if not present, set based on POD hostname
    if [[ -f "/bitnami/zookeeper/data/myid" ]]; then
        export ZOO_SERVER_ID="$(cat /bitnami/zookeeper/data/myid)"
    else
        HOSTNAME="$(hostname -s)"
        if [[ $HOSTNAME =~ (.*)-([0-9]+)$ ]]; then
            ORD=${BASH_REMATCH[2]}
            export ZOO_SERVER_ID="$((ORD + 1 ))"
        else
            echo "Failed to get index from hostname $HOSTNAME"
            exit 1
        fi
    fi
    exec /entrypoint.sh /run.sh
---
# Source: pinot/templates/broker/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-broker-config
data:
  pinot-broker.conf: |-
    pinot.broker.client.queryPort=8099
    pinot.broker.routing.table.builder.class=random
    pinot.set.instance.id.to.hostname=true
    pinot.query.server.port=7321
    pinot.query.runner.port=7732
---
# Source: pinot/templates/controller/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-controller-config
data:
  pinot-controller.conf: |-
    controller.helix.cluster.name=pinot-quickstart
    controller.port=9000
    controller.data.dir=/var/pinot/controller/data
    controller.zk.str=release-name-zookeeper:2181
    pinot.set.instance.id.to.hostname=true
    controller.task.scheduler.enabled=true
---
# Source: pinot/templates/minion-stateless/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-minion-stateless-config
data:
  pinot-minion-stateless.conf: |-
    pinot.minion.port=9514
    dataDir=/var/pinot/minion/data
    pinot.set.instance.id.to.hostname=true
---
# Source: pinot/templates/server/configmap.yaml
#
# 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: ConfigMap
metadata:
  name: release-name-pinot-server-config
data:
  pinot-server.conf: |-
    pinot.server.netty.port=8098
    pinot.server.adminapi.port=8097
    pinot.server.instance.dataDir=/var/pinot/server/data/index
    pinot.server.instance.segmentTarDir=/var/pinot/server/data/segment
    pinot.set.instance.id.to.hostname=true
    pinot.server.instance.realtime.alloc.offheap=true
    pinot.query.server.port=7321
    pinot.query.runner.port=7732
---
# Source: pinot/charts/zookeeper/templates/svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-zookeeper-headless
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
spec:
  type: ClusterIP
  clusterIP: None
  publishNotReadyAddresses: true
  ports:
    - name: tcp-client
      port: 2181
      targetPort: client
    - name: tcp-follower
      port: 2888
      targetPort: follower
    - name: tcp-election
      port: 3888
      targetPort: election
  selector:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/component: zookeeper
---
# Source: pinot/charts/zookeeper/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
spec:
  type: ClusterIP
  sessionAffinity: None
  ports:
    - name: tcp-client
      port: 2181
      targetPort: client
      nodePort: null
  selector:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/component: zookeeper
---
# Source: pinot/templates/broker/service-external.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-pinot-broker-external
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  type: LoadBalancer
  ports:
    - name: external-broker
      port: 8099
  selector:
    app: pinot
    release: release-name
    component: broker
---
# Source: pinot/templates/broker/service-headless.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-broker-headless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  clusterIP: None
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: broker
      port: 8099
  selector:
    app: pinot
    release: release-name
    component: broker
---
# Source: pinot/templates/broker/service.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-broker
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  type: ClusterIP
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: broker
      port: 8099
  selector:
    app: pinot
    release: release-name
    component: broker
---
# Source: pinot/templates/controller/service-external.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-pinot-controller-external
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  type: LoadBalancer
  ports:
    - name: external-controller
      port: 9000
  selector:
    app: pinot
    release: release-name
    component: controller
---
# Source: pinot/templates/controller/service-headless.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-controller-headless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  clusterIP: None
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: controller
      port: 9000
  selector:
    app: pinot
    release: release-name
    component: controller
---
# Source: pinot/templates/controller/service.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-controller
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  type: ClusterIP
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: controller
      port: 9000
  selector:
    app: pinot
    release: release-name
    component: controller
---
# Source: pinot/templates/server/service-headless.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-server-headless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: server
spec:
  clusterIP: None
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: netty
      port: 8098
      protocol: TCP
    - name: admin
      port: 80
      targetPort: 8097
      protocol: TCP
  selector:
    app: pinot
    release: release-name
    component: server
---
# Source: pinot/templates/server/service.yaml
#
# 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: Service
metadata:
  name: release-name-pinot-server
  annotations:
    {}
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: server
spec:
  type: ClusterIP
  ports:
    # [pod_name].[service_name].[namespace].svc.cluster.local
    - name: netty
      port: 8098
      protocol: TCP
    - name: admin
      port: 80
      targetPort: 8097
      protocol: TCP
  selector:
    app: pinot
    release: release-name
    component: server
---
# Source: pinot/templates/minion-stateless/deployment.yaml
#
# 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: Deployment
metadata:
  name: release-name-pinot-minion-stateless
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: minion-stateless
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: minion-stateless
  replicas: 1
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: minion-stateless
      annotations:
        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: minion-stateless
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [
          "StartMinion",
          "-clusterName", "pinot-quickstart",
          "-zkAddress", "release-name-zookeeper:2181",
          "-configFileName", "/var/pinot/minion/config/pinot-minion-stateless.conf"
        ]
        env:
          - name: JAVA_OPTS
            value: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-minion.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-minion-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 9514
            protocol: TCP
            name: minion
        livenessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 10
          successThreshold: 1
          timeoutSeconds: 10
          httpGet:
            path: /health
            port: 9514
        readinessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 10
          successThreshold: 1
          timeoutSeconds: 10
          httpGet:
            path: /health
            port: 9514
        startupProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 10
          successThreshold: 1
          timeoutSeconds: 10
          httpGet:
            path: /health
            port: 9514
        volumeMounts:
          - name: config
            mountPath: /var/pinot/minion/config
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
        - name: config
          configMap:
            name: release-name-pinot-minion-stateless-config
        - name: data
          emptyDir: {}
---
# Source: pinot/charts/zookeeper/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: release-name-zookeeper
  namespace: consumer
  labels:
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: zookeeper
    app.kubernetes.io/version: 3.9.2
    helm.sh/chart: zookeeper-13.2.0
    app.kubernetes.io/component: zookeeper
    role: zookeeper
spec:
  replicas: 1
  revisionHistoryLimit: 10
  podManagementPolicy: Parallel
  selector:
    matchLabels:
      app.kubernetes.io/instance: release-name
      app.kubernetes.io/name: zookeeper
      app.kubernetes.io/component: zookeeper
  serviceName: release-name-zookeeper-headless
  updateStrategy:
    rollingUpdate: {}
    type: RollingUpdate
  template:
    metadata:
      annotations:
      labels:
        app.kubernetes.io/instance: release-name
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: zookeeper
        app.kubernetes.io/version: 3.9.2
        helm.sh/chart: zookeeper-13.2.0
        app.kubernetes.io/component: zookeeper
    spec:
      enableServiceLinks: true
      serviceAccountName: release-name-zookeeper
      
      automountServiceAccountToken: false
      affinity:
        podAffinity:
          
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/instance: release-name
                    app.kubernetes.io/name: zookeeper
                    app.kubernetes.io/component: zookeeper
                topologyKey: kubernetes.io/hostname
              weight: 1
        nodeAffinity:
          
      securityContext:
        fsGroup: 1001
        fsGroupChangePolicy: Always
        supplementalGroups: []
        sysctls: []
      initContainers:
      containers:
        - name: zookeeper
          image: docker.io/bitnami/zookeeper:3.9.2-debian-12-r2
          imagePullPolicy: "IfNotPresent"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions: {}
            seccompProfile:
              type: RuntimeDefault
          command:
            - /scripts/setup.sh
          resources:
            requests:
              memory: 1.25Gi
          env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: ZOO_DATA_LOG_DIR
              value: ""
            - name: ZOO_PORT_NUMBER
              value: "2181"
            - name: ZOO_TICK_TIME
              value: "2000"
            - name: ZOO_INIT_LIMIT
              value: "10"
            - name: ZOO_SYNC_LIMIT
              value: "5"
            - name: ZOO_PRE_ALLOC_SIZE
              value: "65536"
            - name: ZOO_SNAPCOUNT
              value: "100000"
            - name: ZOO_MAX_CLIENT_CNXNS
              value: "60"
            - name: ZOO_4LW_COMMANDS_WHITELIST
              value: "srvr, mntr, ruok"
            - name: ZOO_LISTEN_ALLIPS_ENABLED
              value: "no"
            - name: ZOO_AUTOPURGE_INTERVAL
              value: "1"
            - name: ZOO_AUTOPURGE_RETAIN_COUNT
              value: "5"
            - name: ZOO_MAX_SESSION_TIMEOUT
              value: "40000"
            - name: ZOO_SERVERS
              value: release-name-zookeeper-0.release-name-zookeeper-headless.consumer.svc.cluster.local:2888:3888::1 
            - name: ZOO_ENABLE_AUTH
              value: "no"
            - name: ZOO_ENABLE_QUORUM_AUTH
              value: "no"
            - name: ZOO_HEAP_SIZE
              value: "1024"
            - name: ZOO_LOG_LEVEL
              value: "ERROR"
            - name: ALLOW_ANONYMOUS_LOGIN
              value: "yes"
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
            - name: ZOO_ADMIN_SERVER_PORT_NUMBER
              value: "8080"
          ports:
            - name: client
              containerPort: 2181
            - name: http-admin
              containerPort: 8080
          livenessProbe:
            failureThreshold: 6
            initialDelaySeconds: 30
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command:
                - /bin/bash
                - -ec
                - ZOO_HC_TIMEOUT=2 /opt/bitnami/scripts/zookeeper/healthcheck.sh
          readinessProbe:
            failureThreshold: 6
            initialDelaySeconds: 5
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command:
                - /bin/bash
                - -ec
                - ZOO_HC_TIMEOUT=2 /opt/bitnami/scripts/zookeeper/healthcheck.sh
          volumeMounts:
            - name: empty-dir
              mountPath: /tmp
              subPath: tmp-dir
            - name: empty-dir
              mountPath: /opt/bitnami/zookeeper/conf
              subPath: app-conf-dir
            - name: empty-dir
              mountPath: /opt/bitnami/zookeeper/logs
              subPath: app-logs-dir
            - name: scripts
              mountPath: /scripts/setup.sh
              subPath: setup.sh
            - name: data
              mountPath: /bitnami/zookeeper
      volumes:
        - name: empty-dir
          emptyDir: {}
        - name: scripts
          configMap:
            name: release-name-zookeeper-scripts
            defaultMode: 493
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "8Gi"
---
# Source: pinot/templates/broker/statefulset.yaml
#
# 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: release-name-pinot-broker
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: broker
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: broker
  serviceName: release-name-pinot-broker-headless
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: broker
      annotations:

        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: broker
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [
          "StartBroker",
          "-clusterName", "pinot-quickstart",
          "-zkAddress", "release-name-zookeeper:2181",
          "-configFileName", "/var/pinot/broker/config/pinot-broker.conf"
        ]
        env:
          - name: JAVA_OPTS
            value: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-broker.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-broker-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 8099
            protocol: TCP
            name: broker                  
        volumeMounts:
          - name: config
            mountPath: /var/pinot/broker/config
        livenessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 10
          successThreshold: 1
          timeoutSeconds: 10
          httpGet:
            path: /health
            port: 8099
        readinessProbe:
          initialDelaySeconds: 60
          periodSeconds: 10
          failureThreshold: 10
          successThreshold: 1
          timeoutSeconds: 10
          httpGet:
            path: /health
            port: 8099
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
        - name: config
          configMap:
            name: release-name-pinot-broker-config
---
# Source: pinot/templates/controller/statefulset.yaml
#
# 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: release-name-pinot-controller
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: controller
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: controller
  serviceName: release-name-pinot-controller-headless
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: controller
      annotations:

        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: controller
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [ "StartController", "-configFileName", "/var/pinot/controller/config/pinot-controller.conf" ]
        env:
          - name: JAVA_OPTS
            value: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-controller.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-controller-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 9000
            protocol: TCP
            name: controller
        volumeMounts:
          - name: config
            mountPath: /var/pinot/controller/config
          - name: data
            mountPath: "/var/pinot/controller/data"
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
      - name: config
        configMap:
          name: release-name-pinot-controller-config
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: "1G"
---
# Source: pinot/templates/server/statefulset.yaml
#
# 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: release-name-pinot-server
  labels:
    helm.sh/chart: pinot-0.2.9-SNAPSHOT
    app: pinot
    release: release-name
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/managed-by: Helm
    heritage: Helm
    component: server
spec:
  selector:
    matchLabels:
      app: pinot
      release: release-name
      component: server
  serviceName: release-name-pinot-server-headless
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  podManagementPolicy: Parallel
  template:
    metadata:
      labels:
        helm.sh/chart: pinot-0.2.9-SNAPSHOT
        app: pinot
        release: release-name
        app.kubernetes.io/version: "1.0.0"
        app.kubernetes.io/managed-by: Helm
        heritage: Helm
        component: server
      annotations:

        {}
    spec:
      terminationGracePeriodSeconds: 30
      serviceAccountName: release-name-pinot
      securityContext:
        {}
      nodeSelector:
        {}
      affinity:
        {}
      tolerations:
        []
      containers:
      - name: server
        securityContext:
          {}
        image: "apachepinot/pinot:latest"
        imagePullPolicy: Always
        args: [
          "StartServer",
          "-clusterName", "pinot-quickstart",
          "-zkAddress", "release-name-zookeeper:2181",
          "-configFileName", "/var/pinot/server/config/pinot-server.conf"
        ]
        env:
          - name: JAVA_OPTS
            value: "-Xms512M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-server.log -Dlog4j2.configurationFile=/opt/pinot/etc/conf/pinot-server-log4j2.xml -Dplugins.dir=/opt/pinot/plugins"
          - name: LOG4J_CONSOLE_LEVEL
            value: info
        envFrom:
          []
        ports:
          - containerPort: 8098
            protocol: TCP
            name: netty
          - containerPort: 8097
            protocol: TCP
            name: admin
        volumeMounts:
          - name: config
            mountPath: /var/pinot/server/config
          - name: data
            mountPath: "/var/pinot/server/data"
        resources:
            requests:
              memory: 1.25Gi
      restartPolicy: Always
      volumes:
        - name: config
          configMap:
            name: release-name-pinot-server-config
  volumeClaimTemplates:
    - metadata:
        name: data
      spec:
        accessModes:
          - "ReadWriteOnce"
        resources:
          requests:
            storage: 4G
---
# Source: pinot/templates/broker/service-external.yaml
#
# 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.
#
---
# Source: pinot/templates/controller/service-external.yaml
#
# 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.
#
---
# Source: pinot/templates/minion-stateless/pvc.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/configmap.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/service-headless.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/service.yaml
#
# 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.
#
---
# Source: pinot/templates/minion/statefulset.yaml
#
# 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.
#

@abhioncbr
Copy link
Contributor Author

@xiangfu0, can we merge this if no further changes are needed? Thanks

@@ -320,6 +368,27 @@ server:
endpoint: "/health"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very familiar with HELM, but we do have separate endpoint on server for liveness (/health/liveness) and readiness (/health/readiness) check. Should we update this file to accommodate that?

@abhioncbr abhioncbr closed this May 23, 2024
@abhioncbr abhioncbr reopened this May 23, 2024
@Jackie-Jiang Jackie-Jiang merged commit 96ef43f into apache:master May 23, 2024
33 of 38 checks passed
@piby180
Copy link

piby180 commented May 29, 2024

Hi @abhioncbr
There are two typos in the helm chart because of which helm is unable to render it.
There must be space between : and {

successThreshold:{{ .Values.broker.probes.startup.successThreshold | default .Values.probes.successThreshold }}

periodSeconds:{{ .Values.controller.probes.liveness.periodSeconds | default .Values.probes.periodSeconds }}

Could you please have a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants