Skip to content

Support listing endpoints of Listeners in "stacklet list" command#213

Merged
sbernauer merged 8 commits into
mainfrom
feat/support-listeners
Mar 11, 2024
Merged

Support listing endpoints of Listeners in "stacklet list" command#213
sbernauer merged 8 commits into
mainfrom
feat/support-listeners

Conversation

@sbernauer
Copy link
Copy Markdown
Member

@sbernauer sbernauer commented Mar 1, 2024

Description

Currently shows

➜  stackable-cockpit git:(feat/support-listeners) ✗ cargo r -p stackablectl -- stacklet list
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/stackablectl stacklet list`

┌───────────┬──────────────┬───────────┬──────────────────────────────────────────────────────┬─────────────────────────────────┐
│ PRODUCT   ┆ NAME         ┆ NAMESPACE ┆ ENDPOINTS                                            ┆ CONDITIONS                      │
╞═══════════╪══════════════╪═══════════╪══════════════════════════════════════════════════════╪═════════════════════════════════╡
│ hdfs      ┆ simple-hdfs  ┆ default   ┆ namenode-default-0-http     http://172.18.0.2:31792  ┆ Available, Reconciling, Running │
│           ┆              ┆           ┆ namenode-default-0-metrics  172.18.0.2:32448         ┆                                 │
│           ┆              ┆           ┆ namenode-default-0-rpc      172.18.0.2:32724         ┆                                 │
│           ┆              ┆           ┆ namenode-default-1-http     http://172.18.0.2:32429  ┆                                 │
│           ┆              ┆           ┆ namenode-default-1-metrics  172.18.0.2:30426         ┆                                 │
│           ┆              ┆           ┆ namenode-default-1-rpc      172.18.0.2:32738         ┆                                 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ trino     ┆ simple-trino ┆ default   ┆ coordinator-metrics         172.18.0.2:32650         ┆ Available, Reconciling, Running │
│           ┆              ┆           ┆ coordinator-https           https://172.18.0.2:32620 ┆                                 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ zookeeper ┆ simple-zk    ┆ default   ┆                                                      ┆ Available, Reconciling, Running │
└───────────┴──────────────┴───────────┴──────────────────────────────────────────────────────┴─────────────────────────────────┘

Use "stackablectl stacklet credentials [OPTIONS] <PRODUCT_NAME> <STACKLET_NAME>" to display credentials for deployed stacklets.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes
# Author
- [ ] Changes are OpenShift compatible
- [ ] CRD changes approved
- [ ] Helm chart can be installed and deployed operator works
- [ ] Integration tests passed (for non trivial changes)
# Reviewer
- [ ] Code contains useful comments
- [ ] (Integration-)Test cases added
- [ ] Documentation added or updated
- [ ] Changelog updated
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)
# Acceptance
- [ ] Feature Tracker has been updated
- [ ] Proper release label has been added

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

Comment thread rust/stackable-cockpit/src/platform/service.rs Outdated
};
for address in listener_status.ingress_addresses.iter().flatten() {
for port in &address.ports {
// Listener names usually have the pattern "listener-simple-hdfs-namenode-default-0" or
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: We should make the naming consistent. Then we could add a stable function which extracts the raw display name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that the ListenerClass name is equal to the name of the PVC that creates it.
And the pvc naming is done by k8s based on the name of the Pod and the name of the volume in the PodSpec.
And it also differs depend on wether a persistent or ephemeral volume is used :/ So everything is a mess....

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, that's just... great. I guess we can make it stable(ish) sometime in the future. Is it still worth pulling the code out into its own function?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, please have a look at 1a11e41

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change, I like the addition of some test cases!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, huh. Guess I missed sending my reply here the other day (or GH ate it). I'd personally much rather just show the name as-is than mangle it like this. That would also make it easier/clearer for users to move between the "easy facade" of stackablectl and reading the backend data via kubectl when something goes wrong.

Comment thread rust/stackable-cockpit/src/platform/service.rs Outdated
Techassi
Techassi previously approved these changes Mar 11, 2024
@sbernauer sbernauer added this pull request to the merge queue Mar 11, 2024
Merged via the queue into main with commit 5f7fd70 Mar 11, 2024
@sbernauer sbernauer deleted the feat/support-listeners branch March 11, 2024 09:42
@lfrancke
Copy link
Copy Markdown
Member

What does this ticket fix? Only HDFS? Everything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants