Coder Social home page Coder Social logo

Missing command - status? about helmfile HOT 9 OPEN

roboll avatar roboll commented on August 23, 2024
Missing command - status?

from helmfile.

Comments (9)

mumoshu avatar mumoshu commented on August 23, 2024

FYI, this is currently WIP in #70 thanks to @cmeury!

Btw, what is your use-case for this feature? I have never wanted to run helm status through helmfile myself. A short user-story would be welcomed!

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

Forgot to mention you - just adding it for your notice @xeor

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

@cmeury I'm still wondering how this would be implemented in its best form.

AFAICS, just repeating helm status <release> for each relevant release would result in multiplying something like:

$ helm status esteemed-magpie
LAST DEPLOYED: Tue Apr  3 17:30:13 2018
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/Secret
NAME                   TYPE    DATA  AGE
esteemed-magpie-mysql  Opaque  2     17s

==> v1/PersistentVolumeClaim
NAME                   STATUS  VOLUME                                    CAPACITY  ACCESS MODES  STORAGECLASS  AGE
esteemed-magpie-mysql  Bound   pvc-3ae0dfe4-3719-11e8-811a-080027e8f12b  8Gi       RWO           standard      17s

==> v1/Service
NAME                   TYPE       CLUSTER-IP    EXTERNAL-IP  PORT(S)   AGE
esteemed-magpie-mysql  ClusterIP  10.110.14.39  <none>       3306/TCP  17s

==> v1beta1/Deployment
NAME                   DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
esteemed-magpie-mysql  1        1        1           0          17s

==> v1/Pod(related)
NAME                                    READY  STATUS           RESTARTS  AGE
esteemed-magpie-mysql-6887f4c88c-7zm6f  0/1    PodInitializing  0         17s


NOTES:
MySQL can be accessed via port 3306 on the following DNS name from within your cluster:
esteemed-magpie-mysql.default.svc.cluster.local

To get your root password run:

    MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace default esteemed-magpie-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo)

To connect to your database:

1. Run an Ubuntu pod that you can use as a client:

    kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il

2. Install the mysql client:

    $ apt-get update && apt-get install mysql-client -y

3. Connect using the mysql cli, then provide your password:
    $ mysql -h esteemed-magpie-mysql -p

To connect to your database directly from outside the K8s cluster:
    MYSQL_HOST=127.0.0.1
    MYSQL_PORT=3306

    # Execute the following commands to route the connection:
    export POD_NAME=$(kubectl get pods --namespace default -l "app=esteemed-magpie-mysql" -o jsonpath="{.items[0].metadata.name}")
    kubectl port-forward $POD_NAME 3306:3306

    mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u root -p${MYSQL_ROOT_PASSWORD}

which seems like too verbose(for me).

Probably we should at least omit NOTES: from the output while merging RESOURCES so that it would look more like the status of the whole releases managed by the helmfile.yml?

Also, I guess it should better be consistent with #68

from helmfile.

cmeury avatar cmeury commented on August 23, 2024

How about using the JSON output option and print them using our own style?

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

@cmeury Sounds great! I'm now wondering the scope of #70. Would you be willing to submit a separate PR on top of #70 for further enhancement? If so, I'll merge it as-is, if it helps.

@sstarcher You seem to be interested in this feature, too? Any comment on how the output would ideally look like?

from helmfile.

sstarcher avatar sstarcher commented on August 23, 2024

I'm really only interested in a exit code of all good or something not so good. I general ignore the helmfile output as it's extremely verbose and hard to follow.

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

The plan:

  • Merge @cmeury's awesome work #70
  • According to @sstarcher's suggestion, reduce output to include release names and status codes only.
    • helm status -o json/yaml returns code in int so we need to map one to human-readable status name as defined in the proto def
  • According to my suggestion, implement helmfile status -o json to output json representation of releases

WDYT? @sstarcher @cmeury @xeor

from helmfile.

sstarcher avatar sstarcher commented on August 23, 2024

sounds like a good idea to me. In the future it would likely be nice to extend the -o to the other outputs.

from helmfile.

mumoshu avatar mumoshu commented on August 23, 2024

@sstarcher Thx for the confirmation. Yeah. I'm not intended to extend it so much right now, but at least yaml after helm's yaml output would make sense.

from helmfile.

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.