Use correct path for initdb and pg_ctl
Fixes https://github.com/apache/pulsar-manager/issues/465
Motivation
initdb and pg_ctl are no longer available in the v0.3.0 image. Most likely this is due to a switch from alpine or to a newer version of PostgreSQL (13).
This change fixes the not found issues for both of these.
Verifying this change
- [x] Tested it locally by building the image and running it
- [x] Tested it on Kubernetes on a clean environment
Better add the binaries to the PATH in the dockerfile
ENV PATH="/usr/lib/postgresql/13/bin/:$PATH"
WDYT?
Better add the binaries to the PATH in the dockerfile
ENV PATH="/usr/lib/postgresql/13/bin/:$PATH"WDYT?
Tried to make this work by modifying PATH in the deployment, but since entrypoint user is root and the postgresql commands run as user "pulsar", the PATH var wasn't correct for that user and they failed. Better imo to use full path.
Hello Martin,
I am new to pulsar, since the v0.4.0 is not released yet, could you please help with deploying it local with this fix or something you can point me out to. I would really appreciate.
Here is an example of deployment
kind: Deployment apiVersion: apps/v1 metadata: name: pulsar-pulsar-manager namespace: colony-events labels: app: pulsar cluster: pulsar component: pulsar-manager release: pulsar spec: replicas: 1 selector: matchLabels: app: pulsar component: pulsar-manager release: pulsar template: metadata: labels: app: pulsar cluster: pulsar component: pulsar-manager release: pulsar spec: volumes: - name: pulsar-manager-data emptyDir: {} containers: - name: pulsar-pulsar-manager image: streamnative/pulsar-manager:v0.3.1-rc2 # image: apachepulsar/pulsar-manager:v0.3.0 ports: - containerPort: 9527 protocol: TCP - containerPort: 7750 protocol: TCP envFrom: - configMapRef: name: pulsar-pulsar-manager env: - name: PULSAR_CLUSTER value: pulsar - name: USERNAME valueFrom: secretKeyRef: name: pulsar-pulsar-manager-secret key: PULSAR_MANAGER_ADMIN_USER - name: PASSWORD valueFrom: secretKeyRef: name: pulsar-pulsar-manager-secret key: PULSAR_MANAGER_ADMIN_PASSWORD - name: PULSAR_MANAGER_OPTS value: $(PULSAR_MANAGER_OPTS) -Dlog4j2.formatMsgNoLookups=true - name: SPRING_CONFIGURATION_FILE value: "/pulsar-manager/pulsar-manager/application.properties" resources: limits: cpu: 100m memory: 250Mi requests: cpu: 100m memory: 250Mi volumeMounts: - name: pulsar-manager-data mountPath: /data imagePullPolicy: IfNotPresent restartPolicy: Always terminationGracePeriodSeconds: 30 nodeSelector: persistent-type: persistent