Skip to content

feat: allow aliases to be skipped in resource definitions #588

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

smira
Copy link
Member

@smira smira commented Apr 16, 2025

This allows to "hide" from get commands some resources unless they are called by the full name.

See siderolabs/talos#10666

Also rekres and bump deps, fix linting issues.

This allows to "hide" from `get` commands some resources unless they are
called by the full name.

See siderolabs/talos#10666

Also rekres and bump deps, fix linting issues.

Signed-off-by: Andrey Smirnov <[email protected]>

spec.AllAliases = append(spec.AllAliases, strings.ToLower(name))
if !spec.SkipAutomaticAliases {
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the actual change 🤦‍♂️

@smira
Copy link
Member Author

smira commented Apr 16, 2025

/m

@talos-bot talos-bot merged commit a06b473 into cosi-project:main Apr 16, 2025
14 of 15 checks passed
smira added a commit to smira/talos that referenced this pull request Apr 16, 2025
We have now two `MountStatus` resources: one legacy under `runtime`, and
another (new one) under `block`. As the old `MountStatus` is still used
e.g. in Omni, we still keep it around.

In order to fix `talosctl get mountstatus` to be non-ambigious, we
suppress aliases for the legacy resource:

```
talosctl get mountstatus
NODE         NAMESPACE   TYPE          ID                                  VERSION   SOURCE      TARGET                              FILESYSTEM   VOLUME
172.20.0.2   runtime     MountStatus   /etc/cni                            2                     /etc/cni                            none         /etc/cni
172.20.0.2   runtime     MountStatus   /etc/kubernetes                     2                     /etc/kubernetes                     none         /etc/kubernetes
```

Fixes siderolabs#10666

See cosi-project/runtime#588

Signed-off-by: Andrey Smirnov <[email protected]>
smira added a commit to smira/talos that referenced this pull request Apr 22, 2025
We have now two `MountStatus` resources: one legacy under `runtime`, and
another (new one) under `block`. As the old `MountStatus` is still used
e.g. in Omni, we still keep it around.

In order to fix `talosctl get mountstatus` to be non-ambigious, we
suppress aliases for the legacy resource:

```
talosctl get mountstatus
NODE         NAMESPACE   TYPE          ID                                  VERSION   SOURCE      TARGET                              FILESYSTEM   VOLUME
172.20.0.2   runtime     MountStatus   /etc/cni                            2                     /etc/cni                            none         /etc/cni
172.20.0.2   runtime     MountStatus   /etc/kubernetes                     2                     /etc/kubernetes                     none         /etc/kubernetes
```

Fixes siderolabs#10666

See cosi-project/runtime#588

Signed-off-by: Andrey Smirnov <[email protected]>
(cherry picked from commit e51a8ef)
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

Successfully merging this pull request may close these issues.

3 participants