Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot set STKEEPER_PG_LISTEN_ADDRESS to * #42

Open
samene opened this issue Oct 14, 2020 · 3 comments
Open

cannot set STKEEPER_PG_LISTEN_ADDRESS to * #42

samene opened this issue Oct 14, 2020 · 3 comments

Comments

@samene
Copy link

samene commented Oct 14, 2020

What happened: I am deploying the stolon helm chart with istio proxy sidecar injection enabled. As per istio documentation here we need to set the listen address to * so that clients can connect to the database. To do that I set the environment variable STKEEPER_PG_LISTEN_ADDRESS * The keeper however still continues to listen to the $POD_IP.

    Ports:         8080/TCP, 5432/TCP
    Host Ports:    0/TCP, 0/TCP
    Command:
      /bin/bash
      -ec
      # Generate our keeper uid using the pod index
      IFS='-' read -ra ADDR <<< "$(hostname)"
      export STKEEPER_UID="keeper${ADDR[-1]}"
      export POD_IP=$(hostname -i)
      export STKEEPER_PG_LISTEN_ADDRESS=$POD_IP
      export STOLON_DATA=/stolon-data
      chown stolon:stolon $STOLON_DATA
      exec gosu stolon stolon-keeper --data-dir $STOLON_DATA

    State:          Running
      Started:      Wed, 14 Oct 2020 16:26:12 +0530
    Ready:          True
    Restart Count:  0
    Environment:
      POD_NAME:                         empirix-stolon-keeper-0 (v1:metadata.name)
      STKEEPER_CLUSTER_NAME:            empirix-stolon
      STKEEPER_STORE_BACKEND:           kubernetes
      STKEEPER_KUBE_RESOURCE_KIND:      configmap
      STKEEPER_PG_REPL_USERNAME:        <set to the key 'pg_repl_username' in secret 'db-replica'>  Optional: false
      STKEEPER_PG_REPL_PASSWORDFILE:    /etc/secrets/stolon-db-replica/pg_repl_password
      STKEEPER_PG_SU_USERNAME:          <set to the key 'pg_su_username' in secret 'db-admin'>  Optional: false
      STKEEPER_PG_SU_PASSWORDFILE:      /etc/secrets/stolon-db-admin/pg_su_password
      STKEEPER_METRICS_LISTEN_ADDRESS:  0.0.0.0:8080
      STKEEPER_DEBUG:                   false
      STKEEPER_PG_LISTEN_ADDRESS:       *
    Mounts:
      /etc/secrets/stolon-db-admin from stolon-secret-db-admin (rw)
      /etc/secrets/stolon-db-replica from stolon-secret-db-replica (rw)
      /stolon-data from data (rw)

What you expected to happen: Setting the STKEEPER_PG_LISTEN_ADDRESS to * should be honoured and not be overwritten by the command

Without this working the database cannot work with istio sidecar injection enabled.

I need to set these two variables, but they are not possible

    - name: STKEEPER_PG_LISTEN_ADDRESS
      value: "*"
    - name: STKEEPER_PG_ADVERTISE_ADDRESS
      value: "$POD_IP"

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Stolon version: helm 1.6.2 stolon 0.16.0
  • Stolon running environment (if useful to understand the bug):
  • Others:
@lwolf
Copy link
Owner

lwolf commented Oct 15, 2020

thanks for the detailed issue.
sounds like a right thing to do.

@samene
Copy link
Author

samene commented Oct 17, 2020

any chance of having a fix?

@lwolf
Copy link
Owner

lwolf commented Oct 17, 2020

Can't provide any ETA, but feel free to create a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants