mirror of
https://github.com/bitnami/charts.git
synced 2026-03-05 06:47:25 +08:00
[bitnami/zookeeper] Add containerPort (#7247)
This commit is contained in:
committed by
GitHub
parent
1dde1c4016
commit
de311f0219
@@ -21,4 +21,4 @@ name: zookeeper
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-zookeeper
|
||||
- https://zookeeper.apache.org/
|
||||
version: 7.3.0
|
||||
version: 7.4.0
|
||||
|
||||
@@ -118,6 +118,10 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
| `rollingUpdatePartition` | Partition update strategy | `""` |
|
||||
| `podManagementPolicy` | StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees. There are two valid pod management policies: `OrderedReady` and `Parallel` | `Parallel` |
|
||||
| `replicaCount` | Number of ZooKeeper nodes | `1` |
|
||||
| `containerPort` | ZooKeeper port | `2181` |
|
||||
| `tlsContainerPort` | ZooKeeper TLS port | `3181` |
|
||||
| `followerContainerPort` | ZooKeeper follower port | `2888` |
|
||||
| `electionContainerPort` | ZooKeeper election port | `3888` |
|
||||
| `minServerId` | Minimal SERVER_ID value, nodes increment their IDs respectively | `1` |
|
||||
| `securityContext.enabled` | Enable security context (ZooKeeper master pod) | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the container (ZooKeeper master pod) | `1001` |
|
||||
|
||||
@@ -37,7 +37,7 @@ In order to replicate the container startup scripts execute this command:
|
||||
|
||||
{{- else }}
|
||||
|
||||
ZooKeeper can be accessed via port 2181 on the following DNS name from within your cluster:
|
||||
ZooKeeper can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster:
|
||||
|
||||
{{ template "common.names.fullname" . }}.{{ template "zookeeper.namespace" . }}.svc.{{ .Values.clusterDomain }}
|
||||
|
||||
@@ -60,12 +60,12 @@ To connect to your ZooKeeper server from outside the cluster execute the followi
|
||||
Watch the status with: 'kubectl get svc --namespace {{ template "zookeeper.namespace" . }} -w {{ template "common.names.fullname" . }}'
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ template "zookeeper.namespace" . }} {{ template "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
zkCli.sh $SERVICE_IP:2181
|
||||
zkCli.sh $SERVICE_IP:{{ .Values.service.port }}
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
|
||||
kubectl port-forward --namespace {{ template "zookeeper.namespace" . }} svc/{{ template "common.names.fullname" . }} 2181:2181 &
|
||||
zkCli.sh 127.0.0.1:2181
|
||||
kubectl port-forward --namespace {{ template "zookeeper.namespace" . }} svc/{{ template "common.names.fullname" . }} {{ .Values.service.port }}:{{ .Values.containerPort }} &
|
||||
zkCli.sh 127.0.0.1:{{ .Values.service.port }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -279,7 +279,7 @@ spec:
|
||||
- name: ZOO_DATA_LOG_DIR
|
||||
value: {{ .Values.dataLogDir | quote }}
|
||||
- name: ZOO_PORT_NUMBER
|
||||
value: {{ .Values.service.port | quote }}
|
||||
value: {{ .Values.containerPort | quote }}
|
||||
- name: ZOO_TICK_TIME
|
||||
value: {{ .Values.tickTime | quote }}
|
||||
- name: ZOO_INIT_LIMIT
|
||||
@@ -305,8 +305,8 @@ spec:
|
||||
- name: ZOO_SERVERS
|
||||
{{- $replicaCount := int .Values.replicaCount }}
|
||||
{{- $minServerId := int .Values.minServerId }}
|
||||
{{- $followerPort := int .Values.service.followerPort }}
|
||||
{{- $electionPort := int .Values.service.electionPort }}
|
||||
{{- $followerPort := int .Values.followerContainerPort }}
|
||||
{{- $electionPort := int .Values.electionContainerPort }}
|
||||
{{- $releaseNamespace := include "zookeeper.namespace" . }}
|
||||
{{- $zookeeperFullname := include "common.names.fullname" . }}
|
||||
{{- $zookeeperHeadlessServiceName := printf "%s-%s" $zookeeperFullname "headless" | trunc 63 }}
|
||||
@@ -401,16 +401,16 @@ spec:
|
||||
ports:
|
||||
{{- if not .Values.service.disableBaseClientPort }}
|
||||
- name: client
|
||||
containerPort: {{ .Values.service.port }}
|
||||
containerPort: {{ .Values.containerPort }}
|
||||
{{- end }}
|
||||
{{- if .Values.tls.client.enabled }}
|
||||
- name: client-tls
|
||||
containerPort: {{ .Values.service.tlsClientPort }}
|
||||
containerPort: {{ .Values.tlsContainerPort }}
|
||||
{{- end }}
|
||||
- name: follower
|
||||
containerPort: {{ .Values.service.followerPort }}
|
||||
containerPort: {{ .Values.followerContainerPort }}
|
||||
- name: election
|
||||
containerPort: {{ .Values.service.electionPort }}
|
||||
containerPort: {{ .Values.electionContainerPort }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.metrics.containerPort }}
|
||||
@@ -420,12 +420,12 @@ spec:
|
||||
livenessProbe:
|
||||
exec:
|
||||
{{- if not .Values.service.disableBaseClientPort }}
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.livenessProbe.probeCommandTimeout }} nc -w {{ .Values.livenessProbe.probeCommandTimeout }} localhost {{ .Values.service.port }} | grep imok']
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.livenessProbe.probeCommandTimeout }} nc -w {{ .Values.livenessProbe.probeCommandTimeout }} localhost {{ .Values.containerPort }} | grep imok']
|
||||
{{- else }}
|
||||
{{- if not .Values.tls.client.enabled }}
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.livenessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.service.tlsClientPort }} | grep imok']
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.livenessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.tlsContainerPort }} | grep imok']
|
||||
{{- else }}
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.livenessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.service.tlsClientPort }} -cert {{ .Values.service.tls.client_cert_pem_path }} -key {{ .Values.service.tls.client_key_pem_path }} | grep imok']
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.livenessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.tlsContainerPort }} -cert {{ .Values.service.tls.client_cert_pem_path }} -key {{ .Values.service.tls.client_key_pem_path }} | grep imok']
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
@@ -440,12 +440,12 @@ spec:
|
||||
readinessProbe:
|
||||
exec:
|
||||
{{- if not .Values.service.disableBaseClientPort }}
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.readinessProbe.probeCommandTimeout }} nc -w {{ .Values.readinessProbe.probeCommandTimeout }} localhost {{ .Values.service.port }} | grep imok']
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.readinessProbe.probeCommandTimeout }} nc -w {{ .Values.readinessProbe.probeCommandTimeout }} localhost {{ .Values.containerPort }} | grep imok']
|
||||
{{- else }}
|
||||
{{- if not .Values.tls.client.enabled }}
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.readinessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.service.tlsClientPort }} | grep imok']
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.readinessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.tlsContainerPort }} | grep imok']
|
||||
{{- else }}
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.readinessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.service.tlsClientPort }} -cert {{ .Values.service.tls.client_cert_pem_path }} -key {{ .Values.service.tls.client_key_pem_path }} | grep imok']
|
||||
command: ['/bin/bash', '-c', 'echo "ruok" | timeout {{ .Values.readinessProbe.probeCommandTimeout }} openssl s_client -quiet -crlf -connect localhost:{{ .Values.tlsContainerPort }} -cert {{ .Values.service.tls.client_cert_pem_path }} -key {{ .Values.service.tls.client_key_pem_path }} | grep imok']
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
ports:
|
||||
{{ if not .Values.service.disableBaseClientPort }}
|
||||
- name: tcp-client
|
||||
port: 2181
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: client
|
||||
{{ end }}
|
||||
{{ if .Values.tls.client.enabled }}
|
||||
@@ -33,10 +33,10 @@ spec:
|
||||
targetPort: client-tls
|
||||
{{ end }}
|
||||
- name: follower
|
||||
port: 2888
|
||||
port: {{ .Values.service.followerPort }}
|
||||
targetPort: follower
|
||||
- name: tcp-election
|
||||
port: 3888
|
||||
port: {{ .Values.service.electionPort }}
|
||||
targetPort: election
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: zookeeper
|
||||
|
||||
@@ -25,7 +25,7 @@ spec:
|
||||
ports:
|
||||
{{ if not .Values.service.disableBaseClientPort }}
|
||||
- name: tcp-client
|
||||
port: 2181
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: client
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.client)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.client }}
|
||||
@@ -44,10 +44,10 @@ spec:
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
- name: follower
|
||||
port: 2888
|
||||
port: {{ .Values.service.followerPort }}
|
||||
targetPort: follower
|
||||
- name: tcp-election
|
||||
port: 3888
|
||||
port: {{ .Values.service.electionPort }}
|
||||
targetPort: election
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: zookeeper
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
|
||||
##
|
||||
|
||||
## @param global.imageRegistry Global Docker image registry
|
||||
## @param global.imagePullSecrets Global Docker registry secret names as an array
|
||||
@@ -17,6 +18,7 @@ global:
|
||||
storageClass: ""
|
||||
|
||||
## @section Common parameters
|
||||
##
|
||||
|
||||
## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
|
||||
##
|
||||
@@ -53,6 +55,7 @@ diagnosticMode:
|
||||
- infinity
|
||||
|
||||
## @section Zookeeper chart parameters
|
||||
##
|
||||
|
||||
## Bitnami Zookeeper image version
|
||||
## ref: https://hub.docker.com/r/bitnami/zookeeper/tags/
|
||||
@@ -173,6 +176,7 @@ namespaceOverride: ""
|
||||
hostAliases: []
|
||||
|
||||
## @section Statefulset parameters
|
||||
##
|
||||
|
||||
## Extra volumes and extra volume mounts allows you to mount other volumes
|
||||
## Example Use Cases: mount certificates to enable tls
|
||||
@@ -197,6 +201,7 @@ extraVolumes: []
|
||||
## - name: zookeeper-truststore
|
||||
## mountPath: /certs/truststore
|
||||
## readOnly: true
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## @param updateStrategy StatefulSet controller supports automated updates. There are two valid update strategies: `RollingUpdate` and `OnDelete`
|
||||
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
@@ -220,6 +225,22 @@ podManagementPolicy: Parallel
|
||||
## @param replicaCount Number of ZooKeeper nodes
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## @param containerPort ZooKeeper port
|
||||
##
|
||||
containerPort: 2181
|
||||
|
||||
## @param tlsContainerPort ZooKeeper TLS port
|
||||
##
|
||||
tlsContainerPort: 3181
|
||||
|
||||
## @param followerContainerPort ZooKeeper follower port
|
||||
##
|
||||
followerContainerPort: 2888
|
||||
## @param electionContainerPort ZooKeeper election port
|
||||
##
|
||||
electionContainerPort: 3888
|
||||
|
||||
## @param minServerId Minimal SERVER_ID value, nodes increment their IDs respectively
|
||||
## Servers increment their ID starting at this minimal value.
|
||||
## E.g., with `minServerId=10` and 3 replicas, server IDs will be 10, 11, 12 for z-0, z-1 and z-2 respectively.
|
||||
@@ -357,6 +378,7 @@ customLivenessProbe: {}
|
||||
customReadinessProbe: {}
|
||||
|
||||
## @section Traffic Exposure parameters
|
||||
##
|
||||
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
@@ -411,9 +433,11 @@ serviceAccount:
|
||||
create: false
|
||||
## @param serviceAccount.name The name of the ServiceAccount to use.
|
||||
## If not set and create is true, a name is generated using the common.names.fullname template
|
||||
##
|
||||
name: ""
|
||||
## @param serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the serviceAccount created
|
||||
## Can be set to false if pods using this serviceAccount do not need to use K8s API
|
||||
##
|
||||
automountServiceAccountToken: true
|
||||
## Network policies
|
||||
## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
|
||||
@@ -429,6 +453,7 @@ networkPolicy:
|
||||
allowExternal: true
|
||||
|
||||
## @section Persistence parameters
|
||||
##
|
||||
|
||||
## Zookeeper data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
@@ -486,6 +511,7 @@ persistence:
|
||||
selector: {}
|
||||
|
||||
## @section Volume Permissions parameters
|
||||
##
|
||||
|
||||
## Init containers parameters:
|
||||
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
|
||||
@@ -518,6 +544,7 @@ volumePermissions:
|
||||
resources: {}
|
||||
|
||||
## @section Metrics parameters
|
||||
##
|
||||
|
||||
## Zookeeper Prometheus Exporter configuration
|
||||
##
|
||||
@@ -540,9 +567,9 @@ metrics:
|
||||
## @param metrics.service.annotations [object] Annotations for the Zookeeper to auto-discover the metrics endpoint
|
||||
##
|
||||
annotations:
|
||||
prometheus.io/scrape: 'true'
|
||||
prometheus.io/port: '{{ .Values.metrics.service.port }}'
|
||||
prometheus.io/path: '/metrics'
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "{{ .Values.metrics.service.port }}"
|
||||
prometheus.io/path: "/metrics"
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
serviceMonitor:
|
||||
@@ -606,6 +633,7 @@ metrics:
|
||||
rules: []
|
||||
|
||||
## @section TLS/SSL parameters
|
||||
##
|
||||
|
||||
## Enable SSL/TLS encryption
|
||||
##
|
||||
@@ -673,9 +701,11 @@ tls:
|
||||
## limits:
|
||||
## cpu: 100m
|
||||
## memory: 128Mi
|
||||
##
|
||||
limits: {}
|
||||
## Examples:
|
||||
## requests:
|
||||
## cpu: 100m
|
||||
## memory: 128Mi
|
||||
##
|
||||
requests: {}
|
||||
|
||||
Reference in New Issue
Block a user