-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
ac8136c
commit fc80f27
Showing
20 changed files
with
390 additions
and
131 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
infrastructure/helm-chart/charts/prerequisites/charts/kafka/BUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
load("//tools/build:helm.bzl", "helm_ruleset_version") | ||
|
||
helm_ruleset_version( | ||
version = "3.3.1", | ||
version = "2.7.0", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
...ucture/helm-chart/charts/prerequisites/charts/kafka/charts/kafka/templates/configmap.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
infrastructure/helm-chart/charts/prerequisites/charts/kafka/charts/zookeeper/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v2 | ||
appVersion: "1.0" | ||
description: A Helm chart for Confluent Zookeeper on Kubernetes | ||
name: zookeeper | ||
version: 1.0 |
48 changes: 48 additions & 0 deletions
48
...ture/helm-chart/charts/prerequisites/charts/kafka/charts/zookeeper/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "cp-zookeeper.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "cp-zookeeper.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "cp-zookeeper.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a server list string based on fullname, namespace, # of servers | ||
in a format like "zkhost1:port:port;zkhost2:port:port" | ||
*/}} | ||
{{- define "cp-zookeeper.serverlist" -}} | ||
{{- $namespace := .Release.Namespace }} | ||
{{- $name := include "cp-zookeeper.fullname" . -}} | ||
{{- $serverPort := .Values.serverPort -}} | ||
{{- $leaderElectionPort := .Values.leaderElectionPort -}} | ||
{{- $zk := dict "servers" (list) -}} | ||
{{- range $idx, $v := until (int .Values.servers) }} | ||
{{- $noop := printf "%s-%d.%s-headless.%s:%d:%d" $name $idx $name $namespace (int $serverPort) (int $leaderElectionPort) | append $zk.servers | set $zk "servers" -}} | ||
{{- end }} | ||
{{- printf "%s" (join ";" $zk.servers) | quote -}} | ||
{{- end -}} |
19 changes: 19 additions & 0 deletions
19
...-chart/charts/prerequisites/charts/kafka/charts/zookeeper/templates/headless-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "cp-zookeeper.fullname" . }}-headless | ||
labels: | ||
app: {{ template "cp-zookeeper.name" . }} | ||
chart: {{ template "cp-zookeeper.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
ports: | ||
- port: {{ .Values.serverPort }} | ||
name: server | ||
- port: {{ .Values.leaderElectionPort }} | ||
name: leader-election | ||
clusterIP: None | ||
selector: | ||
app: {{ template "cp-zookeeper.name" . }} | ||
release: {{ .Release.Name }} |
19 changes: 19 additions & 0 deletions
19
...art/charts/prerequisites/charts/kafka/charts/zookeeper/templates/poddisruptionbudget.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: policy/v1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: {{ template "cp-zookeeper.fullname" . }}-pdb | ||
labels: | ||
app: {{ template "cp-zookeeper.name" . }} | ||
chart: {{ template "cp-zookeeper.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ template "cp-zookeeper.name" . }} | ||
release: {{ .Release.Name }} | ||
{{- if .Values.minAvailable }} | ||
minAvailable: {{ .Values.minAvailable }} | ||
{{- else }} | ||
maxUnavailable: 1 | ||
{{- end }} |
17 changes: 17 additions & 0 deletions
17
...ture/helm-chart/charts/prerequisites/charts/kafka/charts/zookeeper/templates/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "cp-zookeeper.fullname" . }} | ||
labels: | ||
app: {{ template "cp-zookeeper.name" . }} | ||
chart: {{ template "cp-zookeeper.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
type: {{ .Values.serviceType }} | ||
ports: | ||
- port: {{ .Values.clientPort }} | ||
name: client | ||
selector: | ||
app: {{ template "cp-zookeeper.name" . }} | ||
release: {{ .Release.Name }} |
Oops, something went wrong.