Comments (6)
As a comment, for GCS it did not work just adding
broker: configData: managedLedgerOffloadDriver: google-cloud-storage gcsManagedLedgerOffloadBucket: pulsar-tiered gcsManagedLedgerOffloadRegion: us-east1 managedLedgerOffloadAutoTriggerSizeThresholdBytes: "262144000"
because it was lacking the service account key file, which needs to be mounted. I added by hand in the statefulset of the broker the following volumes and volumeMounts and worked adding a field:
gcsManagedLedgerOffloadServiceAccountKeyFile: "/pulsar/gcp-service-account/{{ .Values.broker.configData.gcsServiceAccountJsonFile }}"
+++ b/charts/pulsar/templates/broker-statefulset.yaml
@@ -225,7 +225,19 @@ spec:
{{- end }}
{{- end }}
{{- include "pulsar.broker.certs.volumeMounts" . | nindent 10 }}
+ {{- if .Values.broker.configData.managedLedgerOffloadDriver }}
+ {{- if eq .Values.broker.configData.managedLedgerOffloadDriver "google-cloud-storage" }}
+ - name: gcp-service-account
+ readOnly: true
+ mountPath: /pulsar/gcp-service-account
+ {{- end }}
+ {{- end }}
volumes:
+ {{- if eq .Values.broker.configData.managedLedgerOffloadDriver "google-cloud-storage" }}
+ - name: gcp-service-account
+ secret:
+ secretName: {{ .Values.broker.configData.gcsServiceAccountSecret }}
+ {{- end }}
{{- if .Values.auth.authentication.enabled }}
{{- if eq .Values.auth.authentication.provider "jwt" }}
- name: token-keys
from pulsar-helm-chart.
As a comment, for GCS it did not work just adding
broker: configData: managedLedgerOffloadDriver: google-cloud-storage gcsManagedLedgerOffloadBucket: pulsar-tiered gcsManagedLedgerOffloadRegion: us-east1 managedLedgerOffloadAutoTriggerSizeThresholdBytes: "262144000"
because it was lacking the service account key file, which needs to be mounted. I added by hand in the statefulset of the broker the following volumes and volumeMounts and worked adding a field:
gcsManagedLedgerOffloadServiceAccountKeyFile: "/pulsar/gcp-service-account/{{ .Values.broker.configData.gcsServiceAccountJsonFile }}"
+++ b/charts/pulsar/templates/broker-statefulset.yaml @@ -225,7 +225,19 @@ spec: {{- end }} {{- end }} {{- include "pulsar.broker.certs.volumeMounts" . | nindent 10 }} + {{- if .Values.broker.configData.managedLedgerOffloadDriver }} + {{- if eq .Values.broker.configData.managedLedgerOffloadDriver "google-cloud-storage" }} + - name: gcp-service-account + readOnly: true + mountPath: /pulsar/gcp-service-account + {{- end }} + {{- end }} volumes: + {{- if eq .Values.broker.configData.managedLedgerOffloadDriver "google-cloud-storage" }} + - name: gcp-service-account + secret: + secretName: {{ .Values.broker.configData.gcsServiceAccountSecret }} + {{- end }} {{- if .Values.auth.authentication.enabled }} {{- if eq .Values.auth.authentication.provider "jwt" }} - name: token-keys
is it possible to know how you applied the new b/charts/pulsar/templates/broker-statefulset.yaml? did you use helm upgrade?
from pulsar-helm-chart.
Nono, when you change the charts you cannot use the same chart, so I repackaged locally and applied those! Not as fancy haha Ideally these should go into the official charts! If I find time I will submit a PR. I think is following this path but adding AWS and Azure? @sijie ?
from pulsar-helm-chart.
Nono, when you change the charts you cannot use the same chart, so I repackaged locally and applied those! Not as fancy haha Ideally these should go into the official charts! If I find time I will submit a PR. I think is following this path but adding AWS and Azure? @sijie ?
Thanks, that's what i thought too.
as far as i know, tiered storage support for azure will be available in pulsar 2.7.0 so i guess you could first submit a PR for gcp and aws? although aws works fine without other configurations. Cheers
from pulsar-helm-chart.
i am trying to get GCS tiered storage to work with the pulsar helm charts 2.7.1. the above pointers are too difficult for me. can you help me answer a couple of questions i have
- where to put the keyfile so it get's mounted properly?
- do i need to set broker.configData.gcsServiceAccountSecret and broker.configData.gcsServiceAccountJsonFile in values.yaml as well?
- how to package and install the helm with these changes?
i think i got the last question answered. but my statefulset failes with the following error
create Pod production-pulsar-broker-0 in StatefulSet production-pulsar-broker failed error: Pod "production-pulsar-broker-0" is invalid: [spec.volumes[0].secret.secretName: Required value, spec.containers[0].volumeMounts[0].name: Not found: "gcp-service-account"]
thanks in advance for the help!
from pulsar-helm-chart.
well, i got it to work. the broker.configData in values.yaml part looks like this
# tiered storage to gcs
managedLedgerOffloadDriver: google-cloud-storage
gcsManagedLedgerOffloadBucket: pulsar
gcsManagedLedgerOffloadRegion: europe-west1
managedLedgerOffloadAutoTriggerSizeThresholdBytes: "262144000"
gcsServiceAccountSecret: "pulsar-broker-service-account"
gcsServiceAccountJsonFile: "serviceaccount.json"
gcsManagedLedgerOffloadServiceAccountKeyFile: "/pulsar/gcp-service-account/serviceaccount.json"
for this to work with the diff above you need create the service account json as per the documentation. add the resulting json file with the credentials (serviceaccount.json) as a secret to your k8s cluster (make sure to add it to the right namespace)
$ kubectl -n pulsar create secret generic pulsar-broker-service-account --from-file=serviceaccount.json
in case of an existing release, upgrade your helm deployment and roll over your broker statefulset
$ helm upgrade <your-release-name> charts/pulsar
$ kubectl -n pulsar rollout restart statefulset production-pulsar-broker
from pulsar-helm-chart.
Related Issues (20)
- Argo CD unable to generate template with pulsar chart 3.3.0 HOT 5
- Deployment using JWT authentication + Function Worker is not working properly HOT 1
- [Bug] Broker startup could get into a long crash loop when Functions are enabled HOT 1
- Allow using a separate volume for the zookeeper transaction log
- Allow specifying an existing secret for pulsar-manager credentials
- Make it possible to optionally override .ReleaseIsInstall logic in init jobs
- Latest chart version: 3.4.0 missing in the Apache helm repo index HOT 3
- Plugins support HOT 1
- PKIX path building failed: unable to find valid certification path to request to requested target HOT 2
- HPA missing namespace HOT 1
- upgrade to pulsar helm chart version 3.3.1 from 2.9.4->3.0.0->3.3.1 with the pulsar-broker error HOT 2
- Pulsar manager service fails saying "2024-05-07 15:02:17,476 INFO exited: pulsar-manager-backend (terminated by SIGKILL; not expected)" HOT 2
- Allow broker's service clusterIP customisation: headless vs non-headless HOT 1
- pulsar-broker failed to start with both Liveness probe and Readiness probes failed: HTTP probe failed with statuscode: 404 HOT 5
- Specifying image pull policy in the chart HOT 1
- Setting up custom config HOT 2
- Pulsar 3.2.3 incorrect permissions in Kubernetes, cannot deploy connectors
- Add "existingClaim" Property to Volumes for Improved Cloud Provider Compatibility HOT 3
- Pulsar Helm Chart Initialization Failure When Using Existing Secret
- namespaces "pulsar" not found when selected namespace is not pulsar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulsar-helm-chart.