Use .Release.Namespace by default to handle namespaces (#80)
It remains possible to override the current release namespace by setting the `namespace` value though this may lead to having the helm metadata and the pulsar components in different namespaces Fixes #66 ### Motivation Trying to deploy the chart in a namespace using the usual helm pattern fails for example ``` kubectl create ns pulsartest helm upgrade --install pulsar -n pulsartest apache/pulsar Error: namespaces "pulsar" not found ``` fixing that while keeping the helm metadata and the deployed objects in the same namespace requires declaring the namespace twice ``` kubectl create ns pulsartest helm upgrade --install pulsar -n pulsartest apache/pulsar --set namespace=pulsartest Error: namespaces "pulsar" not found ``` This is needlessly confusing for newcomers who follow the helm documentation and is contrary to helm best practices. ### Modifications I changed the chart to use the context namespace `.Release.Namespace` by default while preserving the ability to override that by explicitly providing a namespace on the commande line, with the this modification both examples behave as expected ### Verifying this change - [x] Make sure that the change passes the CI checks.
This commit is contained in:
parent
eb63a19964
commit
6c9856a1af
@ -78,12 +78,12 @@ function ci::install_pulsar_chart() {
|
||||
${KUBECTL} create namespace ${NAMESPACE}
|
||||
echo ${CHARTS_HOME}/scripts/pulsar/prepare_helm_release.sh -k ${CLUSTER} -n ${NAMESPACE} ${extra_opts}
|
||||
${CHARTS_HOME}/scripts/pulsar/prepare_helm_release.sh -k ${CLUSTER} -n ${NAMESPACE} ${extra_opts}
|
||||
${CHARTS_HOME}/scripts/pulsar/upload_tls.sh -k ${CLUSTER} -d ${PULSAR_HOME}/.ci/tls
|
||||
${CHARTS_HOME}/scripts/pulsar/upload_tls.sh -k ${CLUSTER} -n ${NAMESPACE} -d ${PULSAR_HOME}/.ci/tls
|
||||
sleep 10
|
||||
|
||||
echo ${HELM} install --set initialize=true --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/charts/pulsar
|
||||
${HELM} template --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/charts/pulsar
|
||||
${HELM} install --set initialize=true --values ${value_file} ${CLUSTER} ${CHARTS_HOME}/charts/pulsar
|
||||
${HELM} install --set initialize=true --values ${value_file} --namespace=${NAMESPACE} ${CLUSTER} ${CHARTS_HOME}/charts/pulsar
|
||||
|
||||
echo "wait until broker is alive"
|
||||
WC=$(${KUBECTL} get pods -n ${NAMESPACE} --field-selector=status.phase=Running | grep ${CLUSTER}-broker | wc -l)
|
||||
|
||||
@ -21,7 +21,7 @@ apiVersion: v1
|
||||
appVersion: "2.6.2"
|
||||
description: Apache Pulsar Helm chart for Kubernetes
|
||||
name: pulsar
|
||||
version: 2.6.2-1
|
||||
version: 2.6.2-2
|
||||
home: https://pulsar.apache.org
|
||||
sources:
|
||||
- https://github.com/apache/pulsar
|
||||
|
||||
@ -9,7 +9,7 @@ Define the pulsar autorecovery service
|
||||
Define the autorecovery hostname
|
||||
*/}}
|
||||
{{- define "pulsar.autorecovery.hostname" -}}
|
||||
${HOSTNAME}.{{ template "pulsar.autorecovery.service" . }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
${HOSTNAME}.{{ template "pulsar.autorecovery.service" . }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@ -9,7 +9,7 @@ Define the pulsar bookkeeper service
|
||||
Define the bookkeeper hostname
|
||||
*/}}
|
||||
{{- define "pulsar.bookkeeper.hostname" -}}
|
||||
${HOSTNAME}.{{ template "pulsar.bookkeeper.service" . }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
${HOSTNAME}.{{ template "pulsar.bookkeeper.service" . }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ Define the pulsar brroker service
|
||||
Define the hostname
|
||||
*/}}
|
||||
{{- define "pulsar.broker.hostname" -}}
|
||||
${HOSTNAME}.{{ template "pulsar.broker.service" . }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
${HOSTNAME}.{{ template "pulsar.broker.service" . }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@ -14,6 +14,13 @@ Expand the name of the chart.
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Expand the namespace of the chart.
|
||||
*/}}
|
||||
{{- define "pulsar.namespace" -}}
|
||||
{{- default .Release.Namespace .Values.namespace -}}
|
||||
{{- 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).
|
||||
|
||||
@ -9,7 +9,7 @@ Define the pulsar toolset service
|
||||
Define the toolset hostname
|
||||
*/}}
|
||||
{{- define "pulsar.toolset.hostname" -}}
|
||||
${HOSTNAME}.{{ template "pulsar.toolset.service" . }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
${HOSTNAME}.{{ template "pulsar.toolset.service" . }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@ -26,7 +26,7 @@ Define the pulsar zookeeper
|
||||
Define the zookeeper hostname
|
||||
*/}}
|
||||
{{- define "pulsar.zookeeper.hostname" -}}
|
||||
${HOSTNAME}.{{ template "pulsar.zookeeper.service" . }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
${HOSTNAME}.{{ template "pulsar.zookeeper.service" . }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.autorecovery.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.autorecovery.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.autorecovery.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-init"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: "{{ .Values.bookkeeper.component }}-init"
|
||||
@ -41,7 +41,7 @@ spec:
|
||||
echo "user provided zookeepers {{ $zk }} are unreachable... check in 3 seconds ..." && sleep 3;
|
||||
done;
|
||||
{{ else }}
|
||||
until nslookup {{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ add (.Values.zookeeper.replicaCount | int) -1 }}.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ .Values.namespace }}; do
|
||||
until nslookup {{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ add (.Values.zookeeper.replicaCount | int) -1 }}.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ template "pulsar.namespace" . }}; do
|
||||
sleep 3;
|
||||
done;
|
||||
{{- end}}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.bookkeeper.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.bookkeeper.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.bookkeeper.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.bookkeeper.component }}
|
||||
|
||||
@ -24,7 +24,7 @@ apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.journal.name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.bookkeeper.component }}
|
||||
@ -40,7 +40,7 @@ apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.bookkeeper.component }}
|
||||
|
||||
@ -32,7 +32,7 @@ roleRef:
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}-acct"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.broker.component }}
|
||||
@ -61,7 +61,7 @@ data:
|
||||
PF_functionRuntimeFactoryConfigs_pulsarDockerImageName: "{{ .Values.images.functions.repository }}:{{ .Values.images.functions.tag }}"
|
||||
PF_functionRuntimeFactoryConfigs_submittingInsidePod: "true"
|
||||
PF_functionRuntimeFactoryConfigs_installUserCodeDependencies: "true"
|
||||
PF_functionRuntimeFactoryConfigs_jobNamespace: {{ .Values.namespace }}
|
||||
PF_functionRuntimeFactoryConfigs_jobNamespace: {{ template "pulsar.namespace" . }}
|
||||
PF_functionRuntimeFactoryConfigs_expectedMetricsCollectionInterval: "30"
|
||||
{{- if not (and .Values.tls.enabled .Values.tls.broker.enabled) }}
|
||||
PF_functionRuntimeFactoryConfigs_pulsarAdminUrl: "http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.http }}/"
|
||||
@ -72,12 +72,12 @@ data:
|
||||
PF_functionRuntimeFactoryConfigs_pulsarServiceUrl: "pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.pulsarssl }}/"
|
||||
{{- end }}
|
||||
PF_functionRuntimeFactoryConfigs_changeConfigMap: "{{ template "pulsar.fullname" . }}-{{ .Values.functions.component }}-config"
|
||||
PF_functionRuntimeFactoryConfigs_changeConfigMapNamespace: {{ .Values.namespace }}
|
||||
PF_functionRuntimeFactoryConfigs_changeConfigMapNamespace: {{ template "pulsar.namespace" . }}
|
||||
# support version < 2.5.0
|
||||
PF_kubernetesContainerFactory_pulsarDockerImageName: "{{ .Values.images.functions.repository }}:{{ .Values.images.functions.tag }}"
|
||||
PF_kubernetesContainerFactory_submittingInsidePod: "true"
|
||||
PF_kubernetesContainerFactory_installUserCodeDependencies: "true"
|
||||
PF_kubernetesContainerFactory_jobNamespace: {{ .Values.namespace }}
|
||||
PF_kubernetesContainerFactory_jobNamespace: {{ template "pulsar.namespace" . }}
|
||||
PF_kubernetesContainerFactory_expectedMetricsCollectionInterval: "30"
|
||||
{{- if not (and .Values.tls.enabled .Values.tls.broker.enabled) }}
|
||||
PF_kubernetesContainerFactory_pulsarAdminUrl: "http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.http }}/"
|
||||
@ -88,7 +88,7 @@ data:
|
||||
PF_kubernetesContainerFactory_pulsarServiceUrl: "pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.pulsarssl }}/"
|
||||
{{- end }}
|
||||
PF_kubernetesContainerFactory_changeConfigMap: "{{ template "pulsar.fullname" . }}-{{ .Values.functions.component }}-config"
|
||||
PF_kubernetesContainerFactory_changeConfigMapNamespace: {{ .Values.namespace }}
|
||||
PF_kubernetesContainerFactory_changeConfigMapNamespace: {{ template "pulsar.namespace" . }}
|
||||
{{- end }}
|
||||
|
||||
# prometheus needs to access /metrics endpoint
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.broker.component }}
|
||||
|
||||
@ -42,7 +42,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.functions.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
@ -56,5 +56,5 @@ roleRef:
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.functions.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
{{- end }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}-acct"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.broker.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.broker.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.broker.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.dashboard.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.dashboard.component }}
|
||||
|
||||
@ -30,7 +30,7 @@ metadata:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.dashboard.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
{{- if .Values.dashboard.ingress.tls.enabled }}
|
||||
tls:
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.dashboard.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.dashboard.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.functions.component }}-config"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.functions.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}-secret"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.grafana.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.grafana.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.grafana.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
app: {{ template "pulsar.name" . }}
|
||||
chart: {{ template "pulsar.chart" . }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.grafana.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-keytool-configmap"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: keytool
|
||||
|
||||
@ -21,5 +21,5 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ .Values.namespace }}
|
||||
name: {{ template "pulsar.namespace" . }}
|
||||
{{- end }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.prometheus.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.prometheus.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}-{{ .Values.prometheus.volumes.data.name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
resources:
|
||||
requests:
|
||||
|
||||
@ -40,7 +40,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
@ -54,6 +54,6 @@ roleRef:
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.prometheus.component }}
|
||||
|
||||
@ -24,7 +24,7 @@ apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.prometheus.component }}-{{ .Values.prometheus.volumes.data.name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.prometheus.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.proxy.component }}
|
||||
|
||||
@ -29,7 +29,7 @@ metadata:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
{{- if .Values.proxy.ingress.tls.enabled }}
|
||||
tls:
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.proxy.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.proxy.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.proxy.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_metadata.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.pulsar_metadata.component }}
|
||||
@ -54,7 +54,7 @@ spec:
|
||||
echo "user provided zookeepers {{ $zk }} are unreachable... check in 3 seconds ..." && sleep 3;
|
||||
done;
|
||||
{{ else }}
|
||||
until nslookup {{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ add (.Values.zookeeper.replicaCount | int) -1 }}.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ .Values.namespace }}; do
|
||||
until nslookup {{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ add (.Values.zookeeper.replicaCount | int) -1 }}.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ template "pulsar.namespace" . }}; do
|
||||
sleep 3;
|
||||
done;
|
||||
{{- end}}
|
||||
@ -97,10 +97,10 @@ spec:
|
||||
{{- if not .Values.pulsar_metadata.configurationStore }}
|
||||
--configuration-store {{ template "pulsar.zookeeper.connect" . }}{{ .Values.metadataPrefix }} \
|
||||
{{- end }}
|
||||
--web-service-url http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.http }}/ \
|
||||
--web-service-url-tls https://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.https }}/ \
|
||||
--broker-service-url pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsar }}/ \
|
||||
--broker-service-url-tls pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsarssl }}/ || true;
|
||||
--web-service-url http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.http }}/ \
|
||||
--web-service-url-tls https://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.https }}/ \
|
||||
--broker-service-url pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsar }}/ \
|
||||
--broker-service-url-tls pulsar+ssl://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}:{{ .Values.broker.ports.pulsarssl }}/ || true;
|
||||
volumeMounts:
|
||||
{{- include "pulsar.toolset.certs.volumeMounts" . | nindent 8 }}
|
||||
volumes:
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}-secret"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
app: {{ template "pulsar.name" . }}
|
||||
chart: {{ template "pulsar.chart" . }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.pulsar_manager.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.pulsar_manager.component }}
|
||||
|
||||
@ -29,7 +29,7 @@ metadata:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
{{- if .Values.pulsar_manager.ingress.tls.enabled }}
|
||||
tls:
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.pulsar_manager.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.certs.internal_issuer.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
selfSigned: {}
|
||||
---
|
||||
@ -32,10 +32,10 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-ca"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
secretName: "{{ .Release.Name }}-ca-tls"
|
||||
commonName: "{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
commonName: "{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
usages:
|
||||
- server auth
|
||||
- client auth
|
||||
@ -54,7 +54,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.certs.internal_issuer.component }}-ca-issuer"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
ca:
|
||||
secretName: "{{ .Release.Name }}-ca-tls"
|
||||
|
||||
@ -25,7 +25,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.proxy.cert_name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
# Secret names are always required.
|
||||
secretName: "{{ .Release.Name }}-{{ .Values.tls.proxy.cert_name }}"
|
||||
@ -35,7 +35,7 @@ spec:
|
||||
{{ toYaml .Values.tls.common.organization | indent 2 }}
|
||||
# The use of the common name field has been deprecated since 2000 and is
|
||||
# discouraged from being used.
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
isCA: false
|
||||
keySize: {{ .Values.tls.common.keySize }}
|
||||
keyAlgorithm: {{ .Values.tls.common.keyAlgorithm }}
|
||||
@ -45,7 +45,7 @@ spec:
|
||||
- client auth
|
||||
# At least one of a DNS Name, USI SAN, or IP address is required.
|
||||
dnsNames:
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
|
||||
# Issuer references are always required.
|
||||
issuerRef:
|
||||
@ -64,7 +64,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.broker.cert_name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
# Secret names are always required.
|
||||
secretName: "{{ .Release.Name }}-{{ .Values.tls.broker.cert_name }}"
|
||||
@ -74,7 +74,7 @@ spec:
|
||||
{{ toYaml .Values.tls.common.organization | indent 2 }}
|
||||
# The use of the common name field has been deprecated since 2000 and is
|
||||
# discouraged from being used.
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
isCA: false
|
||||
keySize: {{ .Values.tls.common.keySize }}
|
||||
keyAlgorithm: {{ .Values.tls.common.keyAlgorithm }}
|
||||
@ -84,7 +84,7 @@ spec:
|
||||
- client auth
|
||||
# At least one of a DNS Name, USI SAN, or IP address is required.
|
||||
dnsNames:
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
|
||||
# Issuer references are always required.
|
||||
issuerRef:
|
||||
@ -103,7 +103,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.bookie.cert_name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
# Secret names are always required.
|
||||
secretName: "{{ .Release.Name }}-{{ .Values.tls.bookie.cert_name }}"
|
||||
@ -113,7 +113,7 @@ spec:
|
||||
{{ toYaml .Values.tls.common.organization | indent 2 }}
|
||||
# The use of the common name field has been deprecated since 2000 and is
|
||||
# discouraged from being used.
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
isCA: false
|
||||
keySize: {{ .Values.tls.common.keySize }}
|
||||
keyAlgorithm: {{ .Values.tls.common.keyAlgorithm }}
|
||||
@ -122,7 +122,7 @@ spec:
|
||||
- server auth
|
||||
- client auth
|
||||
dnsNames:
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
|
||||
# Issuer references are always required.
|
||||
issuerRef:
|
||||
@ -141,7 +141,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.autorecovery.cert_name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
# Secret names are always required.
|
||||
secretName: "{{ .Release.Name }}-{{ .Values.tls.autorecovery.cert_name }}"
|
||||
@ -151,7 +151,7 @@ spec:
|
||||
{{ toYaml .Values.tls.common.organization | indent 2 }}
|
||||
# The use of the common name field has been deprecated since 2000 and is
|
||||
# discouraged from being used.
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
isCA: false
|
||||
keySize: {{ .Values.tls.common.keySize }}
|
||||
keyAlgorithm: {{ .Values.tls.common.keyAlgorithm }}
|
||||
@ -160,7 +160,7 @@ spec:
|
||||
- server auth
|
||||
- client auth
|
||||
dnsNames:
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}"
|
||||
# Issuer references are always required.
|
||||
issuerRef:
|
||||
@ -176,7 +176,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.toolset.cert_name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
# Secret names are always required.
|
||||
secretName: "{{ .Release.Name }}-{{ .Values.tls.toolset.cert_name }}"
|
||||
@ -186,7 +186,7 @@ spec:
|
||||
{{ toYaml .Values.tls.common.organization | indent 2 }}
|
||||
# The use of the common name field has been deprecated since 2000 and is
|
||||
# discouraged from being used.
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
isCA: false
|
||||
keySize: {{ .Values.tls.common.keySize }}
|
||||
keyAlgorithm: {{ .Values.tls.common.keyAlgorithm }}
|
||||
@ -195,7 +195,7 @@ spec:
|
||||
- server auth
|
||||
- client auth
|
||||
dnsNames:
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}"
|
||||
# Issuer references are always required.
|
||||
issuerRef:
|
||||
@ -211,7 +211,7 @@ apiVersion: cert-manager.io/v1alpha2
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.tls.zookeeper.cert_name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
spec:
|
||||
# Secret names are always required.
|
||||
secretName: "{{ .Release.Name }}-{{ .Values.tls.zookeeper.cert_name }}"
|
||||
@ -221,7 +221,7 @@ spec:
|
||||
{{ toYaml .Values.tls.common.organization | indent 2 }}
|
||||
# The use of the common name field has been deprecated since 2000 and is
|
||||
# discouraged from being used.
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
commonName: "*.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
isCA: false
|
||||
keySize: {{ .Values.tls.common.keySize }}
|
||||
keyAlgorithm: {{ .Values.tls.common.keyAlgorithm }}
|
||||
@ -230,7 +230,7 @@ spec:
|
||||
- server auth
|
||||
- client auth
|
||||
dnsNames:
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "*.{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}.{{ template "pulsar.namespace" . }}.svc.{{ .Values.clusterDomain }}"
|
||||
- "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
|
||||
# Issuer references are always required.
|
||||
issuerRef:
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.toolset.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.toolset.component }}
|
||||
|
||||
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.toolset.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.toolset.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.zookeeper.component }}
|
||||
|
||||
@ -24,7 +24,7 @@ apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.zookeeper.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.zookeeper.component }}
|
||||
|
||||
@ -23,7 +23,7 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.zookeeper.component }}
|
||||
|
||||
@ -27,7 +27,7 @@ apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}-{{ .Values.zookeeper.volumes.data.name }}"
|
||||
namespace: {{ .Values.namespace }}
|
||||
namespace: {{ template "pulsar.namespace" . }}
|
||||
labels:
|
||||
{{- include "pulsar.standardLabels" . | nindent 4 }}
|
||||
component: {{ .Values.zookeeper.component }}
|
||||
|
||||
@ -17,13 +17,14 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
|
||||
###
|
||||
### K8S Settings
|
||||
###
|
||||
|
||||
## Namespace to deploy pulsar
|
||||
namespace: pulsar
|
||||
### Namespace to deploy pulsar
|
||||
# The namespace to use to deploy the pulsar components, if left empty
|
||||
# will default to .Release.Namespace (aka helm --namespace).
|
||||
namespace: ""
|
||||
namespaceCreate: false
|
||||
|
||||
## clusterDomain as defined for your k8s cluster
|
||||
|
||||
@ -96,10 +96,12 @@ release=${release:-pulsar-dev}
|
||||
function pulsar::jwt::get_secret() {
|
||||
local type=$1
|
||||
local tmpfile=$2
|
||||
|
||||
local secret_name=$3
|
||||
echo ${secret_name}
|
||||
if [[ "${local}" == "true" ]]; then
|
||||
cp ${type} ${tmpfile}
|
||||
else
|
||||
echo "kubectl get -n ${namespace} secrets ${secret_name} -o jsonpath="{.data.${type}}" | base64 --decode > ${tmpfile}"
|
||||
kubectl get -n ${namespace} secrets ${secret_name} -o jsonpath="{.data['${type}']}" | base64 --decode > ${tmpfile}
|
||||
fi
|
||||
}
|
||||
@ -112,10 +114,11 @@ function pulsar::jwt::generate_symmetric_token() {
|
||||
trap "test -f $tmpfile && rm $tmpfile" RETURN
|
||||
tokentmpfile=$(mktemp)
|
||||
trap "test -f $tokentmpfile && rm $tokentmpfile" RETURN
|
||||
pulsar::jwt::get_secret SECRETKEY ${tmpfile}
|
||||
pulsar::jwt::get_secret SECRETKEY ${tmpfile} ${secret_name}
|
||||
${PULSARCTL_BIN} token create -a HS256 --secret-key-file ${tmpfile} --subject ${role} 2&> ${tokentmpfile}
|
||||
newtokentmpfile=$(mktemp)
|
||||
tr -d '\n' < ${tokentmpfile} > ${newtokentmpfile}
|
||||
echo "kubectl create secret generic ${token_name} -n ${namespace} --from-file="TOKEN=${newtokentmpfile}" --from-literal="TYPE=symmetric" ${local:+ -o yaml --dry-run=client}"
|
||||
kubectl create secret generic ${token_name} -n ${namespace} --from-file="TOKEN=${newtokentmpfile}" --from-literal="TYPE=symmetric" ${local:+ -o yaml --dry-run=client}
|
||||
}
|
||||
|
||||
@ -127,7 +130,7 @@ function pulsar::jwt::generate_asymmetric_token() {
|
||||
trap "test -f $privatekeytmpfile && rm $privatekeytmpfile" RETURN
|
||||
tokentmpfile=$(mktemp)
|
||||
trap "test -f $tokentmpfile && rm $tokentmpfile" RETURN
|
||||
pulsar::jwt::get_secret SECRETKEY ${tmpfile}
|
||||
pulsar::jwt::get_secret PRIVATEKEY ${privatekeytmpfile} ${secret_name}
|
||||
${PULSARCTL_BIN} token create -a RS256 --private-key-file ${privatekeytmpfile} --subject ${role} 2&> ${tokentmpfile}
|
||||
newtokentmpfile=$(mktemp)
|
||||
tr -d '\n' < ${tokentmpfile} > ${newtokentmpfile}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user