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

Bugfix for annotations & labels flags #2881

Merged
merged 2 commits into from Apr 17, 2019

Conversation

palourde
Copy link
Contributor

@palourde palourde commented Apr 16, 2019

Signed-off-by: Simon Plourde simon@sensu.io

What is this change?

This PR fixes the --annotations & --labels flags with a workaround, since the actual problem in viper is still present: spf13/viper#608.

Why is this change necessary?

Closes #2357

Does your change need a Changelog entry?

Added.

Do you need clarification on anything?

Nope!

Were there any complications while making this change?

Nope!

Have you reviewed and updated the documentation for this change? Is new documentation required?

Nope!

How did you verify this change?

Manually tested:

Labels

$ sensu-agent start --labels foo=bar
$ sensuctl entity info whisky.local --format json | jq -r '.metadata.labels'
{
  "foo": "bar"
}

# Now use a config file with:
# labels:
#   baz: qux
$ sensu-agent start -c agent.yml
$ sensuctl entity info whisky.local --format json | jq -r '.metadata.labels'
{
  "baz": "qux"
}

# Now mix the config file with labels flag, which should have precedence over the config
$ sensu-agent start -c agent.yml --labels foo=bar
$ sensuctl entity info whisky.local --format json | jq -r '.metadata.labels'
{
  "foo": "bar"
}

Annotations

$ sensu-agent start --annotations foo=bar
$ sensuctl entity info whisky.local --format json | jq -r '.metadata.annotations'
{
  "foo": "bar"
}

# Now use a config file with:
# annotations:
#   baz: qux
$ sensu-agent start -c agent.yml
$ sensuctl entity info whisky.local --format json | jq -r '.metadata.annotations'
{
  "baz": "qux"
}

# Now mix the config file with annotations flag, which should have precedence over the config
$ sensu-agent start -c agent.yml --annotations foo=bar
$ sensuctl entity info whisky.local --format json | jq -r '.metadata.annotations'
{
  "foo": "bar"
}

Simon Plourde added 2 commits April 16, 2019 16:58
Signed-off-by: Simon Plourde <simon@sensu.io>
Signed-off-by: Simon Plourde <simon@sensu.io>
Copy link

@nikkictl nikkictl left a comment

Choose a reason for hiding this comment

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

giphy-2

@palourde palourde merged commit 0801c1d into release-5.6.0 Apr 17, 2019
@palourde palourde deleted the bugfix/flags-labels-annotations branch April 17, 2019 19:23
echlebek added a commit that referenced this pull request Apr 25, 2019
* Create 5.6.0 release branch

Signed-off-by: Eric Chlebek <eric@sensu.io>

* Bugfix for annotations & labels flags (#2881)

Signed-off-by: Simon Plourde <simon@sensu.io>

* Move dashboard source code into its own repository (#2869)

As our project has grown, build targets increased, and time has passed, the ideal of a monorepo housing both the web and backend has simply caused more friction than it has reduced. Today we are moving Sensu Go Web into it's own repository: sensu/web.

Signed-off-by: James Phillips <jamesdphillips@gmail.com>

* [GraphQL] Ensures that all types are registered (#2875)

Types that are not directly referenced by the root Schema type or any of
their children are not immediately registered with the schema. As such to
ensure that ALL types are available we append any that are missing.

Signed-off-by: James Phillips <jamesdphillips@gmail.com>

* Add message bus to tessend (#2886)

Signed-off-by: Nikki Attea <nikki@sensu.io>

* Feature/cluster id hex (#2893)

Signed-off-by: Nikki Attea <nikki@sensu.io>

* Add support for field selectors (#2892)

Signed-off-by: Simon Plourde <simon@sensu.io>

* Proxy api from dashboard daemon (#2885)

Signed-off-by: James Phillips <jamesdphillips@gmail.com>
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.

None yet

3 participants