Code Monkey home page Code Monkey logo

Comments (9)

singer0503 avatar singer0503 commented on August 17, 2024 2

nice bro @dgomezleon @javsalgar
this is good solution. is available.

from charts.

javsalgar avatar javsalgar commented on August 17, 2024 1

When there is a PVC, the installation will re-use the password from the volume. Could you confirm what the previous password was?

from charts.

dgomezleon avatar dgomezleon commented on August 17, 2024 1

Hi @amirhallaji

I was not able to reproduce the issue. I tried the following.

  1. Install the chart with default values only using dbUser.password="cassandra"
  2. Access with the following commands
   kubectl port-forward --namespace test svc/cassandra 9042:9042 &
   cqlsh -u cassandra -p cassandra 127.0.0.1 9042
  1. Uninstall it and keep PVC.
  2. Install again
  3. Access with the previous commands.

I would suggest using these commands in case it helps:

$ export CASSANDRA_PASSWORD=$(kubectl get secret --namespace "test" cassandra -o jsonpath="{.data.cassandra-password}" | base64 -d)
$  kubectl port-forward --namespace test svc/cassandra 9042:9042 &
$  cqlsh -u cassandra -p $CASSANDRA_PASSWORD 127.0.0.1 9042

from charts.

dgomezleon avatar dgomezleon commented on August 17, 2024 1

Hi @amirhallaji

You could try the following to apply this docs:

  1. Copy the original configuration:
$ kubectl cp cassandra-0:/opt/bitnami/cassandra/conf/cassandra.yaml /tmp/cassandra.yaml
  1. Edit it as follows
...
# - AllowAllAuthenticator performs no checks - set it to disable authentication.
# - PasswordAuthenticator relies on username/password pairs to authenticate
#   users. It keeps usernames and hashed passwords in system_auth.roles table.
#   Please increase system_auth keyspace replication factor if you use this authenticator.
#   If using PasswordAuthenticator, CassandraRoleManager must also be used (see below)
authenticator: 'AllowAllAuthenticator'

# Authorization backend, implementing IAuthorizer; used to limit access/provide permissions
# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer,
# CassandraAuthorizer}.
#
# - AllowAllAuthorizer allows any action to any user - set it to disable authorization.
# - CassandraAuthorizer stores permissions in system_auth.role_permissions table. Please
#   increase system_auth keyspace replication factor if you use this authorizer.
authorizer: 'AllowAllAuthorizer'
...
  1. Create a CM
$ kubectl create cm cassandra-conf --from-file=/tmp/cassandra.yaml
  1. Uninstall the chart and install it as follows
helm install cassandra . --set existingConfiguration=cassandra-conf
  1. Access with cqlsh (with empty password) and set it to cassandra:
$ cqlsh -u cassandra 127.0.0.1 9042
  cqlsh> UPDATE system_auth.roles SET salted_hash = '$2a$10$1gMPBy9zSkDzKxdbU2v/gOslcMRPDcXVqmwQYBmi8MVgYvNdRZw/.' WHERE role = 'cassandra';
  cqlsh> exit 
  1. Uninstall and install the chart as usual.

You should be able to access it with cassandra password.

from charts.

amirhallaji avatar amirhallaji commented on August 17, 2024 1

Hi dear @dgomezleon

Thank you very much. It worked for me.

from charts.

javsalgar avatar javsalgar commented on August 17, 2024

Hi!

Could you confirm if you do not have PVC leftovers from previous installations?

from charts.

amirhallaji avatar amirhallaji commented on August 17, 2024

Hi,
I did not delete pvc since I didn't want to lose data.
As I know, the deletion of PVC results in losing data if no backup is provided.
Should I have done something else?

from charts.

amirhallaji avatar amirhallaji commented on August 17, 2024

I got it.
Yes, the previous password was cassandra which I used to log in. But, after installing it again, this password didn't work anymore.

from charts.

amirhallaji avatar amirhallaji commented on August 17, 2024

Hi @dgomezleon

Thank you for your suggestion. Actually, I had done these steps multiple times before creating this issue, but unfortunately, they didn't work for me. I think the only solution may be to delete PVC. Am I right?

I also should mention that the first time I uninstalled the chart, it was due to the lack of resources in that namespace that made me do that. I don't know whether it's helpful or not. But I add it to this issue.

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.